Imported Upstream version 0.18.3.2
[platform/upstream/gettext.git] / gettext-tools / doc / msgattrib.texi
1 @pindex msgattrib
2 @cindex @code{msgattrib} program, usage
3 @example
4 msgattrib [@var{option}] [@var{inputfile}]
5 @end example
6
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.
11
12 @subsection Input file location
13
14 @table @samp
15 @item @var{inputfile}
16 Input PO file.
17
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.
25
26 @end table
27
28 If no @var{inputfile} is given or if it is @samp{-}, standard input is read.
29
30 @subsection Output file location
31
32 @table @samp
33 @item -o @var{file}
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.
38
39 @end table
40
41 The results are written to standard output if no output file is specified
42 or if it is @samp{-}.
43
44 @subsection Message selection
45
46 @table @samp
47 @item --translated
48 @opindex --translated@r{, @code{msgattrib} option}
49 Keep translated messages, remove untranslated messages.
50
51 @item --untranslated
52 @opindex --untranslated@r{, @code{msgattrib} option}
53 Keep untranslated messages, remove translated messages.
54
55 @item --no-fuzzy
56 @opindex --no-fuzzy@r{, @code{msgattrib} option}
57 Remove
58 @ifhtml
59 ‘fuzzy’
60 @end ifhtml
61 @ifnothtml
62 `fuzzy'
63 @end ifnothtml
64 marked messages.
65
66 @item --only-fuzzy
67 @opindex --only-fuzzy@r{, @code{msgattrib} option}
68 Keep
69 @ifhtml
70 ‘fuzzy’
71 @end ifhtml
72 @ifnothtml
73 `fuzzy'
74 @end ifnothtml
75 marked messages, remove all other messages.
76
77 @item --no-obsolete
78 @opindex --no-obsolete@r{, @code{msgattrib} option}
79 Remove obsolete #~ messages.
80
81 @item --only-obsolete
82 @opindex --only-obsolete@r{, @code{msgattrib} option}
83 Keep obsolete #~ messages, remove all other messages.
84
85 @end table
86
87 @subsection Attribute manipulation
88
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
94 @var{ignore-file}.
95
96 @table @samp
97 @item --set-fuzzy
98 @opindex --set-fuzzy@r{, @code{msgattrib} option}
99 Set all messages
100 @ifhtml
101 ‘fuzzy’.
102 @end ifhtml
103 @ifnothtml
104 `fuzzy'.
105 @end ifnothtml
106
107 @item --clear-fuzzy
108 @opindex --clear-fuzzy@r{, @code{msgattrib} option}
109 Set all messages
110 @ifhtml
111 non-‘fuzzy’.
112 @end ifhtml
113 @ifnothtml
114 non-`fuzzy'.
115 @end ifnothtml
116
117 @item --set-obsolete
118 @opindex --set-obsolete@r{, @code{msgattrib} option}
119 Set all messages obsolete.
120
121 @item --clear-obsolete
122 @opindex --clear-obsolete@r{, @code{msgattrib} option}
123 Set all messages non-obsolete.
124
125 @item --previous
126 @opindex --previous@r{, @code{msgattrib} option}
127 When setting
128 @ifhtml
129 ‘fuzzy’
130 @end ifhtml
131 @ifnothtml
132 `fuzzy'
133 @end ifnothtml
134 mark, keep ``previous msgid'' of translated messages.
135
136 @item --clear-previous
137 @opindex --clear-previous@r{, @code{msgattrib} option}
138 Remove the ``previous msgid'' (@samp{#|}) comments from all messages.
139
140 @item --only-file=@var{file}
141 @opindex --only-file@r{, @code{msgattrib} option}
142 Limit the attribute changes to entries that are listed in @var{file}.
143 @var{file} should be a PO or POT file.
144
145 @item --ignore-file=@var{file}
146 @opindex --ignore-file@r{, @code{msgattrib} option}
147 Limit the attribute changes to entries that are not listed in @var{file}.
148 @var{file} should be a PO or POT file.
149
150 @item --fuzzy
151 @opindex --fuzzy@r{, @code{msgattrib} option}
152 Synonym for @samp{--only-fuzzy --clear-fuzzy}: It keeps only the fuzzy
153 messages and removes their
154 @ifhtml
155 ‘fuzzy’
156 @end ifhtml
157 @ifnothtml
158 `fuzzy'
159 @end ifnothtml
160 mark.
161
162 @item --obsolete
163 @opindex --obsolete@r{, @code{msgattrib} option}
164 Synonym for @samp{--only-obsolete --clear-obsolete}: It keeps only the
165 obsolete messages and makes them non-obsolete.
166
167 @end table
168
169 @subsection Input file syntax
170
171 @table @samp
172 @item -P
173 @itemx --properties-input
174 @opindex -P@r{, @code{msgattrib} option}
175 @opindex --properties-input@r{, @code{msgattrib} option}
176 Assume the input file is a Java ResourceBundle in Java @code{.properties}
177 syntax, not in PO file syntax.
178
179 @item --stringtable-input
180 @opindex --stringtable-input@r{, @code{msgattrib} option}
181 Assume the input file is a NeXTstep/GNUstep localized resource file in
182 @code{.strings} syntax, not in PO file syntax.
183
184 @end table
185
186 @subsection Output details
187
188 @c --no-escape and --escape omitted on purpose.  They are not useful.
189
190 @table @samp
191 @item --color
192 @itemx --color=@var{when}
193 @opindex --color@r{, @code{msgattrib} option}
194 Specify whether or when to use colors and other text attributes.
195 See @ref{The --color option} for details.
196
197 @item --style=@var{style_file}
198 @opindex --style@r{, @code{msgattrib} option}
199 Specify the CSS style rule file to use for @code{--color}.
200 See @ref{The --style option} for details.
201
202 @item --force-po
203 @opindex --force-po@r{, @code{msgattrib} option}
204 Always write an output file even if it contains no message.
205
206 @item -i
207 @itemx --indent
208 @opindex -i@r{, @code{msgattrib} option}
209 @opindex --indent@r{, @code{msgattrib} option}
210 Write the .po file using indented style.
211
212 @item --no-location
213 @opindex --no-location@r{, @code{msgattrib} option}
214 Do not write @samp{#: @var{filename}:@var{line}} lines.
215
216 @item -n
217 @itemx --add-location
218 @opindex -n@r{, @code{msgattrib} option}
219 @opindex --add-location@r{, @code{msgattrib} option}
220 Generate @samp{#: @var{filename}:@var{line}} lines (default).
221
222 @item --strict
223 @opindex --strict@r{, @code{msgattrib} option}
224 Write out a strict Uniforum conforming PO file.  Note that this
225 Uniforum format should be avoided because it doesn't support the
226 GNU extensions.
227
228 @item -p
229 @itemx --properties-output
230 @opindex -p@r{, @code{msgattrib} option}
231 @opindex --properties-output@r{, @code{msgattrib} option}
232 Write out a Java ResourceBundle in Java @code{.properties} syntax.  Note
233 that this file format doesn't support plural forms and silently drops
234 obsolete messages.
235
236 @item --stringtable-output
237 @opindex --stringtable-output@r{, @code{msgattrib} option}
238 Write out a NeXTstep/GNUstep localized resource file in @code{.strings} syntax.
239 Note that this file format doesn't support plural forms.
240
241 @item -w @var{number}
242 @itemx --width=@var{number}
243 @opindex -w@r{, @code{msgattrib} option}
244 @opindex --width@r{, @code{msgattrib} option}
245 Set the output page width.  Long strings in the output files will be
246 split across multiple lines in order to ensure that each line's width
247 (= number of screen columns) is less or equal to the given @var{number}.
248
249 @item --no-wrap
250 @opindex --no-wrap@r{, @code{msgattrib} option}
251 Do not break long message lines.  Message lines whose width exceeds the
252 output page width will not be split into several lines.  Only file reference
253 lines which are wider than the output page width will be split.
254
255 @item -s
256 @itemx --sort-output
257 @opindex -s@r{, @code{msgattrib} option}
258 @opindex --sort-output@r{, @code{msgattrib} option}
259 Generate sorted output.  Note that using this option makes it much harder
260 for the translator to understand each message's context.
261
262 @item -F
263 @itemx --sort-by-file
264 @opindex -F@r{, @code{msgattrib} option}
265 @opindex --sort-by-file@r{, @code{msgattrib} option}
266 Sort output by file location.
267
268 @end table
269
270 @subsection Informative output
271
272 @table @samp
273 @item -h
274 @itemx --help
275 @opindex -h@r{, @code{msgattrib} option}
276 @opindex --help@r{, @code{msgattrib} option}
277 Display this help and exit.
278
279 @item -V
280 @itemx --version
281 @opindex -V@r{, @code{msgattrib} option}
282 @opindex --version@r{, @code{msgattrib} option}
283 Output version information and exit.
284
285 @end table