Debian Codegraph @

upstream/debian-unstable/man1/xgettext.1

raw
1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
2 .TH XGETTEXT "1" "July 2025" "GNU gettext-tools 0.26" "User Commands"
3 .SH NAME
4 xgettext \- extract gettext strings from source
5 .SH SYNOPSIS
6 .B xgettext
7 [\fI\,OPTION\/\fR] [\fI\,INPUTFILE\/\fR]...
8 .SH DESCRIPTION
9 .\" Add any additional description here
10 .PP
11 Extract translatable strings from given input files.
12 .PP
13 Mandatory arguments to long options are mandatory for short options too.
14 Similarly for optional arguments.
15 .SS "Input file location:"
16 .TP
17 INPUTFILE ...
18 input files
19 .TP
20 \fB\-f\fR, \fB\-\-files\-from\fR=\fI\,FILE\/\fR
21 get list of input files from FILE
22 .TP
23 \fB\-D\fR, \fB\-\-directory\fR=\fI\,DIRECTORY\/\fR
24 add DIRECTORY to list for input files search
25 .PP
26 If input file is \-, standard input is read.
27 .SS "Output file location:"
28 .TP
29 \fB\-d\fR, \fB\-\-default\-domain\fR=\fI\,NAME\/\fR
30 use NAME.po for output (instead of messages.po)
31 .TP
32 \fB\-o\fR, \fB\-\-output\fR=\fI\,FILE\/\fR
33 write output to specified file
34 .TP
35 \fB\-p\fR, \fB\-\-output\-dir\fR=\fI\,DIR\/\fR
36 output files will be placed in directory DIR
37 .PP
38 If output file is \-, output is written to standard output.
39 .SS "Choice of input file language:"
40 .TP
41 \fB\-L\fR, \fB\-\-language\fR=\fI\,NAME\/\fR
42 recognise the specified language
43 (C, C++, ObjectiveC, PO, Python, Java,
44 JavaProperties, C#, JavaScript, TypeScript, TSX,
45 Scheme, Guile, Lisp, EmacsLisp, librep, Rust,
46 Go, Ruby, Shell, awk, Lua, Modula\-2, D,
47 Smalltalk, Vala, Tcl, Perl, PHP, GCC\-source,
48 YCP, NXStringTable, RST, RSJ, Glade, GSettings,
49 Desktop)
50 .TP
51 \fB\-C\fR, \fB\-\-c\fR++
52 shorthand for \fB\-\-language\fR=\fI\,C\/\fR++
53 .PP
54 By default the language is guessed depending on the input file name extension.
55 .SS "Input file interpretation:"
56 .TP
57 \fB\-\-from\-code\fR=\fI\,NAME\/\fR
58 encoding of input files
59 (except for Python, Tcl, Glade)
60 .PP
61 By default the input files are assumed to be in ASCII.
62 .SS "Operation mode:"
63 .TP
64 \fB\-j\fR, \fB\-\-join\-existing\fR
65 join messages with existing file
66 .TP
67 \fB\-x\fR, \fB\-\-exclude\-file\fR=\fI\,FILE\/\fR.po
68 entries from FILE.po are not extracted
69 .TP
70 \fB\-cTAG\fR, \fB\-\-add\-comments\fR=\fI\,TAG\/\fR
71 place comment blocks starting with TAG and
72 preceding keyword lines in output file
73 .TP
74 \fB\-c\fR, \fB\-\-add\-comments\fR
75 place all comment blocks preceding keyword lines
76 in output file
77 .TP
78 \fB\-\-check\fR=\fI\,NAME\/\fR
79 perform syntax check on messages
80 (ellipsis\-unicode, space\-ellipsis,
81 .IP
82 quote\-unicode, bullet\-unicode)
83 .TP
84 \fB\-\-sentence\-end\fR=\fI\,TYPE\/\fR
85 type describing the end of sentence
86 (single\-space, which is the default,
87 .IP
88 or double\-space)
89 .SS "Language specific options:"
90 .TP
91 \fB\-a\fR, \fB\-\-extract\-all\fR
92 extract all strings
93 (only languages C, C++, ObjectiveC, Python,
94 Java, C#, JavaScript, TypeScript, TSX, Scheme,
95 Guile, Lisp, EmacsLisp, librep, Rust, Go, Shell,
96 awk, Lua, Modula\-2, D, Vala, Tcl, Perl, PHP,
97 GCC\-source, Glade, GSettings)
98 .TP
99 \fB\-kWORD\fR, \fB\-\-keyword\fR=\fI\,WORD\/\fR
100 look for WORD as an additional keyword
101 .TP
102 \fB\-k\fR, \fB\-\-keyword\fR
103 do not to use default keywords
104 (only languages C, C++, ObjectiveC, Python,
105 Java, C#, JavaScript, TypeScript, TSX, Scheme,
106 Guile, Lisp, EmacsLisp, librep, Rust, Go, Shell,
107 awk, Lua, Modula\-2, D, Vala, Tcl, Perl, PHP,
108 GCC\-source, Glade, GSettings, Desktop)
109 .TP
110 \fB\-\-flag\fR=\fI\,WORD\/\fR:ARG:FLAG
111 additional flag for strings inside the argument
112 number ARG of keyword WORD
113 .TP
114 (only languages C, C++, ObjectiveC, Python,
115 Java, C#, JavaScript, TypeScript, TSX, Scheme,
116 Guile, Lisp, EmacsLisp, librep, Rust, Go, Shell,
117 awk, Lua, Modula\-2, D, Vala, Tcl, Perl, PHP,
118 GCC\-source, YCP)
119 .TP
120 \fB\-\-tag\fR=\fI\,WORD\/\fR:FORMAT
121 defines the behaviour of tagged template literals
122 with tag WORD
123 .IP
124 (only language JavaScript)
125 .TP
126 \fB\-T\fR, \fB\-\-trigraphs\fR
127 understand ANSI C trigraphs for input
128 (deprecated; only languages C, C++, ObjectiveC)
129 .TP
130 \fB\-\-its\fR=\fI\,FILE\/\fR
131 apply ITS rules from FILE
132 (only XML based languages)
133 .TP
134 \fB\-\-qt\fR
135 recognize Qt format strings
136 (only language C++)
137 .TP
138 \fB\-\-kde\fR
139 recognize KDE 4 format strings
140 (only language C++)
141 .TP
142 \fB\-\-boost\fR
143 recognize Boost format strings
144 (only language C++)
145 .TP
146 \fB\-\-debug\fR
147 more detailed formatstring recognition result
148 .SS "Output details:"
149 .TP
150 \fB\-\-color\fR
151 use colors and other text attributes always
152 .TP
153 \fB\-\-color\fR=\fI\,WHEN\/\fR
154 use colors and other text attributes if WHEN.
155 WHEN may be 'always', 'never', 'auto', or 'html'.
156 .TP
157 \fB\-\-style\fR=\fI\,STYLEFILE\/\fR
158 specify CSS style rule file for \fB\-\-color\fR
159 .TP
160 \fB\-e\fR, \fB\-\-no\-escape\fR
161 do not use C escapes in output (default)
162 .TP
163 \fB\-E\fR, \fB\-\-escape\fR
164 use C escapes in output, no extended chars
165 .TP
166 \fB\-\-force\-po\fR
167 write PO file even if empty
168 .TP
169 \fB\-i\fR, \fB\-\-indent\fR
170 write the .po file using indented style
171 .TP
172 \fB\-\-no\-location\fR
173 do not write '#: filename:line' lines
174 .TP
175 \fB\-n\fR, \fB\-\-add\-location\fR
176 generate '#: filename:line' lines (default)
177 .TP
178 \fB\-\-strict\fR
179 write out strict Uniforum conforming .po file
180 .TP
181 \fB\-\-properties\-output\fR
182 write out a Java .properties file
183 .TP
184 \fB\-\-stringtable\-output\fR
185 write out a NeXTstep/GNUstep .strings file
186 .TP
187 \fB\-\-itstool\fR
188 write out itstool comments
189 .TP
190 \fB\-w\fR, \fB\-\-width\fR=\fI\,NUMBER\/\fR
191 set output page width
192 .TP
193 \fB\-\-no\-wrap\fR
194 do not break long message lines, longer than
195 the output page width, into several lines
196 .TP
197 \fB\-s\fR, \fB\-\-sort\-output\fR
198 generate sorted output (deprecated)
199 .TP
200 \fB\-F\fR, \fB\-\-sort\-by\-file\fR
201 sort output by file location
202 .TP
203 \fB\-\-omit\-header\fR
204 don't write header with 'msgid ""' entry
205 .TP
206 \fB\-\-no\-git\fR
207 don't use the git program to produce a
208 reproducible 'POT\-Creation\-Date' field in the
209 output.
210 .TP
211 \fB\-\-copyright\-holder\fR=\fI\,STRING\/\fR
212 set copyright holder in output
213 .TP
214 \fB\-\-foreign\-user\fR
215 omit FSF copyright in output for foreign user
216 .TP
217 \fB\-\-package\-name\fR=\fI\,PACKAGE\/\fR
218 set package name in output
219 .TP
220 \fB\-\-package\-version\fR=\fI\,VERSION\/\fR
221 set package version in output
222 .TP
223 \fB\-\-msgid\-bugs\-address\fR=\fI\,EMAIL\/\fR@ADDRESS
224 set report address for msgid bugs
225 .TP
226 \fB\-\-generated\fR=\fI\,FILE\/\fR
227 Declares that the given FILE is generated and
228 therefore should not have an influence on the
229 \&'POT\-Creation\-Date' field in the output.
230 .TP
231 \fB\-\-reference\fR=\fI\,FILE\/\fR
232 Declares that the output depends on the contents
233 of the given FILE. This has an influence on the
234 \&'POT\-Creation\-Date' field in the output.
235 .TP
236 \fB\-m[STRING]\fR, \fB\-\-msgstr\-prefix\fR[=\fI\,STRING\/\fR]
237 use STRING or "" as prefix for msgstr
238 values
239 .TP
240 \fB\-M[STRING]\fR, \fB\-\-msgstr\-suffix\fR[=\fI\,STRING\/\fR]
241 use STRING or "" as suffix for msgstr
242 values
243 .SS "Informative output:"
244 .TP
245 \fB\-h\fR, \fB\-\-help\fR
246 display this help and exit
247 .TP
248 \fB\-V\fR, \fB\-\-version\fR
249 output version information and exit
250 .TP
251 \fB\-v\fR, \fB\-\-verbose\fR
252 increase verbosity level
253 .SH AUTHOR
254 Written by Ulrich Drepper.
255 .SH "REPORTING BUGS"
256 Report bugs in the bug tracker at <https://savannah.gnu.org/projects/gettext>
257 or by email to <bug\[email protected]>.
258 .SH COPYRIGHT
259 Copyright \(co 1995\-2025 Free Software Foundation, Inc.
260 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
261 .br
262 This is free software: you are free to change and redistribute it.
263 There is NO WARRANTY, to the extent permitted by law.
264 .SH "SEE ALSO"
265 The full documentation for
266 .B xgettext
267 is maintained as a Texinfo manual. If the
268 .B info
269 and
270 .B xgettext
271 programs are properly installed at your site, the command
272 .IP
273 .B info xgettext
274 .PP
275 should give you access to the complete manual.