2 @cindex @code{msgexec} program, usage
4 msgexec [@var{option}] @var{command} [@var{command-option}]
7 @cindex apply command to all translations in a catalog
8 The @code{msgexec} program applies a command to all translations of a
10 The @var{command} can be any program that reads a translation from standard
11 input. It is invoked once for each translation. Its output becomes
12 msgexec's output. @code{msgexec}'s return code is the maximum return code
13 across all invocations.
15 @cindex @code{xargs}, and output from @code{msgexec}
16 A special builtin command called @samp{0} outputs the translation, followed
17 by a null byte. The output of @samp{msgexec 0} is suitable as input for
20 @vindex MSGEXEC_MSGID@r{, environment variable}
21 @vindex MSGEXEC_LOCATION@r{, environment variable}
22 During each @var{command} invocation, the environment variable
23 @code{MSGEXEC_MSGID} is bound to the message's msgid, and the environment
24 variable @code{MSGEXEC_LOCATION} is bound to the location in the PO file
27 @cindex catalog encoding and @code{msgexec} output
28 Note: It is your responsibility to ensure that the @var{command} can cope
29 with input encoded in the translation catalog's encoding. If the
30 @var{command} wants input in a particular encoding, you can in a first step
31 convert the translation catalog to that encoding using the @samp{msgconv}
32 program, before invoking @samp{msgexec}. If the @var{command} wants input
33 in the locale's encoding, but you want to avoid the locale's encoding, then
34 you can first convert the translation catalog to UTF-8 using the
35 @samp{msgconv} program and then make @samp{msgexec} work in an UTF-8
36 locale, by using the @code{LC_ALL} environment variable.
38 @subsection Input file location
41 @item -i @var{inputfile}
42 @itemx --input=@var{inputfile}
43 @opindex -i@r{, @code{msgexec} option}
44 @opindex --input@r{, @code{msgexec} option}
47 @item -D @var{directory}
48 @itemx --directory=@var{directory}
49 @opindex -D@r{, @code{msgexec} option}
50 @opindex --directory@r{, @code{msgexec} option}
51 Add @var{directory} to the list of directories. Source files are
52 searched relative to this list of directories. The resulting @file{.po}
53 file will be written relative to the current directory, though.
57 If no @var{inputfile} is given or if it is @samp{-}, standard input is read.
59 @subsection Input file syntax
63 @itemx --properties-input
64 @opindex -P@r{, @code{msgexec} option}
65 @opindex --properties-input@r{, @code{msgexec} option}
66 Assume the input file is a Java ResourceBundle in Java @code{.properties}
67 syntax, not in PO file syntax.
69 @item --stringtable-input
70 @opindex --stringtable-input@r{, @code{msgexec} option}
71 Assume the input file is a NeXTstep/GNUstep localized resource file in
72 @code{.strings} syntax, not in PO file syntax.
76 @subsection Informative output
81 @opindex -h@r{, @code{msgexec} option}
82 @opindex --help@r{, @code{msgexec} option}
83 Display this help and exit.
87 @opindex -V@r{, @code{msgexec} option}
88 @opindex --version@r{, @code{msgexec} option}
89 Output version information and exit.