2 @cindex @code{msgattrib} program, usage
4 msgattrib [@var{option}] [@var{inputfile}]
7 @cindex filter messages according to attributes
8 @cindex attribute manipulation
9 The @code{msgattrib} program filters the messages of a translation catalog
10 according to their attributes, and manipulates the attributes.
12 @subsection Input file location
18 @item -D @var{directory}
19 @itemx --directory=@var{directory}
20 @opindex -D@r{, @code{msgattrib} option}
21 @opindex --directory@r{, @code{msgattrib} option}
22 Add @var{directory} to the list of directories. Source files are
23 searched relative to this list of directories. The resulting @file{.po}
24 file will be written relative to the current directory, though.
28 If no @var{inputfile} is given or if it is @samp{-}, standard input is read.
30 @subsection Output file location
34 @itemx --output-file=@var{file}
35 @opindex -o@r{, @code{msgattrib} option}
36 @opindex --output-file@r{, @code{msgattrib} option}
37 Write output to specified file.
41 The results are written to standard output if no output file is specified
44 @subsection Message selection
48 @opindex --translated@r{, @code{msgattrib} option}
49 Keep translated messages, remove untranslated messages.
52 @opindex --untranslated@r{, @code{msgattrib} option}
53 Keep untranslated messages, remove translated messages.
56 @opindex --no-fuzzy@r{, @code{msgattrib} option}
67 @opindex --only-fuzzy@r{, @code{msgattrib} option}
75 marked messages, remove all other messages.
78 @opindex --no-obsolete@r{, @code{msgattrib} option}
79 Remove obsolete #~ messages.
82 @opindex --only-obsolete@r{, @code{msgattrib} option}
83 Keep obsolete #~ messages, remove all other messages.
87 @subsection Attribute manipulation
89 @cindex modify message attributes
90 Attributes are modified after the message selection/removal has been
91 performed. If the @samp{--only-file} or @samp{--ignore-file} option is
92 specified, the attribute modification is applied only to those messages
93 that are listed in the @var{only-file} and not listed in the
98 @opindex --set-fuzzy@r{, @code{msgattrib} option}
108 @opindex --clear-fuzzy@r{, @code{msgattrib} option}
118 @opindex --set-obsolete@r{, @code{msgattrib} option}
119 Set all messages obsolete.
121 @item --clear-obsolete
122 @opindex --clear-obsolete@r{, @code{msgattrib} option}
123 Set all messages non-obsolete.
126 @opindex --previous@r{, @code{msgattrib} option}
134 mark, keep ``previous msgid'' of translated messages.
136 @item --clear-previous
137 @opindex --clear-previous@r{, @code{msgattrib} option}
138 Remove the ``previous msgid'' (@samp{#|}) comments from all messages.
141 @opindex --empty@r{, @code{msgattrib} option}
149 mark, also set msgstr empty.
151 @item --only-file=@var{file}
152 @opindex --only-file@r{, @code{msgattrib} option}
153 Limit the attribute changes to entries that are listed in @var{file}.
154 @var{file} should be a PO or POT file.
156 @item --ignore-file=@var{file}
157 @opindex --ignore-file@r{, @code{msgattrib} option}
158 Limit the attribute changes to entries that are not listed in @var{file}.
159 @var{file} should be a PO or POT file.
162 @opindex --fuzzy@r{, @code{msgattrib} option}
163 Synonym for @samp{--only-fuzzy --clear-fuzzy}: It keeps only the fuzzy
164 messages and removes their
174 @opindex --obsolete@r{, @code{msgattrib} option}
175 Synonym for @samp{--only-obsolete --clear-obsolete}: It keeps only the
176 obsolete messages and makes them non-obsolete.
180 @subsection Input file syntax
184 @itemx --properties-input
185 @opindex -P@r{, @code{msgattrib} option}
186 @opindex --properties-input@r{, @code{msgattrib} option}
187 Assume the input file is a Java ResourceBundle in Java @code{.properties}
188 syntax, not in PO file syntax.
190 @item --stringtable-input
191 @opindex --stringtable-input@r{, @code{msgattrib} option}
192 Assume the input file is a NeXTstep/GNUstep localized resource file in
193 @code{.strings} syntax, not in PO file syntax.
197 @subsection Output details
199 @c --no-escape and --escape omitted on purpose. They are not useful.
203 @itemx --color=@var{when}
204 @opindex --color@r{, @code{msgattrib} option}
205 Specify whether or when to use colors and other text attributes.
206 See @ref{The --color option} for details.
208 @item --style=@var{style_file}
209 @opindex --style@r{, @code{msgattrib} option}
210 Specify the CSS style rule file to use for @code{--color}.
211 See @ref{The --style option} for details.
214 @opindex --force-po@r{, @code{msgattrib} option}
215 Always write an output file even if it contains no message.
219 @opindex -i@r{, @code{msgattrib} option}
220 @opindex --indent@r{, @code{msgattrib} option}
221 Write the .po file using indented style.
224 @opindex --no-location@r{, @code{msgattrib} option}
225 Do not write @samp{#: @var{filename}:@var{line}} lines.
228 @itemx --add-location=@var{type}
229 @opindex -n@r{, @code{msgattrib} option}
230 @opindex --add-location@r{, @code{msgattrib} option}
231 Generate @samp{#: @var{filename}:@var{line}} lines (default).
233 The optional @var{type} can be either @samp{full}, @samp{file}, or
234 @samp{never}. If it is not given or @samp{full}, it generates the
235 lines with both file name and line number. If it is @samp{file}, the
236 line number part is omitted. If it is @samp{never}, it completely
237 suppresses the lines (same as @code{--no-location}).
240 @opindex --strict@r{, @code{msgattrib} option}
241 Write out a strict Uniforum conforming PO file. Note that this
242 Uniforum format should be avoided because it doesn't support the
246 @itemx --properties-output
247 @opindex -p@r{, @code{msgattrib} option}
248 @opindex --properties-output@r{, @code{msgattrib} option}
249 Write out a Java ResourceBundle in Java @code{.properties} syntax. Note
250 that this file format doesn't support plural forms and silently drops
253 @item --stringtable-output
254 @opindex --stringtable-output@r{, @code{msgattrib} option}
255 Write out a NeXTstep/GNUstep localized resource file in @code{.strings} syntax.
256 Note that this file format doesn't support plural forms.
258 @item -w @var{number}
259 @itemx --width=@var{number}
260 @opindex -w@r{, @code{msgattrib} option}
261 @opindex --width@r{, @code{msgattrib} option}
262 Set the output page width. Long strings in the output files will be
263 split across multiple lines in order to ensure that each line's width
264 (= number of screen columns) is less or equal to the given @var{number}.
267 @opindex --no-wrap@r{, @code{msgattrib} option}
268 Do not break long message lines. Message lines whose width exceeds the
269 output page width will not be split into several lines. Only file reference
270 lines which are wider than the output page width will be split.
274 @opindex -s@r{, @code{msgattrib} option}
275 @opindex --sort-output@r{, @code{msgattrib} option}
276 Generate sorted output. Note that using this option makes it much harder
277 for the translator to understand each message's context.
280 @itemx --sort-by-file
281 @opindex -F@r{, @code{msgattrib} option}
282 @opindex --sort-by-file@r{, @code{msgattrib} option}
283 Sort output by file location.
287 @subsection Informative output
292 @opindex -h@r{, @code{msgattrib} option}
293 @opindex --help@r{, @code{msgattrib} option}
294 Display this help and exit.
298 @opindex -V@r{, @code{msgattrib} option}
299 @opindex --version@r{, @code{msgattrib} option}
300 Output version information and exit.