For each file in the ‘R’ directory (including system-specific
subdirectories) of a package, extract the unique arguments passed
gettextf, or to
1 2 3 4 5
the directory of a source package.
logical: should each file be listed as it is processed?
as recorded in the template file:
Leading and trailing white space (space, tab and linefeed) is removed
for calls to
message, as it is by the internal code that
passes strings for translation.
We look to see if these functions were called with
domain = NA
and if so omit the call if
asCall = TRUE: note that the
call might contain a call to
gettext which would be visible if
asCall = FALSE.
xgettext and then
and writes a PO template file for use with the GNU Gettext
tools. This ensures that the strings for simple translation are
unique in the file (as GNU Gettext requires), but does not do so
ngettext calls (and the rules are not stated in the Gettext
msgfmt complains if there is duplication between
If applied to the base package, this also looks in the ‘.R’ files in ‘R_HOME/share/R’.
xgettext, a list of objects of class
(which has a
xngettext, a list of objects of class
which are themselves lists of length-2 character strings.
update_pkg_po() which calls
1 2 3 4