Debian Codegraph @

upstream/opensuse-tumbleweed/man1/xgettext.1

raw
1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
2 .TH XGETTEXT "1" "January 2026" "GNU gettext-tools 1.0" "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, OCaml,
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\-\-no\-check\fR=\fI\,NAME\/\fR
85 don't perform syntax check on messages
86 (url, email)
87 .TP
88 \fB\-\-sentence\-end\fR=\fI\,TYPE\/\fR
89 type describing the end of sentence
90 (single\-space, which is the default,
91 .IP
92 or double\-space)
93 .SS "Language specific options:"
94 .TP
95 \fB\-a\fR, \fB\-\-extract\-all\fR
96 extract all strings
97 (only languages C, C++, ObjectiveC, Python,
98 Java, C#, JavaScript, TypeScript, TSX, Scheme,
99 Guile, Lisp, EmacsLisp, librep, Rust, Go, Shell,
100 awk, Lua, Modula\-2, D, OCaml, Vala, Tcl, Perl,
101 PHP, GCC\-source, Glade, GSettings)
102 .TP
103 \fB\-kWORD\fR, \fB\-\-keyword\fR=\fI\,WORD\/\fR
104 look for WORD as an additional keyword
105 .TP
106 \fB\-k\fR, \fB\-\-keyword\fR
107 do not to use default keywords
108 (only languages C, C++, ObjectiveC, Python,
109 Java, C#, JavaScript, TypeScript, TSX, Scheme,
110 Guile, Lisp, EmacsLisp, librep, Rust, Go, Shell,
111 awk, Lua, Modula\-2, D, OCaml, Vala, Tcl, Perl,
112 PHP, GCC\-source, Glade, GSettings, Desktop)
113 .TP
114 \fB\-\-flag\fR=\fI\,WORD\/\fR:ARG:FLAG
115 additional flag for strings inside the argument
116 number ARG of keyword WORD
117 .TP
118 (only languages C, C++, ObjectiveC, Python,
119 Java, C#, JavaScript, TypeScript, TSX, Scheme,
120 Guile, Lisp, EmacsLisp, librep, Rust, Go, Shell,
121 awk, Lua, Modula\-2, D, OCaml, Vala, Tcl, Perl,
122 PHP, GCC\-source, YCP)
123 .TP
124 \fB\-\-tag\fR=\fI\,WORD\/\fR:FORMAT
125 defines the behaviour of tagged template literals
126 with tag WORD
127 .IP
128 (only language JavaScript)
129 .TP
130 \fB\-T\fR, \fB\-\-trigraphs\fR
131 understand ANSI C trigraphs for input
132 (deprecated; only languages C, C++, ObjectiveC)
133 .TP
134 \fB\-\-its\fR=\fI\,FILE\/\fR
135 apply ITS rules from FILE
136 (only XML based languages)
137 .TP
138 \fB\-\-qt\fR
139 recognize Qt format strings
140 (only language C++)
141 .TP
142 \fB\-\-kde\fR
143 recognize KDE 4 format strings
144 (only language C++)
145 .TP
146 \fB\-\-boost\fR
147 recognize Boost format strings
148 (only language C++)
149 .TP
150 \fB\-\-debug\fR
151 more detailed formatstring recognition result
152 .SS "Output details:"
153 .TP
154 \fB\-\-color\fR
155 use colors and other text attributes always
156 .TP
157 \fB\-\-color\fR=\fI\,WHEN\/\fR
158 use colors and other text attributes if WHEN.
159 WHEN may be 'always', 'never', 'auto', or 'html'.
160 .TP
161 \fB\-\-style\fR=\fI\,STYLEFILE\/\fR
162 specify CSS style rule file for \fB\-\-color\fR
163 .TP
164 \fB\-e\fR, \fB\-\-no\-escape\fR
165 do not use C escapes in output (default)
166 .TP
167 \fB\-E\fR, \fB\-\-escape\fR
168 use C escapes in output, no extended chars
169 .TP
170 \fB\-\-force\-po\fR
171 write PO file even if empty
172 .TP
173 \fB\-i\fR, \fB\-\-indent\fR
174 write the .po file using indented style
175 .TP
176 \fB\-\-no\-location\fR
177 do not write '#: filename:line' lines
178 .TP
179 \fB\-n\fR, \fB\-\-add\-location\fR
180 generate '#: filename:line' lines (default)
181 .TP
182 \fB\-\-strict\fR
183 write out strict Uniforum conforming .po file
184 .TP
185 \fB\-\-properties\-output\fR
186 write out a Java .properties file
187 .TP
188 \fB\-\-stringtable\-output\fR
189 write out a NeXTstep/GNUstep .strings file
190 .TP
191 \fB\-\-itstool\fR
192 write out itstool comments
193 .TP
194 \fB\-w\fR, \fB\-\-width\fR=\fI\,NUMBER\/\fR
195 set output page width
196 .TP
197 \fB\-\-no\-wrap\fR
198 do not break long message lines, longer than
199 the output page width, into several lines
200 .TP
201 \fB\-s\fR, \fB\-\-sort\-output\fR
202 generate sorted output (deprecated)
203 .TP
204 \fB\-F\fR, \fB\-\-sort\-by\-file\fR
205 sort output by file location
206 .TP
207 \fB\-\-omit\-header\fR
208 don't write header with 'msgid ""' entry
209 .TP
210 \fB\-\-no\-git\fR
211 don't use the git program to produce a
212 reproducible 'POT\-Creation\-Date' field in the
213 output.
214 .TP
215 \fB\-\-copyright\-holder\fR=\fI\,STRING\/\fR
216 set copyright holder in output
217 .TP
218 \fB\-\-foreign\-user\fR
219 omit FSF copyright in output for foreign user
220 .TP
221 \fB\-\-package\-name\fR=\fI\,PACKAGE\/\fR
222 set package name in output
223 .TP
224 \fB\-\-package\-version\fR=\fI\,VERSION\/\fR
225 set package version in output
226 .TP
227 \fB\-\-msgid\-bugs\-address\fR=\fI\,EMAIL\/\fR@ADDRESS
228 set report address for msgid bugs
229 .TP
230 \fB\-\-generated\fR=\fI\,FILE\/\fR
231 Declares that the given FILE is generated and
232 therefore should not have an influence on the
233 \&'POT\-Creation\-Date' field in the output.
234 .TP
235 \fB\-\-reference\fR=\fI\,FILE\/\fR
236 Declares that the output depends on the contents
237 of the given FILE. This has an influence on the
238 \&'POT\-Creation\-Date' field in the output.
239 .TP
240 \fB\-m[STRING]\fR, \fB\-\-msgstr\-prefix\fR[=\fI\,STRING\/\fR]
241 use STRING or "" as prefix for msgstr
242 values
243 .TP
244 \fB\-M[STRING]\fR, \fB\-\-msgstr\-suffix\fR[=\fI\,STRING\/\fR]
245 use STRING or "" as suffix for msgstr
246 values
247 .SS "Informative output:"
248 .TP
249 \fB\-h\fR, \fB\-\-help\fR
250 display this help and exit
251 .TP
252 \fB\-V\fR, \fB\-\-version\fR
253 output version information and exit
254 .TP
255 \fB\-v\fR, \fB\-\-verbose\fR
256 increase verbosity level
257 .SH AUTHOR
258 Written by Ulrich Drepper and Bruno Haible.
259 .SH "REPORTING BUGS"
260 Report bugs in the bug tracker at <https://savannah.gnu.org/projects/gettext>
261 or by email to <bug\[email protected]>.
262 .SH COPYRIGHT
263 Copyright \(co 1995\-2026 Free Software Foundation, Inc.
264 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
265 .br
266 This is free software: you are free to change and redistribute it.
267 There is NO WARRANTY, to the extent permitted by law.
268 .SH "SEE ALSO"
269 The full documentation for
270 .B xgettext
271 is maintained as a Texinfo manual. If the
272 .B info
273 and
274 .B xgettext
275 programs are properly installed at your site, the command
276 .IP
277 .B info xgettext
278 .PP
279 should give you access to the complete manual.