potools
potools copied to clipboard
Handle Rgui domain as well
Rgui is the last domain that comes along with base, see brief mention here and the Rgui.pot template: https://github.com/wch/r-source/blob/trunk/src/library/base/po/RGui.pot
IINM we are looking for strings in the po/POTFILES (see #68) files that are marked with G_(.) as the translation macro (this macro is defined here: https://github.com/wch/r-source/blob/f8f705fe994ee163919d6246af3ae8c48440c65f/src/gnuwin32/win-nls.h#L27)
Handy reference:
https://github.com/wch/r-source/blob/b87d430b5e2398b2d48e124b8e8b23fde3c68b57/src/library/tools/R/translations.R#L239-L301
I'm wondering whether these should be translated alongside the other base translations. That's what I started doing on this branch... but the documentation suggests (and it makes sense) that the translators for RGui may be different from those for the rest of the messaging (it's why they separated to a different domain to begin with).
So maybe we need a different function to orchestrate this entirely...
Given this and that it seems non-trivial to shoehorn this into the is_base workflow, and that it doesn't seem super high-priority to fix, I'll deprioritize this for the initial CRAN release. I also envision encoding issues arising from this Windows-only feature...
NB: get_po_messages() has this line which needs to be adjusted alongside this enhancement:
message_source = if (startsWith(basename(po_file), "R-")) "R" else "src"