po
directory of a package and compile and install
the translations.update_pkg_po(pkgdir, pkg = NULL, version = NULL, copyright, bugs)
NULL
it is read from the package's
DESCRIPTION
file.NULL
it is read from the
package's DESCRIPTION
file.gettext-tools
: xgettext
, msgmerge
,
msgfmt
, msginit
and msgconv
. These are
part of most Linux distributions and easily compiled from the sources
on Unix-alikes (including macOS). Pre-compiled versions for
Windows are available in
https://www.stats.ox.ac.uk/pub/Rtools/goodies/gettext-tools.zip. It will probably not work correctly for en@quot
translations
except in a UTF-8 locale, so these are skipped elsewhere.po
directory, one is created.
xgettext2pot
is called to create/update a file
po/R-pkgname.pot
containing the translatable messages
in the package.
po
with names
R-lang.po
are updated from R-pkgname.pot
,
checkPoFile
is called on the updated file, and if
there are no problems the file is compiled and installed under
inst/po
.
R-en@quot.po
is created with UTF-8 directional quotes, compiled and installed
under inst/po
.
po/pkgname.pot
already exists. The
src/*.{c,cc,cpp,m,mm}
files in the package are examined to
create a file po/pkgname.pot
containing the translatable
messages in the C/C++ files. If there is a src/windows
directory, files within it are also examined.
po
with names
lang.po
are updated from pkgname.pot
,
checkPoFile
is called on the updated file, and if
there are no problems the file is compiled and
installed under inst/po
.
en@quot.po
is
created with UTF-8 directional quotes, compiled and installed under
inst/po
.
po/pkgname.pot
in the package sources and run this
function again. pkg = "base"
is special (and for use by R developers only):
the C files are not in the package directory but in the main sources.xgettext2pot
.