MichaelChirico / potools

Tools for working with translations in R
https://michaelchirico.github.io/potools/
58 stars 2 forks source link

Add po/R-potools.pot to this package #241

Closed HenrikBengtsson closed 3 years ago

HenrikBengtsson commented 3 years ago

For someone trying to wrap their head around what files are being produced and where, I think it could helpful to include:

po/R-potools.pot

and an example of a language translation, e.g.

po/R-es.pot

to the potools package itself.

HenrikBengtsson commented 3 years ago

This could also be use to examplify how to use LANGUAGE, LANG, and LC_MESSAGES, and when those needs to/can be set, e.g. before or after R starts.

It can also be use to illustrate what happens if one of the messages is not translated.

These are things that end users as well as developers are gonna wonder about.

hadley commented 3 years ago

If you use devtools, you might want the dev version of pkgload which will automatically reload the .mo files: https://github.com/r-lib/pkgload/pull/171

To confirm that the translations are working, you might be interested in with_language(), https://github.com/r-lib/withr/pull/180, or the equivalent for base R, https://bugs.r-project.org/show_bug.cgi?id=18055.