diff options
author | Bruno Haible <bruno@clisp.org> | 2003-02-13 20:20:53 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:09:00 +0200 |
commit | 448657736aedc6a1b708be353bbac7f67385a9f9 (patch) | |
tree | 3a6e1e78a9fc82d0f806c7f0f0f2ee982004ff92 /gettext-tools/doc/msgexec.texi | |
parent | fb78c54c9592d9c9582b48e535a623140453a4d4 (diff) | |
download | external_gettext-448657736aedc6a1b708be353bbac7f67385a9f9.zip external_gettext-448657736aedc6a1b708be353bbac7f67385a9f9.tar.gz external_gettext-448657736aedc6a1b708be353bbac7f67385a9f9.tar.bz2 |
Move doc/msgexec.texi to gettext-tools/doc/msgexec.texi.
Diffstat (limited to 'gettext-tools/doc/msgexec.texi')
-rw-r--r-- | gettext-tools/doc/msgexec.texi | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/gettext-tools/doc/msgexec.texi b/gettext-tools/doc/msgexec.texi new file mode 100644 index 0000000..e060f0c --- /dev/null +++ b/gettext-tools/doc/msgexec.texi @@ -0,0 +1,74 @@ +@pindex msgexec +@cindex @code{msgexec} program, usage +@example +msgexec [@var{option}] @var{command} [@var{command-option}] +@end example + +@cindex apply command to all translations in a catalog +The @code{msgexec} program applies a command to all translations of a +translation catalog. +The @var{command} can be any program that reads a translation from standard +input. It is invoked once for each translation. Its output becomes +msgexec's output. @code{msgexec}'s return code is the maximum return code +across all invocations. + +@cindex @code{xargs}, and output from @code{msgexec} +A special builtin command called @samp{0} outputs the translation, followed +by a null byte. The output of @samp{msgexec 0} is suitable as input for +@samp{xargs -0}. + +@vindex MSGEXEC_MSGID@r{, environment variable} +@vindex MSGEXEC_LOCATION@r{, environment variable} +During each @var{command} invocation, the environment variable +@code{MSGEXEC_MSGID} is bound to the message's msgid, and the environment +variable @code{MSGEXEC_LOCATION} is bound to the location in the PO file +of the message. + +@cindex catalog encoding and @code{msgexec} output +Note: It is your responsibility to ensure that the @var{command} can cope +with input encoded in the translation catalog's encoding. If the +@var{command} wants input in a particular encoding, you can in a first step +convert the translation catalog to that encoding using the @samp{msgconv} +program, before invoking @samp{msgexec}. If the @var{command} wants input +in the locale's encoding, but you want to avoid the locale's encoding, then +you can first convert the translation catalog to UTF-8 using the +@samp{msgconv} program and then make @samp{msgexec} work in an UTF-8 +locale, by using the @code{LC_ALL} environment variable. + +@subsection Input file location + +@table @samp +@item -i @var{inputfile} +@itemx --input=@var{inputfile} +@opindex -i@r{, @code{msgexec} option} +@opindex --input@r{, @code{msgexec} option} +Input PO file. + +@item -D @var{directory} +@itemx --directory=@var{directory} +@opindex -D@r{, @code{msgexec} option} +@opindex --directory@r{, @code{msgexec} option} +Add @var{directory} to the list of directories. Source files are +searched relative to this list of directories. The resulting @file{.po} +file will be written relative to the current directory, though. + +@end table + +If no @var{inputfile} is given or if it is @samp{-}, standard input is read. + +@subsection Informative output + +@table @samp +@item -h +@itemx --help +@opindex -h@r{, @code{msgexec} option} +@opindex --help@r{, @code{msgexec} option} +Display this help and exit. + +@item -V +@itemx --version +@opindex -V@r{, @code{msgexec} option} +@opindex --version@r{, @code{msgexec} option} +Output version information and exit. + +@end table |