Add install_translations to allow more translations without worrying about package size
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- r
- Domain
- localization
Research direction
Start by inspecting the translation files under inst/po/zh_CN and the package’s .onAttach behavior. Reproduce the zh_CN locale test described in the issue, including installing without the .mo files and restarting R, then determine how the proposed install_translations interface should place them. Done means translations can be installed separately and recognized while the package ships without those files.
Written by the indexing model from the issue text.
Description
I tested out the following yesterday:
- Remove the message lookup binary .mo files from
inst/po/zh_CN/* - Install
data.table - Confirm Chinese translations don't show up when run in
zh_CNlocale - Restore the
.mofiles and copy them to the right place in the installed library - Confirm Chinese translations show up now [ ** Actually, they don't ** ]
- Restart R (again in
zh_CN). Confirm the Chinese translations work -- they do.
That means we can ship a version of the package without the .mo files, and offer an interface to download the .mo files & place them properly for the user. This way, we can open the door for other people to submit translations (there was a decent amount of demand for this when we first asked last year), without worrying about the implications of having to optimize the package size to be accepted on CRAN.
This could be part of the .onAttach message when we detect a locale that has translations, but which aren't installed.
There is still the issue of marginal maintenance burden for new languages to have in mind, so I would say to keep it to one or two more languages for the next (non-patch?) release.
TODO: check why exactly we need to restart R for the copied files to be recognized [this is minor]
PS @mattdowle I didn't see anything in the CRAN feedback about the package size, was there any issue there for 1.13.0?
- Dominant language
- R
- Stars
- 3.9k
- Forks
- 1.1k
- Avg merge
- 14h 4m
- Merged PRs (30d)
- 4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Rdatatable/data.table
-
as.data.table() recurses without end on a survival::Surv object (or any data.frame carrying one) Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Rdatatable/data.table#7887 ·
-
consistency tests
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Rdatatable/data.table#7853 · 3 comments ·
-
internals
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Rdatatable/data.table#6938 · 1 comment ·
-
encoding fread
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Rdatatable/data.table#5179 · 8 comments ·
-
documentation programming
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Rdatatable/data.table#3199 · 3 comments ·
All issues in Rdatatable/data.table
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
beginners blocker
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enviPathR OpenBuild Error Build OK Build Warning policies-accepted pre-review precheck-passed
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Bioconductor/BiocContributions#207 · 6 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
datacarpentry/semester-biology#1255 ·