-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
French translation (vignettes) #6455
Conversation
Out of curiosity, what are the commands you ran to generate the PO files and the MO files? |
We (we are indeed 5 translators) use poEdit to get the .po file from the .pot template, and when the .po file is saved in poEdit, the .mo file is automatically created. |
I now remembered you mentioned using rmdpo for extracting the POT from the vignettes. |
@rffontenelle Oh yes, sorry, you asked for the vignettes. We used indeed {rmdpo}. For now, it directly updates the existing .po file with changes in the vignette, but a pathway using a .pot file would be better. The various files are here and in subdirectories, and the script that generates these files is here We still have to figure out how to work with Weblate, if and when this will be available for {data.table}. |
Should there be a brief documentation somewhere about who was responsible for the translation of the vignette (so they can get credit, and to stay in contact for updates), as well as what resources were used for the translation? RFrench dictionary, {rmdpo}, etc. Probably for authorship DESCRIPTION Authors@R is best, with comment="French translation of vignettes and messages" or similar.
For distributing the vignettes in a separate package, a drawback would be that it is not as easy for users to discover the additional vignettes in If we wanted to maintain discoverability, and keep the French vignettes in Another place users may want to discover vignettes is on http://rdatatable.gitlab.io/data.table/ so I wonder how the vignettes would appear there? |
In phgrosjean/data.table.fr, translators are listed as contributors of the package, but this is not totally correct. We should list vignettes authors + translators with a clear indication of who did what. Is there a list of vignettes authors (a subset of all {data.table} authors, I suppose)? Otherwise, I think French vignettes should appear in the menu Vignettes > fr > ... if the site is build using {pkgdown} on http://rdatatable.gitlab.io/data.table/. Could you try it in a sandbox somewhere? Ideally, English vignettes should be replaced by French ones at the different places when the user sets LANGUAGE=fr as environment variable, but R help, This is a discussion for the R translation working group. But in the meantime, we have to find a satisfactory transient solution for {data.table}. |
Oh, and there is also the translation of the cheatsheet. Where to place it? |
the cheat sheets currently go in rstudio/cheatsheets#367 |
- paquet -> package in R-fr.po, datatable-importing.Rmd and datatable-reshape.Rmd - `"JFK" et "LAX"`-> `c("JFK", "LAX")` i, datatable-secondary-indices-and-auto-indexing.Rmd
@tdhock New commit integrating the changes (paquet -> package) and |
Thanks so much! Would you mind splitting this into two PRs? One with the main package .po, the other with the vignette changes? Clearly the latter requires a bit more careful thought. The former can be merged right away. |
.ci/.lintr.R
Outdated
@@ -73,7 +73,7 @@ rm(dt_linters) | |||
# TODO(lintr#2172): Glob with lintr itself. | |||
exclusions = c(local({ | |||
exclusion_for_dir <- function(dir, exclusions) { | |||
files = file.path("..", list.files(dir, pattern = "\\.(R|Rmd|Rraw)$", full.names=TRUE, recursive=TRUE)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why revert this :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I had to re-fork the repository and I did not notice this when I did my commit.
I'll do a separate pull request for the main package .po files, since the discussion here is mainly about vignettes.
OK, only the vignettes in French in this pull request now. |
lint currently says
other than that, is this PR ready to merge?
I have not checked if we can see vignettes on pkgdown site yet, I will try on my local machine. |
I got an error, am I doing the build wrong? > pkgdown::build_site("~/R/data.table")
── Installing package data.table into temporary library ────────────────────────
── Building pkgdown site for package data.table ────────────────────────────────
Reading from: ~/R/data.table
Writing to: ~/R/data.table/docs
── Sitrep ──────────────────────────────────────────────────────────────────────
✖ URLs not ok.
In DESCRIPTION, URL is missing package url
(https://rdatatable.gitlab.io/data.table).
See details in `vignette(pkgdown::metadata)`.
✔ Favicons ok.
✔ Open graph metadata ok.
✔ Articles metadata ok.
✔ Reference metadata ok.
── Initialising site ───────────────────────────────────────────────────────────
── Building home ───────────────────────────────────────────────────────────────
✖ Icon "fas fa-home fa-lg" lacks an `aria-label`.
ℹ Specify `aria-label` to make the icon accessible to screen readers.
ℹ Learn more in `vignette(pkgdown::accessibility)`.
This message is displayed once every 8 hours.
Reading datatable-benchmarking.md
Writing `datatable-benchmarking.html`
Reading GOVERNANCE.md
Reading NEWS.0.md
Reading NEWS.1.md
Reading Seal_of_Approval.md
Reading .github/CONTRIBUTING.md
Reading README.md
Writing `404.html`
── Building function reference ─────────────────────────────────────────────────
Reading man/address.Rd
Writing `reference/address.html`
Reading man/all.equal.data.table.Rd
Reading man/as.data.table.Rd
Reading man/as.data.table.xts.Rd
Reading man/as.matrix.Rd
Reading man/as.xts.data.table.Rd
Reading man/assign.Rd
Reading man/between.Rd
Reading man/cdt.Rd
Reading man/chmatch.Rd
Writing `reference/chmatch.html`
Reading man/coalesce.Rd
Reading man/copy.Rd
Reading man/data.table-class.Rd
Reading man/data.table.Rd
Writing `reference/data.table.html`
Reading man/datatable-optimize.Rd
Reading man/dcast.data.table.Rd
Reading man/deprecated.Rd
Reading man/duplicated.Rd
Reading man/fcase.Rd
Reading man/fdroplevels.Rd
Reading man/fifelse.Rd
Reading man/foverlaps.Rd
Reading man/frank.Rd
Reading man/fread.Rd
Reading man/froll.Rd
Writing `reference/froll.html`
Reading man/fsort.Rd
Writing `reference/fsort.html`
Reading man/fwrite.Rd
Reading man/groupingsets.Rd
Reading man/IDateTime.Rd
Reading man/J.Rd
Reading man/last.Rd
Reading man/last.updated.Rd
Reading man/like.Rd
Reading man/measure.Rd
Reading man/melt.data.table.Rd
Reading man/merge.Rd
Reading man/na.omit.data.table.Rd
Reading man/nafill.Rd
Reading man/notin.Rd
Reading man/openmp-utils.Rd
Reading man/patterns.Rd
Reading man/print.data.table.Rd
Reading man/rbindlist.Rd
Reading man/rleid.Rd
Reading man/rowid.Rd
Reading man/setattr.Rd
Writing `reference/setattr.html`
Reading man/setcolorder.Rd
Reading man/setDF.Rd
Reading man/setDT.Rd
Reading man/setkey.Rd
Reading man/setNumericRounding.Rd
Reading man/setops.Rd
Reading man/setorder.Rd
Reading man/shift.Rd
Reading man/shouldPrint.Rd
Reading man/special-symbols.Rd
Reading man/split.Rd
Reading man/subset.data.table.Rd
Reading man/substitute2.Rd
Reading man/tables.Rd
Reading man/test.data.table.Rd
Reading man/test.Rd
Reading man/timetaken.Rd
Writing `reference/timetaken.html`
Reading man/transform.data.table.Rd
Reading man/transpose.Rd
Reading man/truelength.Rd
Reading man/tstrsplit.Rd
Reading man/update_dev_pkg.Rd
── Building articles ───────────────────────────────────────────────────────────
Reading vignettes/datatable-benchmarking.Rmd
Warning message:
Failed to parse example for topic "update_dev_pkg"
Error:
! in callr subprocess.
Caused by error in `.f(.x[[i]], ...)`:
! Failed to render vignettes/datatable-benchmarking.Rmd.
✖ Warning message:
✖ In file(con, "r") :
✖ cannot open file 'css/toc.css': No such file or directory
Caused by error:
! cannot open the connection
ℹ See `$stderr` for standard error.
Type .Last.error to see the more details. in https://github.com/Rdatatable/data.table/blob/master/.gitlab-ci.yml (where I think the site is usually built) I see
|
Ignore that, it's present in the original but skipped: Line 89 in 036fb48
(or if anything, it should be fixed by a similar lintr config setup) |
so there are three blocking points that we need to decide before merging this PR.
person("Philippe","Grosjean", role="ctb", comment = "French translation"), |
I think that translations should only be posted on the website to avoid increasing the time required to install the package. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6455 +/- ##
=======================================
Coverage 98.60% 98.60%
=======================================
Files 79 79
Lines 14518 14518
=======================================
Hits 14316 14316
Misses 202 202 ☔ View full report in Codecov by Sentry. |
This is workaround for bug in pkgdown described in linked issue. Follow this workaround when generating vignettes for a website. AFAIR bug was closed as wont fix but you can check once again with pkgdown team. |
I'm merging because I added FR team to DESCRIPTION, and I added links from English to French vignettes. Please file another PR for any further updates we would need to do. |
This is the French translation for
fr.po
andR-fr.po
.This is also the translation of the ten vignettes in French, in an "fr" subdirectory as discussed in #6221 (@MichaelChirico "As long as it actually works, I agree for now putting it in subdirectories is the way to go.")
However, the vignettes in subdirectories are not listed in the main help page of the package, nor by
vignette()
. This is a problem (they are essentially "unusable" as such). Also, there are twice more vignettes to compile now, and possibly even more if there are other translations.So, the solution to place translated vignettes in a {data.table.fr} package along with the translation of the man pages may be a better solution. I also did a trial in this direction in phgrosjean/data.table.fr.
Please, check both approaches before deciding for this pull request.