291 lines
8.8 KiB
HTML
291 lines
8.8 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of XGETTEXT</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>XGETTEXT</H1>
|
|
Section: GNU (1)<BR>Updated: March 2020<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
xgettext - extract gettext strings from source
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>xgettext</B>
|
|
|
|
[<I>OPTION</I>] [<I>INPUTFILE</I>]...
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
<P>
|
|
|
|
Extract translatable strings from given input files.
|
|
<P>
|
|
|
|
Mandatory arguments to long options are mandatory for short options too.
|
|
Similarly for optional arguments.
|
|
<A NAME="lbAE"> </A>
|
|
<H3>Input file location:</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">INPUTFILE ...<DD>
|
|
input files
|
|
<DT id="2"><B>-f</B>, <B>--files-from</B>=<I>FILE</I><DD>
|
|
get list of input files from FILE
|
|
<DT id="3"><B>-D</B>, <B>--directory</B>=<I>DIRECTORY</I><DD>
|
|
add DIRECTORY to list for input files search
|
|
</DL>
|
|
<P>
|
|
|
|
If input file is -, standard input is read.
|
|
<A NAME="lbAF"> </A>
|
|
<H3>Output file location:</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="4"><B>-d</B>, <B>--default-domain</B>=<I>NAME</I><DD>
|
|
use NAME.po for output (instead of messages.po)
|
|
<DT id="5"><B>-o</B>, <B>--output</B>=<I>FILE</I><DD>
|
|
write output to specified file
|
|
<DT id="6"><B>-p</B>, <B>--output-dir</B>=<I>DIR</I><DD>
|
|
output files will be placed in directory DIR
|
|
</DL>
|
|
<P>
|
|
|
|
If output file is -, output is written to standard output.
|
|
<A NAME="lbAG"> </A>
|
|
<H3>Choice of input file language:</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="7"><B>-L</B>, <B>--language</B>=<I>NAME</I><DD>
|
|
recognise the specified language
|
|
(C, C++, ObjectiveC, PO, Shell, Python, Lisp,
|
|
EmacsLisp, librep, Scheme, Smalltalk, Java,
|
|
JavaProperties, C#, awk, YCP, Tcl, Perl, PHP,
|
|
GCC-source, NXStringTable, RST, Glade, Lua,
|
|
JavaScript, Vala, Desktop)
|
|
<DT id="8"><B>-C</B>, <B>--c</B>++<DD>
|
|
shorthand for <B>--language</B>=<I>C</I>++
|
|
</DL>
|
|
<P>
|
|
|
|
By default the language is guessed depending on the input file name extension.
|
|
<A NAME="lbAH"> </A>
|
|
<H3>Input file interpretation:</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="9"><B>--from-code</B>=<I>NAME</I><DD>
|
|
encoding of input files
|
|
(except for Python, Tcl, Glade)
|
|
</DL>
|
|
<P>
|
|
|
|
By default the input files are assumed to be in ASCII.
|
|
<A NAME="lbAI"> </A>
|
|
<H3>Operation mode:</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="10"><B>-j</B>, <B>--join-existing</B><DD>
|
|
join messages with existing file
|
|
<DT id="11"><B>-x</B>, <B>--exclude-file</B>=<I>FILE</I>.po<DD>
|
|
entries from FILE.po are not extracted
|
|
<DT id="12"><B>-cTAG</B>, <B>--add-comments</B>=<I>TAG</I><DD>
|
|
place comment blocks starting with TAG and
|
|
preceding keyword lines in output file
|
|
<DT id="13"><B>-c</B>, <B>--add-comments</B><DD>
|
|
place all comment blocks preceding keyword lines
|
|
in output file
|
|
<DT id="14"><B>--check</B>=<I>NAME</I><DD>
|
|
perform syntax check on messages
|
|
(ellipsis-unicode, space-ellipsis,
|
|
<DT id="15"><DD>
|
|
quote-unicode, bullet-unicode)
|
|
<DT id="16"><B>--sentence-end</B>=<I>TYPE</I><DD>
|
|
type describing the end of sentence
|
|
(single-space, which is the default,
|
|
<DT id="17"><DD>
|
|
or double-space)
|
|
</DL>
|
|
<A NAME="lbAJ"> </A>
|
|
<H3>Language specific options:</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="18"><B>-a</B>, <B>--extract-all</B><DD>
|
|
extract all strings
|
|
(only languages C, C++, ObjectiveC, Shell,
|
|
Python, Lisp, EmacsLisp, librep, Scheme, Java,
|
|
C#, awk, Tcl, Perl, PHP, GCC-source, Glade,
|
|
Lua, JavaScript, Vala)
|
|
<DT id="19"><B>-kWORD</B>, <B>--keyword</B>=<I>WORD</I><DD>
|
|
look for WORD as an additional keyword
|
|
<DT id="20"><B>-k</B>, <B>--keyword</B><DD>
|
|
do not to use default keywords
|
|
(only languages C, C++, ObjectiveC, Shell,
|
|
Python, Lisp, EmacsLisp, librep, Scheme, Java,
|
|
C#, awk, Tcl, Perl, PHP, GCC-source, Glade,
|
|
Lua, JavaScript, Vala, Desktop)
|
|
<DT id="21"><B>--flag</B>=<I>WORD</I>:ARG:FLAG<DD>
|
|
additional flag for strings inside the argument
|
|
number ARG of keyword WORD
|
|
<DT id="22"><DD>
|
|
(only languages C, C++, ObjectiveC, Shell,
|
|
Python, Lisp, EmacsLisp, librep, Scheme, Java,
|
|
C#, awk, YCP, Tcl, Perl, PHP, GCC-source,
|
|
Lua, JavaScript, Vala)
|
|
<DT id="23"><B>-T</B>, <B>--trigraphs</B><DD>
|
|
understand ANSI C trigraphs for input
|
|
(only languages C, C++, ObjectiveC)
|
|
<DT id="24"><B>--its</B>=<I>FILE</I><DD>
|
|
apply ITS rules from FILE
|
|
(only XML based languages)
|
|
<DT id="25"><B>--qt</B><DD>
|
|
recognize Qt format strings
|
|
(only language C++)
|
|
<DT id="26"><B>--kde</B><DD>
|
|
recognize KDE 4 format strings
|
|
(only language C++)
|
|
<DT id="27"><B>--boost</B><DD>
|
|
recognize Boost format strings
|
|
(only language C++)
|
|
<DT id="28"><B>--debug</B><DD>
|
|
more detailed formatstring recognition result
|
|
</DL>
|
|
<A NAME="lbAK"> </A>
|
|
<H3>Output details:</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="29"><B>--color</B><DD>
|
|
use colors and other text attributes always
|
|
<DT id="30"><B>--color</B>=<I>WHEN</I><DD>
|
|
use colors and other text attributes if WHEN.
|
|
WHEN may be 'always', 'never', 'auto', or 'html'.
|
|
<DT id="31"><B>--style</B>=<I>STYLEFILE</I><DD>
|
|
specify CSS style rule file for <B>--color</B>
|
|
<DT id="32"><B>-e</B>, <B>--no-escape</B><DD>
|
|
do not use C escapes in output (default)
|
|
<DT id="33"><B>-E</B>, <B>--escape</B><DD>
|
|
use C escapes in output, no extended chars
|
|
<DT id="34"><B>--force-po</B><DD>
|
|
write PO file even if empty
|
|
<DT id="35"><B>-i</B>, <B>--indent</B><DD>
|
|
write the .po file using indented style
|
|
<DT id="36"><B>--no-location</B><DD>
|
|
do not write '#: filename:line' lines
|
|
<DT id="37"><B>-n</B>, <B>--add-location</B><DD>
|
|
generate '#: filename:line' lines (default)
|
|
<DT id="38"><B>--strict</B><DD>
|
|
write out strict Uniforum conforming .po file
|
|
<DT id="39"><B>--properties-output</B><DD>
|
|
write out a Java .properties file
|
|
<DT id="40"><B>--stringtable-output</B><DD>
|
|
write out a NeXTstep/GNUstep .strings file
|
|
<DT id="41"><B>--itstool</B><DD>
|
|
write out itstool comments
|
|
<DT id="42"><B>-w</B>, <B>--width</B>=<I>NUMBER</I><DD>
|
|
set output page width
|
|
<DT id="43"><B>--no-wrap</B><DD>
|
|
do not break long message lines, longer than
|
|
the output page width, into several lines
|
|
<DT id="44"><B>-s</B>, <B>--sort-output</B><DD>
|
|
generate sorted output
|
|
<DT id="45"><B>-F</B>, <B>--sort-by-file</B><DD>
|
|
sort output by file location
|
|
<DT id="46"><B>--omit-header</B><DD>
|
|
don't write header with 'msgid ""' entry
|
|
<DT id="47"><B>--copyright-holder</B>=<I>STRING</I><DD>
|
|
set copyright holder in output
|
|
<DT id="48"><B>--foreign-user</B><DD>
|
|
omit FSF copyright in output for foreign user
|
|
<DT id="49"><B>--package-name</B>=<I>PACKAGE</I><DD>
|
|
set package name in output
|
|
<DT id="50"><B>--package-version</B>=<I>VERSION</I><DD>
|
|
set package version in output
|
|
<DT id="51"><B>--msgid-bugs-address</B>=<I>EMAIL</I>@ADDRESS<DD>
|
|
set report address for msgid bugs
|
|
<DT id="52"><B>-m[STRING]</B>, <B>--msgstr-prefix</B>[=<I>STRING</I>]<DD>
|
|
use STRING or "" as prefix for msgstr
|
|
values
|
|
<DT id="53"><B>-M[STRING]</B>, <B>--msgstr-suffix</B>[=<I>STRING</I>]<DD>
|
|
use STRING or "" as suffix for msgstr
|
|
values
|
|
</DL>
|
|
<A NAME="lbAL"> </A>
|
|
<H3>Informative output:</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="54"><B>-h</B>, <B>--help</B><DD>
|
|
display this help and exit
|
|
<DT id="55"><B>-V</B>, <B>--version</B><DD>
|
|
output version information and exit
|
|
</DL>
|
|
<A NAME="lbAM"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
Written by Ulrich Drepper.
|
|
<A NAME="lbAN"> </A>
|
|
<H2>REPORTING BUGS</H2>
|
|
|
|
Report bugs to <<A HREF="mailto:bug-gnu-gettext@gnu.org">bug-gnu-gettext@gnu.org</A>>.
|
|
<A NAME="lbAO"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
Copyright © 1995-1998, 2000-2016 Free Software Foundation, Inc.
|
|
License GPLv3+: GNU GPL version 3 or later <<A HREF="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</A>>
|
|
<BR>
|
|
|
|
This is free software: you are free to change and redistribute it.
|
|
There is NO WARRANTY, to the extent permitted by law.
|
|
<A NAME="lbAP"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
The full documentation for
|
|
<B>xgettext</B>
|
|
|
|
is maintained as a Texinfo manual. If the
|
|
<B>info</B>
|
|
|
|
and
|
|
<B>xgettext</B>
|
|
|
|
programs are properly installed at your site, the command
|
|
<DL COMPACT>
|
|
<DT id="56"><DD>
|
|
<B>info xgettext</B>
|
|
|
|
</DL>
|
|
<P>
|
|
|
|
should give you access to the complete manual.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="57"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="58"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="59"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DL>
|
|
<DT id="60"><A HREF="#lbAE">Input file location:</A><DD>
|
|
<DT id="61"><A HREF="#lbAF">Output file location:</A><DD>
|
|
<DT id="62"><A HREF="#lbAG">Choice of input file language:</A><DD>
|
|
<DT id="63"><A HREF="#lbAH">Input file interpretation:</A><DD>
|
|
<DT id="64"><A HREF="#lbAI">Operation mode:</A><DD>
|
|
<DT id="65"><A HREF="#lbAJ">Language specific options:</A><DD>
|
|
<DT id="66"><A HREF="#lbAK">Output details:</A><DD>
|
|
<DT id="67"><A HREF="#lbAL">Informative output:</A><DD>
|
|
</DL>
|
|
<DT id="68"><A HREF="#lbAM">AUTHOR</A><DD>
|
|
<DT id="69"><A HREF="#lbAN">REPORTING BUGS</A><DD>
|
|
<DT id="70"><A HREF="#lbAO">COPYRIGHT</A><DD>
|
|
<DT id="71"><A HREF="#lbAP">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:30 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|