xref: /netbsd-src/external/gpl2/gettext/dist/gettext-tools/doc/msgattrib.texi (revision 946379e7b37692fc43f68eb0d1c10daa0a7f3b6c)
1*946379e7Schristos@pindex msgattrib
2*946379e7Schristos@cindex @code{msgattrib} program, usage
3*946379e7Schristos@example
4*946379e7Schristosmsgattrib [@var{option}] [@var{inputfile}]
5*946379e7Schristos@end example
6*946379e7Schristos
7*946379e7Schristos@cindex filter messages according to attributes
8*946379e7Schristos@cindex attribute manipulation
9*946379e7SchristosThe @code{msgattrib} program filters the messages of a translation catalog
10*946379e7Schristosaccording to their attributes, and manipulates the attributes.
11*946379e7Schristos
12*946379e7Schristos@subsection Input file location
13*946379e7Schristos
14*946379e7Schristos@table @samp
15*946379e7Schristos@item @var{inputfile}
16*946379e7SchristosInput PO file.
17*946379e7Schristos
18*946379e7Schristos@item -D @var{directory}
19*946379e7Schristos@itemx --directory=@var{directory}
20*946379e7Schristos@opindex -D@r{, @code{msgattrib} option}
21*946379e7Schristos@opindex --directory@r{, @code{msgattrib} option}
22*946379e7SchristosAdd @var{directory} to the list of directories.  Source files are
23*946379e7Schristossearched relative to this list of directories.  The resulting @file{.po}
24*946379e7Schristosfile will be written relative to the current directory, though.
25*946379e7Schristos
26*946379e7Schristos@end table
27*946379e7Schristos
28*946379e7SchristosIf no @var{inputfile} is given or if it is @samp{-}, standard input is read.
29*946379e7Schristos
30*946379e7Schristos@subsection Output file location
31*946379e7Schristos
32*946379e7Schristos@table @samp
33*946379e7Schristos@item -o @var{file}
34*946379e7Schristos@itemx --output-file=@var{file}
35*946379e7Schristos@opindex -o@r{, @code{msgattrib} option}
36*946379e7Schristos@opindex --output-file@r{, @code{msgattrib} option}
37*946379e7SchristosWrite output to specified file.
38*946379e7Schristos
39*946379e7Schristos@end table
40*946379e7Schristos
41*946379e7SchristosThe results are written to standard output if no output file is specified
42*946379e7Schristosor if it is @samp{-}.
43*946379e7Schristos
44*946379e7Schristos@subsection Message selection
45*946379e7Schristos
46*946379e7Schristos@table @samp
47*946379e7Schristos@item --translated
48*946379e7Schristos@opindex --translated@r{, @code{msgattrib} option}
49*946379e7SchristosKeep translated messages, remove untranslated messages.
50*946379e7Schristos
51*946379e7Schristos@item --untranslated
52*946379e7Schristos@opindex --untranslated@r{, @code{msgattrib} option}
53*946379e7SchristosKeep untranslated messages, remove translated messages.
54*946379e7Schristos
55*946379e7Schristos@item --no-fuzzy
56*946379e7Schristos@opindex --no-fuzzy@r{, @code{msgattrib} option}
57*946379e7SchristosRemove
58*946379e7Schristos@ifhtml
59*946379e7Schristos‘fuzzy’
60*946379e7Schristos@end ifhtml
61*946379e7Schristos@ifnothtml
62*946379e7Schristos`fuzzy'
63*946379e7Schristos@end ifnothtml
64*946379e7Schristosmarked messages.
65*946379e7Schristos
66*946379e7Schristos@item --only-fuzzy
67*946379e7Schristos@opindex --only-fuzzy@r{, @code{msgattrib} option}
68*946379e7SchristosKeep
69*946379e7Schristos@ifhtml
70*946379e7Schristos‘fuzzy’
71*946379e7Schristos@end ifhtml
72*946379e7Schristos@ifnothtml
73*946379e7Schristos`fuzzy'
74*946379e7Schristos@end ifnothtml
75*946379e7Schristosmarked messages, remove all other messages.
76*946379e7Schristos
77*946379e7Schristos@item --no-obsolete
78*946379e7Schristos@opindex --no-obsolete@r{, @code{msgattrib} option}
79*946379e7SchristosRemove obsolete #~ messages.
80*946379e7Schristos
81*946379e7Schristos@item --only-obsolete
82*946379e7Schristos@opindex --only-obsolete@r{, @code{msgattrib} option}
83*946379e7SchristosKeep obsolete #~ messages, remove all other messages.
84*946379e7Schristos
85*946379e7Schristos@end table
86*946379e7Schristos
87*946379e7Schristos@subsection Attribute manipulation
88*946379e7Schristos
89*946379e7Schristos@cindex modify message attributes
90*946379e7SchristosAttributes are modified after the message selection/removal has been
91*946379e7Schristosperformed.  If the @samp{--only-file} or @samp{--ignore-file} option is
92*946379e7Schristosspecified, the attribute modification is applied only to those messages
93*946379e7Schristosthat are listed in the @var{only-file} and not listed in the
94*946379e7Schristos@var{ignore-file}.
95*946379e7Schristos
96*946379e7Schristos@table @samp
97*946379e7Schristos@item --set-fuzzy
98*946379e7Schristos@opindex --set-fuzzy@r{, @code{msgattrib} option}
99*946379e7SchristosSet all messages
100*946379e7Schristos@ifhtml
101*946379e7Schristos‘fuzzy’.
102*946379e7Schristos@end ifhtml
103*946379e7Schristos@ifnothtml
104*946379e7Schristos`fuzzy'.
105*946379e7Schristos@end ifnothtml
106*946379e7Schristos
107*946379e7Schristos@item --clear-fuzzy
108*946379e7Schristos@opindex --clear-fuzzy@r{, @code{msgattrib} option}
109*946379e7SchristosSet all messages
110*946379e7Schristos@ifhtml
111*946379e7Schristosnon-‘fuzzy’.
112*946379e7Schristos@end ifhtml
113*946379e7Schristos@ifnothtml
114*946379e7Schristosnon-`fuzzy'.
115*946379e7Schristos@end ifnothtml
116*946379e7Schristos
117*946379e7Schristos@item --set-obsolete
118*946379e7Schristos@opindex --set-obsolete@r{, @code{msgattrib} option}
119*946379e7SchristosSet all messages obsolete.
120*946379e7Schristos
121*946379e7Schristos@item --clear-obsolete
122*946379e7Schristos@opindex --clear-obsolete@r{, @code{msgattrib} option}
123*946379e7SchristosSet all messages non-obsolete.
124*946379e7Schristos
125*946379e7Schristos@item --clear-previous
126*946379e7Schristos@opindex --clear-previous@r{, @code{msgattrib} option}
127*946379e7SchristosRemove the ``previous msgid'' (@samp{#|}) comments from all messages.
128*946379e7Schristos
129*946379e7Schristos@item --only-file=@var{file}
130*946379e7Schristos@opindex --only-file@r{, @code{msgattrib} option}
131*946379e7SchristosLimit the attribute changes to entries that are listed in @var{file}.
132*946379e7Schristos@var{file} should be a PO or POT file.
133*946379e7Schristos
134*946379e7Schristos@item --ignore-file=@var{file}
135*946379e7Schristos@opindex --ignore-file@r{, @code{msgattrib} option}
136*946379e7SchristosLimit the attribute changes to entries that are not listed in @var{file}.
137*946379e7Schristos@var{file} should be a PO or POT file.
138*946379e7Schristos
139*946379e7Schristos@item --fuzzy
140*946379e7Schristos@opindex --fuzzy@r{, @code{msgattrib} option}
141*946379e7SchristosSynonym for @samp{--only-fuzzy --clear-fuzzy}: It keeps only the fuzzy
142*946379e7Schristosmessages and removes their
143*946379e7Schristos@ifhtml
144*946379e7Schristos‘fuzzy’
145*946379e7Schristos@end ifhtml
146*946379e7Schristos@ifnothtml
147*946379e7Schristos`fuzzy'
148*946379e7Schristos@end ifnothtml
149*946379e7Schristosmark.
150*946379e7Schristos
151*946379e7Schristos@item --obsolete
152*946379e7Schristos@opindex --obsolete@r{, @code{msgattrib} option}
153*946379e7SchristosSynonym for @samp{--only-obsolete --clear-obsolete}: It keeps only the
154*946379e7Schristosobsolete messages and makes them non-obsolete.
155*946379e7Schristos
156*946379e7Schristos@end table
157*946379e7Schristos
158*946379e7Schristos@subsection Input file syntax
159*946379e7Schristos
160*946379e7Schristos@table @samp
161*946379e7Schristos@item -P
162*946379e7Schristos@itemx --properties-input
163*946379e7Schristos@opindex -P@r{, @code{msgattrib} option}
164*946379e7Schristos@opindex --properties-input@r{, @code{msgattrib} option}
165*946379e7SchristosAssume the input file is a Java ResourceBundle in Java @code{.properties}
166*946379e7Schristossyntax, not in PO file syntax.
167*946379e7Schristos
168*946379e7Schristos@item --stringtable-input
169*946379e7Schristos@opindex --stringtable-input@r{, @code{msgattrib} option}
170*946379e7SchristosAssume the input file is a NeXTstep/GNUstep localized resource file in
171*946379e7Schristos@code{.strings} syntax, not in PO file syntax.
172*946379e7Schristos
173*946379e7Schristos@end table
174*946379e7Schristos
175*946379e7Schristos@subsection Output details
176*946379e7Schristos
177*946379e7Schristos@c --no-escape and --escape omitted on purpose.  They are not useful.
178*946379e7Schristos
179*946379e7Schristos@table @samp
180*946379e7Schristos@item --force-po
181*946379e7Schristos@opindex --force-po@r{, @code{msgattrib} option}
182*946379e7SchristosAlways write an output file even if it contains no message.
183*946379e7Schristos
184*946379e7Schristos@item -i
185*946379e7Schristos@itemx --indent
186*946379e7Schristos@opindex -i@r{, @code{msgattrib} option}
187*946379e7Schristos@opindex --indent@r{, @code{msgattrib} option}
188*946379e7SchristosWrite the .po file using indented style.
189*946379e7Schristos
190*946379e7Schristos@item --no-location
191*946379e7Schristos@opindex --no-location@r{, @code{msgattrib} option}
192*946379e7SchristosDo not write @samp{#: @var{filename}:@var{line}} lines.
193*946379e7Schristos
194*946379e7Schristos@item -n
195*946379e7Schristos@itemx --add-location
196*946379e7Schristos@opindex -n@r{, @code{msgattrib} option}
197*946379e7Schristos@opindex --add-location@r{, @code{msgattrib} option}
198*946379e7SchristosGenerate @samp{#: @var{filename}:@var{line}} lines (default).
199*946379e7Schristos
200*946379e7Schristos@item --strict
201*946379e7Schristos@opindex --strict@r{, @code{msgattrib} option}
202*946379e7SchristosWrite out a strict Uniforum conforming PO file.  Note that this
203*946379e7SchristosUniforum format should be avoided because it doesn't support the
204*946379e7SchristosGNU extensions.
205*946379e7Schristos
206*946379e7Schristos@item -p
207*946379e7Schristos@itemx --properties-output
208*946379e7Schristos@opindex -p@r{, @code{msgattrib} option}
209*946379e7Schristos@opindex --properties-output@r{, @code{msgattrib} option}
210*946379e7SchristosWrite out a Java ResourceBundle in Java @code{.properties} syntax.  Note
211*946379e7Schristosthat this file format doesn't support plural forms and silently drops
212*946379e7Schristosobsolete messages.
213*946379e7Schristos
214*946379e7Schristos@item --stringtable-output
215*946379e7Schristos@opindex --stringtable-output@r{, @code{msgattrib} option}
216*946379e7SchristosWrite out a NeXTstep/GNUstep localized resource file in @code{.strings} syntax.
217*946379e7SchristosNote that this file format doesn't support plural forms.
218*946379e7Schristos
219*946379e7Schristos@item -w @var{number}
220*946379e7Schristos@itemx --width=@var{number}
221*946379e7Schristos@opindex -w@r{, @code{msgattrib} option}
222*946379e7Schristos@opindex --width@r{, @code{msgattrib} option}
223*946379e7SchristosSet the output page width.  Long strings in the output files will be
224*946379e7Schristossplit across multiple lines in order to ensure that each line's width
225*946379e7Schristos(= number of screen columns) is less or equal to the given @var{number}.
226*946379e7Schristos
227*946379e7Schristos@item --no-wrap
228*946379e7Schristos@opindex --no-wrap@r{, @code{msgattrib} option}
229*946379e7SchristosDo not break long message lines.  Message lines whose width exceeds the
230*946379e7Schristosoutput page width will not be split into several lines.  Only file reference
231*946379e7Schristoslines which are wider than the output page width will be split.
232*946379e7Schristos
233*946379e7Schristos@item -s
234*946379e7Schristos@itemx --sort-output
235*946379e7Schristos@opindex -s@r{, @code{msgattrib} option}
236*946379e7Schristos@opindex --sort-output@r{, @code{msgattrib} option}
237*946379e7SchristosGenerate sorted output.  Note that using this option makes it much harder
238*946379e7Schristosfor the translator to understand each message's context.
239*946379e7Schristos
240*946379e7Schristos@item -F
241*946379e7Schristos@itemx --sort-by-file
242*946379e7Schristos@opindex -F@r{, @code{msgattrib} option}
243*946379e7Schristos@opindex --sort-by-file@r{, @code{msgattrib} option}
244*946379e7SchristosSort output by file location.
245*946379e7Schristos
246*946379e7Schristos@end table
247*946379e7Schristos
248*946379e7Schristos@subsection Informative output
249*946379e7Schristos
250*946379e7Schristos@table @samp
251*946379e7Schristos@item -h
252*946379e7Schristos@itemx --help
253*946379e7Schristos@opindex -h@r{, @code{msgattrib} option}
254*946379e7Schristos@opindex --help@r{, @code{msgattrib} option}
255*946379e7SchristosDisplay this help and exit.
256*946379e7Schristos
257*946379e7Schristos@item -V
258*946379e7Schristos@itemx --version
259*946379e7Schristos@opindex -V@r{, @code{msgattrib} option}
260*946379e7Schristos@opindex --version@r{, @code{msgattrib} option}
261*946379e7SchristosOutput version information and exit.
262*946379e7Schristos
263*946379e7Schristos@end table
264