Add -lm dependency for gettextlib to fix LTO build
[platform/upstream/gettext.git] / gettext-tools / man / xgettext.1.html
1 <!-- Creator     : groff version 1.22.3 -->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
3 "http://www.w3.org/TR/html4/loose.dtd">
4 <html>
5 <head>
6 <meta name="generator" content="groff -Thtml, see www.gnu.org">
7 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
8 <meta name="Content-Style" content="text/css">
9 <style type="text/css">
10        p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
11        pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
12        table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
13        h1      { text-align: center }
14 </style>
15 <title>XGETTEXT</title>
16
17 </head>
18 <body>
19
20 <h1 align="center">XGETTEXT</h1>
21
22 <a href="#NAME">NAME</a><br>
23 <a href="#SYNOPSIS">SYNOPSIS</a><br>
24 <a href="#DESCRIPTION">DESCRIPTION</a><br>
25 <a href="#AUTHOR">AUTHOR</a><br>
26 <a href="#REPORTING BUGS">REPORTING BUGS</a><br>
27 <a href="#COPYRIGHT">COPYRIGHT</a><br>
28 <a href="#SEE ALSO">SEE ALSO</a><br>
29
30 <hr>
31
32
33 <h2>NAME
34 <a name="NAME"></a>
35 </h2>
36
37
38 <p style="margin-left:11%; margin-top: 1em">xgettext
39 &minus; extract gettext strings from source</p>
40
41 <h2>SYNOPSIS
42 <a name="SYNOPSIS"></a>
43 </h2>
44
45
46
47 <p style="margin-left:11%; margin-top: 1em"><b>xgettext</b>
48 [<i>OPTION</i>] [<i>INPUTFILE</i>]...</p>
49
50 <h2>DESCRIPTION
51 <a name="DESCRIPTION"></a>
52 </h2>
53
54
55 <p style="margin-left:11%; margin-top: 1em">Extract
56 translatable strings from given input files.</p>
57
58 <p style="margin-left:11%; margin-top: 1em">Mandatory
59 arguments to long options are mandatory for short options
60 too. Similarly for optional arguments.</p>
61
62 <p style="margin-left:11%; margin-top: 1em"><b>Input file
63 location:</b> <br>
64 INPUTFILE ...</p>
65
66 <p style="margin-left:22%;">input files</p>
67
68 <p style="margin-left:11%;"><b>&minus;f</b>,
69 <b>&minus;&minus;files&minus;from</b>=<i>FILE</i></p>
70
71 <p style="margin-left:22%;">get list of input files from
72 FILE</p>
73
74 <p style="margin-left:11%;"><b>&minus;D</b>,
75 <b>&minus;&minus;directory</b>=<i>DIRECTORY</i></p>
76
77 <p style="margin-left:22%;">add DIRECTORY to list for input
78 files search</p>
79
80 <p style="margin-left:11%; margin-top: 1em">If input file
81 is -, standard input is read.</p>
82
83 <p style="margin-left:11%; margin-top: 1em"><b>Output file
84 location: <br>
85 &minus;d</b>,
86 <b>&minus;&minus;default&minus;domain</b>=<i>NAME</i></p>
87
88 <p style="margin-left:22%;">use NAME.po for output (instead
89 of messages.po)</p>
90
91 <p style="margin-left:11%;"><b>&minus;o</b>,
92 <b>&minus;&minus;output</b>=<i>FILE</i></p>
93
94 <p style="margin-left:22%;">write output to specified
95 file</p>
96
97 <p style="margin-left:11%;"><b>&minus;p</b>,
98 <b>&minus;&minus;output&minus;dir</b>=<i>DIR</i></p>
99
100 <p style="margin-left:22%;">output files will be placed in
101 directory DIR</p>
102
103 <p style="margin-left:11%; margin-top: 1em">If output file
104 is -, output is written to standard output.</p>
105
106 <p style="margin-left:11%; margin-top: 1em"><b>Choice of
107 input file language: <br>
108 &minus;L</b>, <b>&minus;&minus;language</b>=<i>NAME</i></p>
109
110 <p style="margin-left:22%;">recognise the specified
111 language (C, C++, ObjectiveC, PO, Shell, Python, Lisp,
112 EmacsLisp, librep, Scheme, Smalltalk, Java, JavaProperties,
113 C#, awk, YCP, Tcl, Perl, PHP, GCC-source, NXStringTable,
114 RST, Glade, Lua, JavaScript, Vala, Desktop)</p>
115
116 <p style="margin-left:11%;"><b>&minus;C</b>,
117 <b>&minus;&minus;c</b>++</p>
118
119 <p style="margin-left:22%;">shorthand for
120 <b>&minus;&minus;language</b>=<i>C</i>++</p>
121
122 <p style="margin-left:11%; margin-top: 1em">By default the
123 language is guessed depending on the input file name
124 extension.</p>
125
126 <p style="margin-left:11%; margin-top: 1em"><b>Input file
127 interpretation: <br>
128 &minus;&minus;from&minus;code</b>=<i>NAME</i></p>
129
130 <p style="margin-left:22%;">encoding of input files (except
131 for Python, Tcl, Glade)</p>
132
133 <p style="margin-left:11%; margin-top: 1em">By default the
134 input files are assumed to be in ASCII.</p>
135
136 <p style="margin-left:11%; margin-top: 1em"><b>Operation
137 mode: <br>
138 &minus;j</b>, <b>&minus;&minus;join&minus;existing</b></p>
139
140 <p style="margin-left:22%;">join messages with existing
141 file</p>
142
143 <p style="margin-left:11%;"><b>&minus;x</b>,
144 <b>&minus;&minus;exclude&minus;file</b>=<i>FILE</i>.po</p>
145
146 <p style="margin-left:22%;">entries from FILE.po are not
147 extracted</p>
148
149 <p style="margin-left:11%;"><b>&minus;cTAG</b>,
150 <b>&minus;&minus;add&minus;comments</b>=<i>TAG</i></p>
151
152 <p style="margin-left:22%;">place comment blocks starting
153 with TAG and preceding keyword lines in output file</p>
154
155 <p style="margin-left:11%;"><b>&minus;c</b>,
156 <b>&minus;&minus;add&minus;comments</b></p>
157
158 <p style="margin-left:22%;">place all comment blocks
159 preceding keyword lines in output file</p>
160
161
162 <p style="margin-left:11%;"><b>&minus;&minus;check</b>=<i>NAME</i></p>
163
164 <p style="margin-left:22%;">perform syntax check on
165 messages (ellipsis-unicode, space-ellipsis,</p>
166
167
168 <p style="margin-left:22%; margin-top: 1em">quote-unicode)</p>
169
170
171 <p style="margin-left:11%;"><b>&minus;&minus;sentence&minus;end</b>=<i>TYPE</i></p>
172
173 <p style="margin-left:22%;">type describing the end of
174 sentence (single-space, which is the default,</p>
175
176 <p style="margin-left:22%; margin-top: 1em">or
177 double-space)</p>
178
179 <p style="margin-left:11%; margin-top: 1em"><b>Language
180 specific options: <br>
181 &minus;a</b>, <b>&minus;&minus;extract&minus;all</b></p>
182
183 <p style="margin-left:22%;">extract all strings (only
184 languages C, C++, ObjectiveC, Shell, Python, Lisp,
185 EmacsLisp, librep, Scheme, Java, C#, awk, Tcl, Perl, PHP,
186 GCC-source, Glade, Lua, JavaScript, Vala)</p>
187
188 <p style="margin-left:11%;"><b>&minus;kWORD</b>,
189 <b>&minus;&minus;keyword</b>=<i>WORD</i></p>
190
191 <p style="margin-left:22%;">look for WORD as an additional
192 keyword</p>
193
194 <p style="margin-left:11%;"><b>&minus;k</b>,
195 <b>&minus;&minus;keyword</b></p>
196
197 <p style="margin-left:22%;">do not to use default keywords
198 (only languages C, C++, ObjectiveC, Shell, Python, Lisp,
199 EmacsLisp, librep, Scheme, Java, C#, awk, Tcl, Perl, PHP,
200 GCC-source, Glade, Lua, JavaScript, Vala, Desktop)</p>
201
202
203 <p style="margin-left:11%;"><b>&minus;&minus;flag</b>=<i>WORD</i>:ARG:FLAG</p>
204
205 <p style="margin-left:22%;">additional flag for strings
206 inside the argument number ARG of keyword WORD</p>
207
208 <p style="margin-left:22%; margin-top: 1em">(only languages
209 C, C++, ObjectiveC, Shell, Python, Lisp, EmacsLisp, librep,
210 Scheme, Java, C#, awk, YCP, Tcl, Perl, PHP, GCC-source, Lua,
211 JavaScript, Vala)</p>
212
213 <p style="margin-left:11%;"><b>&minus;T</b>,
214 <b>&minus;&minus;trigraphs</b></p>
215
216 <p style="margin-left:22%;">understand ANSI C trigraphs for
217 input (only languages C, C++, ObjectiveC)</p>
218
219 <table width="100%" border="0" rules="none" frame="void"
220        cellspacing="0" cellpadding="0">
221 <tr valign="top" align="left">
222 <td width="11%"></td>
223 <td width="7%">
224
225
226 <p><b>&minus;&minus;qt</b></p></td>
227 <td width="4%"></td>
228 <td width="76%">
229
230
231 <p>recognize Qt format strings (only language C++)</p></td>
232 <td width="2%">
233 </td></tr>
234 <tr valign="top" align="left">
235 <td width="11%"></td>
236 <td width="7%">
237
238
239 <p><b>&minus;&minus;kde</b></p></td>
240 <td width="4%"></td>
241 <td width="76%">
242
243
244 <p>recognize KDE 4 format strings (only language C++)</p></td>
245 <td width="2%">
246 </td></tr>
247 </table>
248
249 <p style="margin-left:11%;"><b>&minus;&minus;boost</b></p>
250
251 <p style="margin-left:22%;">recognize Boost format strings
252 (only language C++)</p>
253
254 <p style="margin-left:11%;"><b>&minus;&minus;debug</b></p>
255
256 <p style="margin-left:22%;">more detailed formatstring
257 recognition result</p>
258
259 <p style="margin-left:11%; margin-top: 1em"><b>Output
260 details: <br>
261 &minus;&minus;color</b></p>
262
263 <p style="margin-left:22%;">use colors and other text
264 attributes always</p>
265
266
267 <p style="margin-left:11%;"><b>&minus;&minus;color</b>=<i>WHEN</i></p>
268
269 <p style="margin-left:22%;">use colors and other text
270 attributes if WHEN. WHEN may be &rsquo;always&rsquo;,
271 &rsquo;never&rsquo;, &rsquo;auto&rsquo;, or
272 &rsquo;html&rsquo;.</p>
273
274
275 <p style="margin-left:11%;"><b>&minus;&minus;style</b>=<i>STYLEFILE</i></p>
276
277 <p style="margin-left:22%;">specify CSS style rule file for
278 <b>&minus;&minus;color</b></p>
279
280 <p style="margin-left:11%;"><b>&minus;e</b>,
281 <b>&minus;&minus;no&minus;escape</b></p>
282
283 <p style="margin-left:22%;">do not use C escapes in output
284 (default)</p>
285
286 <p style="margin-left:11%;"><b>&minus;E</b>,
287 <b>&minus;&minus;escape</b></p>
288
289 <p style="margin-left:22%;">use C escapes in output, no
290 extended chars</p>
291
292
293 <p style="margin-left:11%;"><b>&minus;&minus;force&minus;po</b></p>
294
295 <p style="margin-left:22%;">write PO file even if empty</p>
296
297 <p style="margin-left:11%;"><b>&minus;i</b>,
298 <b>&minus;&minus;indent</b></p>
299
300 <p style="margin-left:22%;">write the .po file using
301 indented style</p>
302
303
304 <p style="margin-left:11%;"><b>&minus;&minus;no&minus;location</b></p>
305
306 <p style="margin-left:22%;">do not write &rsquo;#:
307 filename:line&rsquo; lines</p>
308
309 <p style="margin-left:11%;"><b>&minus;n</b>,
310 <b>&minus;&minus;add&minus;location</b></p>
311
312 <p style="margin-left:22%;">generate &rsquo;#:
313 filename:line&rsquo; lines (default)</p>
314
315
316 <p style="margin-left:11%;"><b>&minus;&minus;strict</b></p>
317
318 <p style="margin-left:22%;">write out strict Uniforum
319 conforming .po file</p>
320
321
322 <p style="margin-left:11%;"><b>&minus;&minus;properties&minus;output</b></p>
323
324 <p style="margin-left:22%;">write out a Java .properties
325 file</p>
326
327
328 <p style="margin-left:11%;"><b>&minus;&minus;stringtable&minus;output</b></p>
329
330 <p style="margin-left:22%;">write out a NeXTstep/GNUstep
331 .strings file</p>
332
333
334 <p style="margin-left:11%;"><b>&minus;&minus;its</b>=<i>FILE</i></p>
335
336 <p style="margin-left:22%;">apply ITS rules from FILE</p>
337
338
339 <p style="margin-left:11%;"><b>&minus;&minus;itstool</b></p>
340
341 <p style="margin-left:22%;">write out itstool comments</p>
342
343 <p style="margin-left:11%;"><b>&minus;w</b>,
344 <b>&minus;&minus;width</b>=<i>NUMBER</i></p>
345
346 <p style="margin-left:22%;">set output page width</p>
347
348
349 <p style="margin-left:11%;"><b>&minus;&minus;no&minus;wrap</b></p>
350
351 <p style="margin-left:22%;">do not break long message
352 lines, longer than the output page width, into several
353 lines</p>
354
355 <p style="margin-left:11%;"><b>&minus;s</b>,
356 <b>&minus;&minus;sort&minus;output</b></p>
357
358 <p style="margin-left:22%;">generate sorted output</p>
359
360 <p style="margin-left:11%;"><b>&minus;F</b>,
361 <b>&minus;&minus;sort&minus;by&minus;file</b></p>
362
363 <p style="margin-left:22%;">sort output by file
364 location</p>
365
366
367 <p style="margin-left:11%;"><b>&minus;&minus;omit&minus;header</b></p>
368
369 <p style="margin-left:22%;">don&rsquo;t write header with
370 &rsquo;msgid &quot;&quot;&rsquo; entry</p>
371
372
373 <p style="margin-left:11%;"><b>&minus;&minus;copyright&minus;holder</b>=<i>STRING</i></p>
374
375 <p style="margin-left:22%;">set copyright holder in
376 output</p>
377
378
379 <p style="margin-left:11%;"><b>&minus;&minus;foreign&minus;user</b></p>
380
381 <p style="margin-left:22%;">omit FSF copyright in output
382 for foreign user</p>
383
384
385 <p style="margin-left:11%;"><b>&minus;&minus;package&minus;name</b>=<i>PACKAGE</i></p>
386
387 <p style="margin-left:22%;">set package name in output</p>
388
389
390 <p style="margin-left:11%;"><b>&minus;&minus;package&minus;version</b>=<i>VERSION</i></p>
391
392 <p style="margin-left:22%;">set package version in
393 output</p>
394
395
396 <p style="margin-left:11%;"><b>&minus;&minus;msgid&minus;bugs&minus;address</b>=<i>EMAIL</i>@ADDRESS</p>
397
398 <p style="margin-left:22%;">set report address for msgid
399 bugs</p>
400
401 <p style="margin-left:11%;"><b>&minus;m[STRING]</b>,
402 <b>&minus;&minus;msgstr&minus;prefix</b>[=<i>STRING</i>]</p>
403
404 <p style="margin-left:22%;">use STRING or &quot;&quot; as
405 prefix for msgstr values</p>
406
407 <p style="margin-left:11%;"><b>&minus;M[STRING]</b>,
408 <b>&minus;&minus;msgstr&minus;suffix</b>[=<i>STRING</i>]</p>
409
410 <p style="margin-left:22%;">use STRING or &quot;&quot; as
411 suffix for msgstr values</p>
412
413 <p style="margin-left:11%; margin-top: 1em"><b>Informative
414 output: <br>
415 &minus;h</b>, <b>&minus;&minus;help</b></p>
416
417 <p style="margin-left:22%;">display this help and exit</p>
418
419 <p style="margin-left:11%;"><b>&minus;V</b>,
420 <b>&minus;&minus;version</b></p>
421
422 <p style="margin-left:22%;">output version information and
423 exit</p>
424
425 <h2>AUTHOR
426 <a name="AUTHOR"></a>
427 </h2>
428
429
430 <p style="margin-left:11%; margin-top: 1em">Written by
431 Ulrich Drepper.</p>
432
433 <h2>REPORTING BUGS
434 <a name="REPORTING BUGS"></a>
435 </h2>
436
437
438 <p style="margin-left:11%; margin-top: 1em">Report bugs to
439 &lt;bug-gnu-gettext@gnu.org&gt;.</p>
440
441 <h2>COPYRIGHT
442 <a name="COPYRIGHT"></a>
443 </h2>
444
445
446 <p style="margin-left:11%; margin-top: 1em">Copyright
447 &copy; 1995-1998, 2000-2013 Free Software Foundation, Inc.
448 License GPLv3+: GNU GPL version 3 or later
449 &lt;http://gnu.org/licenses/gpl.html&gt; <br>
450 This is free software: you are free to change and
451 redistribute it. There is NO WARRANTY, to the extent
452 permitted by law.</p>
453
454 <h2>SEE ALSO
455 <a name="SEE ALSO"></a>
456 </h2>
457
458
459 <p style="margin-left:11%; margin-top: 1em">The full
460 documentation for <b>xgettext</b> is maintained as a Texinfo
461 manual. If the <b>info</b> and <b>xgettext</b> programs are
462 properly installed at your site, the command</p>
463
464 <p style="margin-left:22%; margin-top: 1em"><b>info
465 xgettext</b></p>
466
467 <p style="margin-left:11%; margin-top: 1em">should give you
468 access to the complete manual.</p>
469 <hr>
470 </body>
471 </html>