annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/doc/gettext/gettext_5.html @ 68:5028fdace37b

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 16:23:26 -0400
parents
children
rev   line source
jpayne@68 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
jpayne@68 2 <html>
jpayne@68 3 <!-- Created on February, 21 2024 by texi2html 1.78a -->
jpayne@68 4 <!--
jpayne@68 5 Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
jpayne@68 6 Karl Berry <karl@freefriends.org>
jpayne@68 7 Olaf Bachmann <obachman@mathematik.uni-kl.de>
jpayne@68 8 and many others.
jpayne@68 9 Maintained by: Many creative people.
jpayne@68 10 Send bugs and suggestions to <texi2html-bug@nongnu.org>
jpayne@68 11
jpayne@68 12 -->
jpayne@68 13 <head>
jpayne@68 14 <title>GNU gettext utilities: 5. Making the PO Template File</title>
jpayne@68 15
jpayne@68 16 <meta name="description" content="GNU gettext utilities: 5. Making the PO Template File">
jpayne@68 17 <meta name="keywords" content="GNU gettext utilities: 5. Making the PO Template File">
jpayne@68 18 <meta name="resource-type" content="document">
jpayne@68 19 <meta name="distribution" content="global">
jpayne@68 20 <meta name="Generator" content="texi2html 1.78a">
jpayne@68 21 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
jpayne@68 22 <style type="text/css">
jpayne@68 23 <!--
jpayne@68 24 a.summary-letter {text-decoration: none}
jpayne@68 25 pre.display {font-family: serif}
jpayne@68 26 pre.format {font-family: serif}
jpayne@68 27 pre.menu-comment {font-family: serif}
jpayne@68 28 pre.menu-preformatted {font-family: serif}
jpayne@68 29 pre.smalldisplay {font-family: serif; font-size: smaller}
jpayne@68 30 pre.smallexample {font-size: smaller}
jpayne@68 31 pre.smallformat {font-family: serif; font-size: smaller}
jpayne@68 32 pre.smalllisp {font-size: smaller}
jpayne@68 33 span.roman {font-family:serif; font-weight:normal;}
jpayne@68 34 span.sansserif {font-family:sans-serif; font-weight:normal;}
jpayne@68 35 ul.toc {list-style: none}
jpayne@68 36 -->
jpayne@68 37 </style>
jpayne@68 38
jpayne@68 39
jpayne@68 40 </head>
jpayne@68 41
jpayne@68 42 <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
jpayne@68 43
jpayne@68 44 <table cellpadding="1" cellspacing="1" border="0">
jpayne@68 45 <tr><td valign="middle" align="left">[<a href="gettext_4.html#SEC17" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
jpayne@68 46 <td valign="middle" align="left">[<a href="gettext_6.html#SEC45" title="Next chapter"> &gt;&gt; </a>]</td>
jpayne@68 47 <td valign="middle" align="left"> &nbsp; </td>
jpayne@68 48 <td valign="middle" align="left"> &nbsp; </td>
jpayne@68 49 <td valign="middle" align="left"> &nbsp; </td>
jpayne@68 50 <td valign="middle" align="left"> &nbsp; </td>
jpayne@68 51 <td valign="middle" align="left"> &nbsp; </td>
jpayne@68 52 <td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
jpayne@68 53 <td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
jpayne@68 54 <td valign="middle" align="left">[<a href="gettext_21.html#SEC389" title="Index">Index</a>]</td>
jpayne@68 55 <td valign="middle" align="left">[<a href="gettext_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
jpayne@68 56 </tr></table>
jpayne@68 57
jpayne@68 58 <hr size="2">
jpayne@68 59 <a name="Template"></a>
jpayne@68 60 <a name="SEC35"></a>
jpayne@68 61 <h1 class="chapter"> <a href="gettext_toc.html#TOC28">5. Making the PO Template File</a> </h1>
jpayne@68 62
jpayne@68 63 <p>After preparing the sources, the programmer creates a PO template file.
jpayne@68 64 This section explains how to use <code>xgettext</code> for this purpose.
jpayne@68 65 </p>
jpayne@68 66 <p><code>xgettext</code> creates a file named &lsquo;<tt><var>domainname</var>.po</tt>&rsquo;. You
jpayne@68 67 should then rename it to &lsquo;<tt><var>domainname</var>.pot</tt>&rsquo;. (Why doesn't
jpayne@68 68 <code>xgettext</code> create it under the name &lsquo;<tt><var>domainname</var>.pot</tt>&rsquo;
jpayne@68 69 right away? The answer is: for historical reasons. When <code>xgettext</code>
jpayne@68 70 was specified, the distinction between a PO file and PO file template
jpayne@68 71 was fuzzy, and the suffix &lsquo;<samp>.pot</samp>&rsquo; wasn't in use at that time.)
jpayne@68 72 </p>
jpayne@68 73
jpayne@68 74
jpayne@68 75
jpayne@68 76 <a name="xgettext-Invocation"></a>
jpayne@68 77 <a name="SEC36"></a>
jpayne@68 78 <h2 class="section"> <a href="gettext_toc.html#TOC29">5.1 Invoking the <code>xgettext</code> Program</a> </h2>
jpayne@68 79
jpayne@68 80
jpayne@68 81 <table><tr><td>&nbsp;</td><td><pre class="example">xgettext [<var>option</var>] [<var>inputfile</var>] &hellip;
jpayne@68 82 </pre></td></tr></table>
jpayne@68 83
jpayne@68 84 <p>The <code>xgettext</code> program extracts translatable strings from given
jpayne@68 85 input files.
jpayne@68 86 </p>
jpayne@68 87
jpayne@68 88 <a name="SEC37"></a>
jpayne@68 89 <h3 class="subsection"> <a href="gettext_toc.html#TOC30">5.1.1 Input file location</a> </h3>
jpayne@68 90
jpayne@68 91 <dl compact="compact">
jpayne@68 92 <dt> &lsquo;<samp><var>inputfile</var> &hellip;</samp>&rsquo;</dt>
jpayne@68 93 <dd><p>Input files.
jpayne@68 94 </p>
jpayne@68 95 </dd>
jpayne@68 96 <dt> &lsquo;<samp>-f <var>file</var></samp>&rsquo;</dt>
jpayne@68 97 <dt> &lsquo;<samp>--files-from=<var>file</var></samp>&rsquo;</dt>
jpayne@68 98 <dd><a name="IDX142"></a>
jpayne@68 99 <a name="IDX143"></a>
jpayne@68 100 <p>Read the names of the input files from <var>file</var> instead of getting
jpayne@68 101 them from the command line.
jpayne@68 102 </p>
jpayne@68 103 </dd>
jpayne@68 104 <dt> &lsquo;<samp>-D <var>directory</var></samp>&rsquo;</dt>
jpayne@68 105 <dt> &lsquo;<samp>--directory=<var>directory</var></samp>&rsquo;</dt>
jpayne@68 106 <dd><a name="IDX144"></a>
jpayne@68 107 <a name="IDX145"></a>
jpayne@68 108 <p>Add <var>directory</var> to the list of directories. Source files are
jpayne@68 109 searched relative to this list of directories. The resulting &lsquo;<tt>.po</tt>&rsquo;
jpayne@68 110 file will be written relative to the current directory, though.
jpayne@68 111 </p>
jpayne@68 112 </dd>
jpayne@68 113 </dl>
jpayne@68 114
jpayne@68 115 <p>If <var>inputfile</var> is &lsquo;<samp>-</samp>&rsquo;, standard input is read.
jpayne@68 116 </p>
jpayne@68 117
jpayne@68 118 <a name="SEC38"></a>
jpayne@68 119 <h3 class="subsection"> <a href="gettext_toc.html#TOC31">5.1.2 Output file location</a> </h3>
jpayne@68 120
jpayne@68 121 <dl compact="compact">
jpayne@68 122 <dt> &lsquo;<samp>-d <var>name</var></samp>&rsquo;</dt>
jpayne@68 123 <dt> &lsquo;<samp>--default-domain=<var>name</var></samp>&rsquo;</dt>
jpayne@68 124 <dd><a name="IDX146"></a>
jpayne@68 125 <a name="IDX147"></a>
jpayne@68 126 <p>Use &lsquo;<tt><var>name</var>.po</tt>&rsquo; for output (instead of &lsquo;<tt>messages.po</tt>&rsquo;).
jpayne@68 127 </p>
jpayne@68 128 </dd>
jpayne@68 129 <dt> &lsquo;<samp>-o <var>file</var></samp>&rsquo;</dt>
jpayne@68 130 <dt> &lsquo;<samp>--output=<var>file</var></samp>&rsquo;</dt>
jpayne@68 131 <dd><a name="IDX148"></a>
jpayne@68 132 <a name="IDX149"></a>
jpayne@68 133 <p>Write output to specified file (instead of &lsquo;<tt><var>name</var>.po</tt>&rsquo; or
jpayne@68 134 &lsquo;<tt>messages.po</tt>&rsquo;).
jpayne@68 135 </p>
jpayne@68 136 </dd>
jpayne@68 137 <dt> &lsquo;<samp>-p <var>dir</var></samp>&rsquo;</dt>
jpayne@68 138 <dt> &lsquo;<samp>--output-dir=<var>dir</var></samp>&rsquo;</dt>
jpayne@68 139 <dd><a name="IDX150"></a>
jpayne@68 140 <a name="IDX151"></a>
jpayne@68 141 <p>Output files will be placed in directory <var>dir</var>.
jpayne@68 142 </p>
jpayne@68 143 </dd>
jpayne@68 144 </dl>
jpayne@68 145
jpayne@68 146 <a name="IDX152"></a>
jpayne@68 147 <p>If the output <var>file</var> is &lsquo;<samp>-</samp>&rsquo; or &lsquo;<samp>/dev/stdout</samp>&rsquo;, the output
jpayne@68 148 is written to standard output.
jpayne@68 149 </p>
jpayne@68 150
jpayne@68 151 <a name="SEC39"></a>
jpayne@68 152 <h3 class="subsection"> <a href="gettext_toc.html#TOC32">5.1.3 Choice of input file language</a> </h3>
jpayne@68 153
jpayne@68 154 <dl compact="compact">
jpayne@68 155 <dt> &lsquo;<samp>-L <var>name</var></samp>&rsquo;</dt>
jpayne@68 156 <dt> &lsquo;<samp>--language=<var>name</var></samp>&rsquo;</dt>
jpayne@68 157 <dd><a name="IDX153"></a>
jpayne@68 158 <a name="IDX154"></a>
jpayne@68 159 <a name="IDX155"></a>
jpayne@68 160 <p>Specifies the language of the input files. The supported languages
jpayne@68 161 are <code>C</code>, <code>C++</code>, <code>ObjectiveC</code>, <code>PO</code>, <code>Shell</code>,
jpayne@68 162 <code>Python</code>, <code>Lisp</code>, <code>EmacsLisp</code>, <code>librep</code>, <code>Scheme</code>,
jpayne@68 163 <code>Smalltalk</code>, <code>Java</code>, <code>JavaProperties</code>, <code>C#</code>, <code>awk</code>,
jpayne@68 164 <code>YCP</code>, <code>Tcl</code>, <code>Perl</code>, <code>PHP</code>, <code>Ruby</code>,
jpayne@68 165 <code>GCC-source</code>, <code>NXStringTable</code>, <code>RST</code>, <code>RSJ</code>, <code>Glade</code>,
jpayne@68 166 <code>Lua</code>, <code>JavaScript</code>, <code>Vala</code>, <code>GSettings</code>, <code>Desktop</code>.
jpayne@68 167 </p>
jpayne@68 168 </dd>
jpayne@68 169 <dt> &lsquo;<samp>-C</samp>&rsquo;</dt>
jpayne@68 170 <dt> &lsquo;<samp>--c++</samp>&rsquo;</dt>
jpayne@68 171 <dd><a name="IDX156"></a>
jpayne@68 172 <a name="IDX157"></a>
jpayne@68 173 <p>This is a shorthand for <code>--language=C++</code>.
jpayne@68 174 </p>
jpayne@68 175 </dd>
jpayne@68 176 </dl>
jpayne@68 177
jpayne@68 178 <p>By default the language is guessed depending on the input file name
jpayne@68 179 extension.
jpayne@68 180 </p>
jpayne@68 181
jpayne@68 182 <a name="SEC40"></a>
jpayne@68 183 <h3 class="subsection"> <a href="gettext_toc.html#TOC33">5.1.4 Input file interpretation</a> </h3>
jpayne@68 184
jpayne@68 185 <dl compact="compact">
jpayne@68 186 <dt> &lsquo;<samp>--from-code=<var>name</var></samp>&rsquo;</dt>
jpayne@68 187 <dd><a name="IDX158"></a>
jpayne@68 188 <p>Specifies the encoding of the input files. This option is needed only
jpayne@68 189 if some untranslated message strings or their corresponding comments
jpayne@68 190 contain non-ASCII characters. Note that Tcl and Glade input files are
jpayne@68 191 always assumed to be in UTF-8, regardless of this option.
jpayne@68 192 </p>
jpayne@68 193 </dd>
jpayne@68 194 </dl>
jpayne@68 195
jpayne@68 196 <p>By default the input files are assumed to be in ASCII.
jpayne@68 197 </p>
jpayne@68 198
jpayne@68 199 <a name="SEC41"></a>
jpayne@68 200 <h3 class="subsection"> <a href="gettext_toc.html#TOC34">5.1.5 Operation mode</a> </h3>
jpayne@68 201
jpayne@68 202 <dl compact="compact">
jpayne@68 203 <dt> &lsquo;<samp>-j</samp>&rsquo;</dt>
jpayne@68 204 <dt> &lsquo;<samp>--join-existing</samp>&rsquo;</dt>
jpayne@68 205 <dd><a name="IDX159"></a>
jpayne@68 206 <a name="IDX160"></a>
jpayne@68 207 <p>Join messages with existing file.
jpayne@68 208 </p>
jpayne@68 209 </dd>
jpayne@68 210 <dt> &lsquo;<samp>-x <var>file</var></samp>&rsquo;</dt>
jpayne@68 211 <dt> &lsquo;<samp>--exclude-file=<var>file</var></samp>&rsquo;</dt>
jpayne@68 212 <dd><a name="IDX161"></a>
jpayne@68 213 <a name="IDX162"></a>
jpayne@68 214 <p>Entries from <var>file</var> are not extracted. <var>file</var> should be a PO or
jpayne@68 215 POT file.
jpayne@68 216 </p>
jpayne@68 217 </dd>
jpayne@68 218 <dt> &lsquo;<samp>-c[<var>tag</var>]</samp>&rsquo;</dt>
jpayne@68 219 <dt> &lsquo;<samp>--add-comments[=<var>tag</var>]</samp>&rsquo;</dt>
jpayne@68 220 <dd><a name="IDX163"></a>
jpayne@68 221 <a name="IDX164"></a>
jpayne@68 222 <p>Place comment blocks starting with <var>tag</var> and preceding keyword lines
jpayne@68 223 in the output file. Without a <var>tag</var>, the option means to put <em>all</em>
jpayne@68 224 comment blocks preceding keyword lines in the output file.
jpayne@68 225 </p>
jpayne@68 226 <p>Note that comment blocks are only extracted if there is no program code
jpayne@68 227 between the comment and the string that gets extracted.
jpayne@68 228 For example, in the following C source code:
jpayne@68 229 </p>
jpayne@68 230 <table><tr><td>&nbsp;</td><td><pre class="example">/* This is the first comment. */
jpayne@68 231 gettext (&quot;foo&quot;);
jpayne@68 232
jpayne@68 233 /* This is the second comment: not extracted */
jpayne@68 234 gettext (
jpayne@68 235 &quot;bar&quot;);
jpayne@68 236
jpayne@68 237 gettext (
jpayne@68 238 /* This is the third comment. */
jpayne@68 239 &quot;baz&quot;);
jpayne@68 240
jpayne@68 241 /* This is the fourth comment. */
jpayne@68 242
jpayne@68 243 gettext (&quot;I love blank lines in my programs&quot;);
jpayne@68 244 </pre></td></tr></table>
jpayne@68 245
jpayne@68 246 <p>the second comment line will not be extracted, because there is a line
jpayne@68 247 with some tokens between the comment line and the line that contains
jpayne@68 248 the string. But the fourth comment is extracted, because between it and
jpayne@68 249 the line with the string there is merely a blank line.
jpayne@68 250 </p>
jpayne@68 251 </dd>
jpayne@68 252 <dt> &lsquo;<samp>--check[=<var>CHECK</var>]</samp>&rsquo;</dt>
jpayne@68 253 <dd><a name="IDX165"></a>
jpayne@68 254 <a name="IDX166"></a>
jpayne@68 255 <p>Perform a syntax check on msgid and msgid_plural. The supported checks
jpayne@68 256 are:
jpayne@68 257 </p>
jpayne@68 258 <dl compact="compact">
jpayne@68 259 <dt> &lsquo;<samp>ellipsis-unicode</samp>&rsquo;</dt>
jpayne@68 260 <dd><p>Prefer Unicode ellipsis character over ASCII <code>...</code>
jpayne@68 261 </p>
jpayne@68 262 </dd>
jpayne@68 263 <dt> &lsquo;<samp>space-ellipsis</samp>&rsquo;</dt>
jpayne@68 264 <dd><p>Prohibit whitespace before an ellipsis character
jpayne@68 265 </p>
jpayne@68 266 </dd>
jpayne@68 267 <dt> &lsquo;<samp>quote-unicode</samp>&rsquo;</dt>
jpayne@68 268 <dd><p>Prefer Unicode quotation marks over ASCII <code>&quot;'`</code>
jpayne@68 269 </p>
jpayne@68 270 </dd>
jpayne@68 271 <dt> &lsquo;<samp>bullet-unicode</samp>&rsquo;</dt>
jpayne@68 272 <dd><p>Prefer Unicode bullet character over ASCII <code>*</code> or <code>-</code>
jpayne@68 273 </p>
jpayne@68 274 </dd>
jpayne@68 275 </dl>
jpayne@68 276
jpayne@68 277 <p>The option has an effect on all input files. To enable or disable
jpayne@68 278 checks for a certain string, you can mark it with an <code>xgettext:</code>
jpayne@68 279 special comment in the source file. For example, if you specify the
jpayne@68 280 <code>--check=space-ellipsis</code> option, but want to suppress the check on
jpayne@68 281 a particular string, add the following comment:
jpayne@68 282 </p>
jpayne@68 283 <table><tr><td>&nbsp;</td><td><pre class="example">/* xgettext: no-space-ellipsis-check */
jpayne@68 284 gettext (&quot;We really want a space before ellipsis here ...&quot;);
jpayne@68 285 </pre></td></tr></table>
jpayne@68 286
jpayne@68 287 <p>The <code>xgettext:</code> comment can be followed by flags separated with a
jpayne@68 288 comma. The possible flags are of the form &lsquo;<samp>[no-]<var>name</var>-check</samp>&rsquo;,
jpayne@68 289 where <var>name</var> is the name of a valid syntax check. If a flag is
jpayne@68 290 prefixed by <code>no-</code>, the meaning is negated.
jpayne@68 291 </p>
jpayne@68 292 <p>Some tests apply the checks to each sentence within the msgid, rather
jpayne@68 293 than the whole string. xgettext detects the end of sentence by
jpayne@68 294 performing a pattern match, which usually looks for a period followed by
jpayne@68 295 a certain number of spaces. The number is specified with the
jpayne@68 296 <code>--sentence-end</code> option.
jpayne@68 297 </p>
jpayne@68 298 </dd>
jpayne@68 299 <dt> &lsquo;<samp>--sentence-end[=<var>TYPE</var>]</samp>&rsquo;</dt>
jpayne@68 300 <dd><a name="IDX167"></a>
jpayne@68 301 <a name="IDX168"></a>
jpayne@68 302 <p>The supported values are:
jpayne@68 303 </p>
jpayne@68 304 <dl compact="compact">
jpayne@68 305 <dt> &lsquo;<samp>single-space</samp>&rsquo;</dt>
jpayne@68 306 <dd><p>Expect at least one whitespace after a period
jpayne@68 307 </p>
jpayne@68 308 </dd>
jpayne@68 309 <dt> &lsquo;<samp>double-space</samp>&rsquo;</dt>
jpayne@68 310 <dd><p>Expect at least two whitespaces after a period
jpayne@68 311 </p>
jpayne@68 312 </dd>
jpayne@68 313 </dl>
jpayne@68 314
jpayne@68 315 </dd>
jpayne@68 316 </dl>
jpayne@68 317
jpayne@68 318
jpayne@68 319 <a name="SEC42"></a>
jpayne@68 320 <h3 class="subsection"> <a href="gettext_toc.html#TOC35">5.1.6 Language specific options</a> </h3>
jpayne@68 321
jpayne@68 322 <dl compact="compact">
jpayne@68 323 <dt> &lsquo;<samp>-a</samp>&rsquo;</dt>
jpayne@68 324 <dt> &lsquo;<samp>--extract-all</samp>&rsquo;</dt>
jpayne@68 325 <dd><a name="IDX169"></a>
jpayne@68 326 <a name="IDX170"></a>
jpayne@68 327 <p>Extract all strings.
jpayne@68 328 </p>
jpayne@68 329 <p>This option has an effect with most languages, namely C, C++, ObjectiveC,
jpayne@68 330 Shell, Python, Lisp, EmacsLisp, librep, Java, C#, awk, Tcl, Perl, PHP,
jpayne@68 331 GCC-source, Glade, Lua, JavaScript, Vala, GSettings.
jpayne@68 332 </p>
jpayne@68 333 </dd>
jpayne@68 334 <dt> &lsquo;<samp>-k[<var>keywordspec</var>]</samp>&rsquo;</dt>
jpayne@68 335 <dt> &lsquo;<samp>--keyword[=<var>keywordspec</var>]</samp>&rsquo;</dt>
jpayne@68 336 <dd><a name="IDX171"></a>
jpayne@68 337 <a name="IDX172"></a>
jpayne@68 338 <p>Specify <var>keywordspec</var> as an additional keyword to be looked for.
jpayne@68 339 Without a <var>keywordspec</var>, the option means to not use default keywords.
jpayne@68 340 </p>
jpayne@68 341 <a name="IDX173"></a>
jpayne@68 342 <a name="IDX174"></a>
jpayne@68 343 <p>If <var>keywordspec</var> is a C identifier <var>id</var>, <code>xgettext</code> looks
jpayne@68 344 for strings in the first argument of each call to the function or macro
jpayne@68 345 <var>id</var>. If <var>keywordspec</var> is of the form
jpayne@68 346 &lsquo;<samp><var>id</var>:<var>argnum</var></samp>&rsquo;, <code>xgettext</code> looks for strings in the
jpayne@68 347 <var>argnum</var>th argument of the call. If <var>keywordspec</var> is of the form
jpayne@68 348 &lsquo;<samp><var>id</var>:<var>argnum1</var>,<var>argnum2</var></samp>&rsquo;, <code>xgettext</code> looks for
jpayne@68 349 strings in the <var>argnum1</var>st argument and in the <var>argnum2</var>nd argument
jpayne@68 350 of the call, and treats them as singular/plural variants for a message
jpayne@68 351 with plural handling. Also, if <var>keywordspec</var> is of the form
jpayne@68 352 &lsquo;<samp><var>id</var>:<var>contextargnum</var>c,<var>argnum</var></samp>&rsquo; or
jpayne@68 353 &lsquo;<samp><var>id</var>:<var>argnum</var>,<var>contextargnum</var>c</samp>&rsquo;, <code>xgettext</code> treats
jpayne@68 354 strings in the <var>contextargnum</var>th argument as a context specifier.
jpayne@68 355 And, as a special-purpose support for GNOME, if <var>keywordspec</var> is of the
jpayne@68 356 form &lsquo;<samp><var>id</var>:<var>argnum</var>g</samp>&rsquo;, <code>xgettext</code> recognizes the
jpayne@68 357 <var>argnum</var>th argument as a string with context, using the GNOME <code>glib</code>
jpayne@68 358 syntax &lsquo;<samp>&quot;msgctxt|msgid&quot;</samp>&rsquo;.
jpayne@68 359 <br>
jpayne@68 360 Furthermore, if <var>keywordspec</var> is of the form
jpayne@68 361 &lsquo;<samp><var>id</var>:&hellip;,<var>totalnumargs</var>t</samp>&rsquo;, <code>xgettext</code> recognizes this
jpayne@68 362 argument specification only if the number of actual arguments is equal to
jpayne@68 363 <var>totalnumargs</var>. This is useful for disambiguating overloaded function
jpayne@68 364 calls in C++.
jpayne@68 365 <br>
jpayne@68 366 Finally, if <var>keywordspec</var> is of the form
jpayne@68 367 &lsquo;<samp><var>id</var>:<var>argnum</var>...,&quot;<var>xcomment</var>&quot;</samp>&rsquo;, <code>xgettext</code>, when
jpayne@68 368 extracting a message from the specified argument strings, adds an extracted
jpayne@68 369 comment <var>xcomment</var> to the message. Note that when used through a normal
jpayne@68 370 shell command line, the double-quotes around the <var>xcomment</var> need to be
jpayne@68 371 escaped.
jpayne@68 372 </p>
jpayne@68 373 <p>This option has an effect with most languages, namely C, C++, ObjectiveC,
jpayne@68 374 Shell, Python, Lisp, EmacsLisp, librep, Java, C#, awk, Tcl, Perl, PHP,
jpayne@68 375 GCC-source, Glade, Lua, JavaScript, Vala, GSettings, Desktop.
jpayne@68 376 </p>
jpayne@68 377 <p>The default keyword specifications, which are always looked for if not
jpayne@68 378 explicitly disabled, are language dependent. They are:
jpayne@68 379 </p>
jpayne@68 380 <ul class="toc">
jpayne@68 381 <li>
jpayne@68 382 For C, C++, and GCC-source: <code>gettext</code>, <code>dgettext:2</code>,
jpayne@68 383 <code>dcgettext:2</code>, <code>ngettext:1,2</code>, <code>dngettext:2,3</code>,
jpayne@68 384 <code>dcngettext:2,3</code>, <code>gettext_noop</code>, and <code>pgettext:1c,2</code>,
jpayne@68 385 <code>dpgettext:2c,3</code>, <code>dcpgettext:2c,3</code>, <code>npgettext:1c,2,3</code>,
jpayne@68 386 <code>dnpgettext:2c,3,4</code>, <code>dcnpgettext:2c,3,4</code>.
jpayne@68 387
jpayne@68 388 </li><li>
jpayne@68 389 For Objective C: Like for C, and also <code>NSLocalizedString</code>, <code>_</code>,
jpayne@68 390 <code>NSLocalizedStaticString</code>, <code>__</code>.
jpayne@68 391
jpayne@68 392 </li><li>
jpayne@68 393 For Shell scripts: <code>gettext</code>, <code>ngettext:1,2</code>, <code>eval_gettext</code>,
jpayne@68 394 <code>eval_ngettext:1,2</code>, <code>eval_pgettext:1c,2</code>,
jpayne@68 395 <code>eval_npgettext:1c,2,3</code>.
jpayne@68 396
jpayne@68 397 </li><li>
jpayne@68 398 For Python: <code>gettext</code>, <code>ugettext</code>, <code>dgettext:2</code>,
jpayne@68 399 <code>ngettext:1,2</code>, <code>ungettext:1,2</code>, <code>dngettext:2,3</code>, <code>_</code>.
jpayne@68 400
jpayne@68 401 </li><li>
jpayne@68 402 For Lisp: <code>gettext</code>, <code>ngettext:1,2</code>, <code>gettext-noop</code>.
jpayne@68 403
jpayne@68 404 </li><li>
jpayne@68 405 For EmacsLisp: <code>_</code>.
jpayne@68 406
jpayne@68 407 </li><li>
jpayne@68 408 For librep: <code>_</code>.
jpayne@68 409
jpayne@68 410 </li><li>
jpayne@68 411 For Scheme: <code>gettext</code>, <code>ngettext:1,2</code>, <code>gettext-noop</code>.
jpayne@68 412
jpayne@68 413 </li><li>
jpayne@68 414 For Java: <code>GettextResource.gettext:2</code>,
jpayne@68 415 <code>GettextResource.ngettext:2,3</code>, <code>GettextResource.pgettext:2c,3</code>,
jpayne@68 416 <code>GettextResource.npgettext:2c,3,4</code>, <code>gettext</code>, <code>ngettext:1,2</code>,
jpayne@68 417 <code>pgettext:1c,2</code>, <code>npgettext:1c,2,3</code>, <code>getString</code>.
jpayne@68 418
jpayne@68 419 </li><li>
jpayne@68 420 For C#: <code>GetString</code>, <code>GetPluralString:1,2</code>,
jpayne@68 421 <code>GetParticularString:1c,2</code>, <code>GetParticularPluralString:1c,2,3</code>.
jpayne@68 422
jpayne@68 423 </li><li>
jpayne@68 424 For awk: <code>dcgettext</code>, <code>dcngettext:1,2</code>.
jpayne@68 425
jpayne@68 426 </li><li>
jpayne@68 427 For Tcl: <code>::msgcat::mc</code>.
jpayne@68 428
jpayne@68 429 </li><li>
jpayne@68 430 For Perl: <code>gettext</code>, <code>%gettext</code>, <code>$gettext</code>, <code>dgettext:2</code>,
jpayne@68 431 <code>dcgettext:2</code>, <code>ngettext:1,2</code>, <code>dngettext:2,3</code>,
jpayne@68 432 <code>dcngettext:2,3</code>, <code>gettext_noop</code>.
jpayne@68 433
jpayne@68 434 </li><li>
jpayne@68 435 For PHP: <code>_</code>, <code>gettext</code>, <code>dgettext:2</code>, <code>dcgettext:2</code>,
jpayne@68 436 <code>ngettext:1,2</code>, <code>dngettext:2,3</code>, <code>dcngettext:2,3</code>.
jpayne@68 437
jpayne@68 438 </li><li>
jpayne@68 439 For Glade 1: <code>label</code>, <code>title</code>, <code>text</code>, <code>format</code>,
jpayne@68 440 <code>copyright</code>, <code>comments</code>, <code>preview_text</code>, <code>tooltip</code>.
jpayne@68 441
jpayne@68 442 </li><li>
jpayne@68 443 For Lua: <code>_</code>, <code>gettext.gettext</code>, <code>gettext.dgettext:2</code>,
jpayne@68 444 <code>gettext.dcgettext:2</code>, <code>gettext.ngettext:1,2</code>,
jpayne@68 445 <code>gettext.dngettext:2,3</code>, <code>gettext.dcngettext:2,3</code>.
jpayne@68 446
jpayne@68 447 </li><li>
jpayne@68 448 For JavaScript: <code>_</code>, <code>gettext</code>, <code>dgettext:2</code>,
jpayne@68 449 <code>dcgettext:2</code>, <code>ngettext:1,2</code>, <code>dngettext:2,3</code>,
jpayne@68 450 <code>pgettext:1c,2</code>, <code>dpgettext:2c,3</code>.
jpayne@68 451
jpayne@68 452 </li><li>
jpayne@68 453 For Vala: <code>_</code>, <code>Q_</code>, <code>N_</code>, <code>NC_</code>, <code>dgettext:2</code>,
jpayne@68 454 <code>dcgettext:2</code>, <code>ngettext:1,2</code>, <code>dngettext:2,3</code>,
jpayne@68 455 <code>dpgettext:2c,3</code>, <code>dpgettext2:2c,3</code>.
jpayne@68 456
jpayne@68 457 </li><li>
jpayne@68 458 For Desktop: <code>Name</code>, <code>GenericName</code>, <code>Comment</code>,
jpayne@68 459 <code>Keywords</code>.
jpayne@68 460 </li></ul>
jpayne@68 461
jpayne@68 462 <p>To disable the default keyword specifications, the option &lsquo;<samp>-k</samp>&rsquo; or
jpayne@68 463 &lsquo;<samp>--keyword</samp>&rsquo; or &lsquo;<samp>--keyword=</samp>&rsquo;, without a <var>keywordspec</var>, can be
jpayne@68 464 used.
jpayne@68 465 </p>
jpayne@68 466 </dd>
jpayne@68 467 <dt> &lsquo;<samp>--flag=<var>word</var>:<var>arg</var>:<var>flag</var></samp>&rsquo;</dt>
jpayne@68 468 <dd><a name="IDX175"></a>
jpayne@68 469 <p>Specifies additional flags for strings occurring as part of the <var>arg</var>th
jpayne@68 470 argument of the function <var>word</var>. The possible flags are the possible
jpayne@68 471 format string indicators, such as &lsquo;<samp>c-format</samp>&rsquo;, and their negations,
jpayne@68 472 such as &lsquo;<samp>no-c-format</samp>&rsquo;, possibly prefixed with &lsquo;<samp>pass-</samp>&rsquo;.
jpayne@68 473 <br>
jpayne@68 474 <a name="IDX176"></a>
jpayne@68 475 The meaning of <code>--flag=<var>function</var>:<var>arg</var>:<var>lang</var>-format</code>
jpayne@68 476 is that in language <var>lang</var>, the specified <var>function</var> expects as
jpayne@68 477 <var>arg</var>th argument a format string. (For those of you familiar with
jpayne@68 478 GCC function attributes, <code>--flag=<var>function</var>:<var>arg</var>:c-format</code> is
jpayne@68 479 roughly equivalent to the declaration
jpayne@68 480 &lsquo;<samp>__attribute__ ((__format__ (__printf__, <var>arg</var>, ...)))</samp>&rsquo; attached
jpayne@68 481 to <var>function</var> in a C source file.)
jpayne@68 482 For example, if you use the &lsquo;<samp>error</samp>&rsquo; function from GNU libc, you can
jpayne@68 483 specify its behaviour through <code>--flag=error:3:c-format</code>. The effect of
jpayne@68 484 this specification is that <code>xgettext</code> will mark as format strings all
jpayne@68 485 <code>gettext</code> invocations that occur as <var>arg</var>th argument of
jpayne@68 486 <var>function</var>.
jpayne@68 487 This is useful when such strings contain no format string directives:
jpayne@68 488 together with the checks done by &lsquo;<samp>msgfmt -c</samp>&rsquo; it will ensure that
jpayne@68 489 translators cannot accidentally use format string directives that would
jpayne@68 490 lead to a crash at runtime.
jpayne@68 491 <br>
jpayne@68 492 <a name="IDX177"></a>
jpayne@68 493 The meaning of <code>--flag=<var>function</var>:<var>arg</var>:pass-<var>lang</var>-format</code>
jpayne@68 494 is that in language <var>lang</var>, if the <var>function</var> call occurs in a
jpayne@68 495 position that must yield a format string, then its <var>arg</var>th argument
jpayne@68 496 must yield a format string of the same type as well. (If you know GCC
jpayne@68 497 function attributes, the <code>--flag=<var>function</var>:<var>arg</var>:pass-c-format</code>
jpayne@68 498 option is roughly equivalent to the declaration
jpayne@68 499 &lsquo;<samp>__attribute__ ((__format_arg__ (<var>arg</var>)))</samp>&rsquo; attached to <var>function</var>
jpayne@68 500 in a C source file.)
jpayne@68 501 For example, if you use the &lsquo;<samp>_</samp>&rsquo; shortcut for the <code>gettext</code> function,
jpayne@68 502 you should use <code>--flag=_:1:pass-c-format</code>. The effect of this
jpayne@68 503 specification is that <code>xgettext</code> will propagate a format string
jpayne@68 504 requirement for a <code>_(&quot;string&quot;)</code> call to its first argument, the literal
jpayne@68 505 <code>&quot;string&quot;</code>, and thus mark it as a format string.
jpayne@68 506 This is useful when such strings contain no format string directives:
jpayne@68 507 together with the checks done by &lsquo;<samp>msgfmt -c</samp>&rsquo; it will ensure that
jpayne@68 508 translators cannot accidentally use format string directives that would
jpayne@68 509 lead to a crash at runtime.
jpayne@68 510 <br>
jpayne@68 511 This option has an effect with most languages, namely C, C++, ObjectiveC,
jpayne@68 512 Shell, Python, Lisp, EmacsLisp, librep, Scheme, Java, C#, awk, YCP, Tcl, Perl, PHP,
jpayne@68 513 GCC-source, Lua, JavaScript, Vala.
jpayne@68 514 </p>
jpayne@68 515 </dd>
jpayne@68 516 <dt> &lsquo;<samp>-T</samp>&rsquo;</dt>
jpayne@68 517 <dt> &lsquo;<samp>--trigraphs</samp>&rsquo;</dt>
jpayne@68 518 <dd><a name="IDX178"></a>
jpayne@68 519 <a name="IDX179"></a>
jpayne@68 520 <a name="IDX180"></a>
jpayne@68 521 <p>Understand ANSI C trigraphs for input.
jpayne@68 522 <br>
jpayne@68 523 This option has an effect only with the languages C, C++, ObjectiveC.
jpayne@68 524 </p>
jpayne@68 525 </dd>
jpayne@68 526 <dt> &lsquo;<samp>--qt</samp>&rsquo;</dt>
jpayne@68 527 <dd><a name="IDX181"></a>
jpayne@68 528 <a name="IDX182"></a>
jpayne@68 529 <p>Recognize Qt format strings.
jpayne@68 530 <br>
jpayne@68 531 This option has an effect only with the language C++.
jpayne@68 532 </p>
jpayne@68 533 </dd>
jpayne@68 534 <dt> &lsquo;<samp>--kde</samp>&rsquo;</dt>
jpayne@68 535 <dd><a name="IDX183"></a>
jpayne@68 536 <a name="IDX184"></a>
jpayne@68 537 <p>Recognize KDE 4 format strings.
jpayne@68 538 <br>
jpayne@68 539 This option has an effect only with the language C++.
jpayne@68 540 </p>
jpayne@68 541 </dd>
jpayne@68 542 <dt> &lsquo;<samp>--boost</samp>&rsquo;</dt>
jpayne@68 543 <dd><a name="IDX185"></a>
jpayne@68 544 <a name="IDX186"></a>
jpayne@68 545 <p>Recognize Boost format strings.
jpayne@68 546 <br>
jpayne@68 547 This option has an effect only with the language C++.
jpayne@68 548 </p>
jpayne@68 549 </dd>
jpayne@68 550 <dt> &lsquo;<samp>--debug</samp>&rsquo;</dt>
jpayne@68 551 <dd><a name="IDX187"></a>
jpayne@68 552 <a name="IDX188"></a>
jpayne@68 553 <p>Use the flags <code>c-format</code> and <code>possible-c-format</code> to show who was
jpayne@68 554 responsible for marking a message as a format string. The latter form is
jpayne@68 555 used if the <code>xgettext</code> program decided, the former form is used if
jpayne@68 556 the programmer prescribed it.
jpayne@68 557 </p>
jpayne@68 558 <p>By default only the <code>c-format</code> form is used. The translator should
jpayne@68 559 not have to care about these details.
jpayne@68 560 </p>
jpayne@68 561 </dd>
jpayne@68 562 </dl>
jpayne@68 563
jpayne@68 564 <p>This implementation of <code>xgettext</code> is able to process a few awkward
jpayne@68 565 cases, like strings in preprocessor macros, ANSI concatenation of
jpayne@68 566 adjacent strings, and escaped end of lines for continued strings.
jpayne@68 567 </p>
jpayne@68 568
jpayne@68 569 <a name="SEC43"></a>
jpayne@68 570 <h3 class="subsection"> <a href="gettext_toc.html#TOC36">5.1.7 Output details</a> </h3>
jpayne@68 571
jpayne@68 572
jpayne@68 573 <dl compact="compact">
jpayne@68 574 <dt> &lsquo;<samp>--color</samp>&rsquo;</dt>
jpayne@68 575 <dt> &lsquo;<samp>--color=<var>when</var></samp>&rsquo;</dt>
jpayne@68 576 <dd><a name="IDX189"></a>
jpayne@68 577 <p>Specify whether or when to use colors and other text attributes.
jpayne@68 578 See <a href="gettext_9.html#SEC158">The <code>--color</code> option</a> for details.
jpayne@68 579 </p>
jpayne@68 580 </dd>
jpayne@68 581 <dt> &lsquo;<samp>--style=<var>style_file</var></samp>&rsquo;</dt>
jpayne@68 582 <dd><a name="IDX190"></a>
jpayne@68 583 <p>Specify the CSS style rule file to use for <code>--color</code>.
jpayne@68 584 See <a href="gettext_9.html#SEC160">The <code>--style</code> option</a> for details.
jpayne@68 585 </p>
jpayne@68 586 </dd>
jpayne@68 587 <dt> &lsquo;<samp>--force-po</samp>&rsquo;</dt>
jpayne@68 588 <dd><a name="IDX191"></a>
jpayne@68 589 <p>Always write an output file even if no message is defined.
jpayne@68 590 </p>
jpayne@68 591 </dd>
jpayne@68 592 <dt> &lsquo;<samp>-i</samp>&rsquo;</dt>
jpayne@68 593 <dt> &lsquo;<samp>--indent</samp>&rsquo;</dt>
jpayne@68 594 <dd><a name="IDX192"></a>
jpayne@68 595 <a name="IDX193"></a>
jpayne@68 596 <p>Write the .po file using indented style.
jpayne@68 597 </p>
jpayne@68 598 </dd>
jpayne@68 599 <dt> &lsquo;<samp>--no-location</samp>&rsquo;</dt>
jpayne@68 600 <dd><a name="IDX194"></a>
jpayne@68 601 <p>Do not write &lsquo;<samp>#: <var>filename</var>:<var>line</var></samp>&rsquo; lines. Note that using
jpayne@68 602 this option makes it harder for technically skilled translators to understand
jpayne@68 603 each message's context.
jpayne@68 604 </p>
jpayne@68 605 </dd>
jpayne@68 606 <dt> &lsquo;<samp>-n</samp>&rsquo;</dt>
jpayne@68 607 <dt> &lsquo;<samp>--add-location=<var>type</var></samp>&rsquo;</dt>
jpayne@68 608 <dd><a name="IDX195"></a>
jpayne@68 609 <a name="IDX196"></a>
jpayne@68 610 <p>Generate &lsquo;<samp>#: <var>filename</var>:<var>line</var></samp>&rsquo; lines (default).
jpayne@68 611 </p>
jpayne@68 612 <p>The optional <var>type</var> can be either &lsquo;<samp>full</samp>&rsquo;, &lsquo;<samp>file</samp>&rsquo;, or
jpayne@68 613 &lsquo;<samp>never</samp>&rsquo;. If it is not given or &lsquo;<samp>full</samp>&rsquo;, it generates the
jpayne@68 614 lines with both file name and line number. If it is &lsquo;<samp>file</samp>&rsquo;, the
jpayne@68 615 line number part is omitted. If it is &lsquo;<samp>never</samp>&rsquo;, it completely
jpayne@68 616 suppresses the lines (same as <code>--no-location</code>).
jpayne@68 617 </p>
jpayne@68 618 </dd>
jpayne@68 619 <dt> &lsquo;<samp>--strict</samp>&rsquo;</dt>
jpayne@68 620 <dd><a name="IDX197"></a>
jpayne@68 621 <p>Write out a strict Uniforum conforming PO file. Note that this
jpayne@68 622 Uniforum format should be avoided because it doesn't support the
jpayne@68 623 GNU extensions.
jpayne@68 624 </p>
jpayne@68 625 </dd>
jpayne@68 626 <dt> &lsquo;<samp>--properties-output</samp>&rsquo;</dt>
jpayne@68 627 <dd><a name="IDX198"></a>
jpayne@68 628 <p>Write out a Java ResourceBundle in Java <code>.properties</code> syntax. Note
jpayne@68 629 that this file format doesn't support plural forms and silently drops
jpayne@68 630 obsolete messages.
jpayne@68 631 </p>
jpayne@68 632 </dd>
jpayne@68 633 <dt> &lsquo;<samp>--stringtable-output</samp>&rsquo;</dt>
jpayne@68 634 <dd><a name="IDX199"></a>
jpayne@68 635 <p>Write out a NeXTstep/GNUstep localized resource file in <code>.strings</code> syntax.
jpayne@68 636 Note that this file format doesn't support plural forms.
jpayne@68 637 </p>
jpayne@68 638 </dd>
jpayne@68 639 <dt> &lsquo;<samp>--its=<var>file</var></samp>&rsquo;</dt>
jpayne@68 640 <dd><a name="IDX200"></a>
jpayne@68 641 <p>Use ITS rules defined in <var>file</var>.
jpayne@68 642 Note that this is only effective with XML files.
jpayne@68 643 </p>
jpayne@68 644 </dd>
jpayne@68 645 <dt> &lsquo;<samp>--itstool</samp>&rsquo;</dt>
jpayne@68 646 <dd><a name="IDX201"></a>
jpayne@68 647 <p>Write out comments recognized by itstool (<a href="http://itstool.org">http://itstool.org</a>).
jpayne@68 648 Note that this is only effective with XML files.
jpayne@68 649 </p>
jpayne@68 650 </dd>
jpayne@68 651 <dt> &lsquo;<samp>-w <var>number</var></samp>&rsquo;</dt>
jpayne@68 652 <dt> &lsquo;<samp>--width=<var>number</var></samp>&rsquo;</dt>
jpayne@68 653 <dd><a name="IDX202"></a>
jpayne@68 654 <a name="IDX203"></a>
jpayne@68 655 <p>Set the output page width. Long strings in the output files will be
jpayne@68 656 split across multiple lines in order to ensure that each line's width
jpayne@68 657 (= number of screen columns) is less or equal to the given <var>number</var>.
jpayne@68 658 </p>
jpayne@68 659 </dd>
jpayne@68 660 <dt> &lsquo;<samp>--no-wrap</samp>&rsquo;</dt>
jpayne@68 661 <dd><a name="IDX204"></a>
jpayne@68 662 <p>Do not break long message lines. Message lines whose width exceeds the
jpayne@68 663 output page width will not be split into several lines. Only file reference
jpayne@68 664 lines which are wider than the output page width will be split.
jpayne@68 665 </p>
jpayne@68 666 </dd>
jpayne@68 667 <dt> &lsquo;<samp>-s</samp>&rsquo;</dt>
jpayne@68 668 <dt> &lsquo;<samp>--sort-output</samp>&rsquo;</dt>
jpayne@68 669 <dd><a name="IDX205"></a>
jpayne@68 670 <a name="IDX206"></a>
jpayne@68 671 <a name="IDX207"></a>
jpayne@68 672 <p>Generate sorted output (deprecated). Note that using this option makes it
jpayne@68 673 much harder for the translator to understand each message's context.
jpayne@68 674 </p>
jpayne@68 675 </dd>
jpayne@68 676 <dt> &lsquo;<samp>-F</samp>&rsquo;</dt>
jpayne@68 677 <dt> &lsquo;<samp>--sort-by-file</samp>&rsquo;</dt>
jpayne@68 678 <dd><a name="IDX208"></a>
jpayne@68 679 <a name="IDX209"></a>
jpayne@68 680 <p>Sort output by file location.
jpayne@68 681 </p>
jpayne@68 682 </dd>
jpayne@68 683 <dt> &lsquo;<samp>--omit-header</samp>&rsquo;</dt>
jpayne@68 684 <dd><a name="IDX210"></a>
jpayne@68 685 <p>Don't write header with &lsquo;<samp>msgid &quot;&quot;</samp>&rsquo; entry.
jpayne@68 686 </p>
jpayne@68 687 <a name="IDX211"></a>
jpayne@68 688 <p>This is useful for testing purposes because it eliminates a source
jpayne@68 689 of variance for generated <code>.gmo</code> files. With <code>--omit-header</code>,
jpayne@68 690 two invocations of <code>xgettext</code> on the same files with the same
jpayne@68 691 options at different times are guaranteed to produce the same results.
jpayne@68 692 </p>
jpayne@68 693 <p>Note that using this option will lead to an error if the resulting file
jpayne@68 694 would not entirely be in ASCII.
jpayne@68 695 </p>
jpayne@68 696 </dd>
jpayne@68 697 <dt> &lsquo;<samp>--copyright-holder=<var>string</var></samp>&rsquo;</dt>
jpayne@68 698 <dd><a name="IDX212"></a>
jpayne@68 699 <p>Set the copyright holder in the output. <var>string</var> should be the
jpayne@68 700 copyright holder of the surrounding package. (Note that the msgstr
jpayne@68 701 strings, extracted from the package's sources, belong to the copyright
jpayne@68 702 holder of the package.) Translators are expected to transfer or disclaim
jpayne@68 703 the copyright for their translations, so that package maintainers can
jpayne@68 704 distribute them without legal risk. If <var>string</var> is empty, the output
jpayne@68 705 files are marked as being in the public domain; in this case, the translators
jpayne@68 706 are expected to disclaim their copyright, again so that package maintainers
jpayne@68 707 can distribute them without legal risk.
jpayne@68 708 </p>
jpayne@68 709 <p>The default value for <var>string</var> is the Free Software Foundation, Inc.,
jpayne@68 710 simply because <code>xgettext</code> was first used in the GNU project.
jpayne@68 711 </p>
jpayne@68 712 </dd>
jpayne@68 713 <dt> &lsquo;<samp>--foreign-user</samp>&rsquo;</dt>
jpayne@68 714 <dd><a name="IDX213"></a>
jpayne@68 715 <p>Omit FSF copyright in output. This option is equivalent to
jpayne@68 716 &lsquo;<samp>--copyright-holder=''</samp>&rsquo;. It can be useful for packages outside the GNU
jpayne@68 717 project that want their translations to be in the public domain.
jpayne@68 718 </p>
jpayne@68 719 </dd>
jpayne@68 720 <dt> &lsquo;<samp>--package-name=<var>package</var></samp>&rsquo;</dt>
jpayne@68 721 <dd><a name="IDX214"></a>
jpayne@68 722 <p>Set the package name in the header of the output.
jpayne@68 723 </p>
jpayne@68 724 </dd>
jpayne@68 725 <dt> &lsquo;<samp>--package-version=<var>version</var></samp>&rsquo;</dt>
jpayne@68 726 <dd><a name="IDX215"></a>
jpayne@68 727 <p>Set the package version in the header of the output. This option has an
jpayne@68 728 effect only if the &lsquo;<samp>--package-name</samp>&rsquo; option is also used.
jpayne@68 729 </p>
jpayne@68 730 </dd>
jpayne@68 731 <dt> &lsquo;<samp>--msgid-bugs-address=<var>email@address</var></samp>&rsquo;</dt>
jpayne@68 732 <dd><a name="IDX216"></a>
jpayne@68 733 <p>Set the reporting address for msgid bugs. This is the email address or URL
jpayne@68 734 to which the translators shall report bugs in the untranslated strings:
jpayne@68 735 </p>
jpayne@68 736 <ul class="toc">
jpayne@68 737 <li> - Strings which are not entire sentences; see the maintainer guidelines
jpayne@68 738 in <a href="gettext_4.html#SEC20">Preparing Translatable Strings</a>.
jpayne@68 739 </li><li> - Strings which use unclear terms or require additional context to be
jpayne@68 740 understood.
jpayne@68 741 </li><li> - Strings which make invalid assumptions about notation of date, time or
jpayne@68 742 money.
jpayne@68 743 </li><li> - Pluralisation problems.
jpayne@68 744 </li><li> - Incorrect English spelling.
jpayne@68 745 </li><li> - Incorrect formatting.
jpayne@68 746 </li></ul>
jpayne@68 747
jpayne@68 748 <p>It can be your email address, or a mailing list address where translators
jpayne@68 749 can write to without being subscribed, or the URL of a web page through
jpayne@68 750 which the translators can contact you.
jpayne@68 751 </p>
jpayne@68 752 <p>The default value is empty, which means that translators will be clueless!
jpayne@68 753 Don't forget to specify this option.
jpayne@68 754 </p>
jpayne@68 755 </dd>
jpayne@68 756 <dt> &lsquo;<samp>-m[<var>string</var>]</samp>&rsquo;</dt>
jpayne@68 757 <dt> &lsquo;<samp>--msgstr-prefix[=<var>string</var>]</samp>&rsquo;</dt>
jpayne@68 758 <dd><a name="IDX217"></a>
jpayne@68 759 <a name="IDX218"></a>
jpayne@68 760 <p>Use <var>string</var> (or &quot;&quot; if not specified) as prefix for msgstr values.
jpayne@68 761 </p>
jpayne@68 762 </dd>
jpayne@68 763 <dt> &lsquo;<samp>-M[<var>string</var>]</samp>&rsquo;</dt>
jpayne@68 764 <dt> &lsquo;<samp>--msgstr-suffix[=<var>string</var>]</samp>&rsquo;</dt>
jpayne@68 765 <dd><a name="IDX219"></a>
jpayne@68 766 <a name="IDX220"></a>
jpayne@68 767 <p>Use <var>string</var> (or &quot;&quot; if not specified) as suffix for msgstr values.
jpayne@68 768 </p>
jpayne@68 769 </dd>
jpayne@68 770 </dl>
jpayne@68 771
jpayne@68 772
jpayne@68 773 <a name="SEC44"></a>
jpayne@68 774 <h3 class="subsection"> <a href="gettext_toc.html#TOC37">5.1.8 Informative output</a> </h3>
jpayne@68 775
jpayne@68 776 <dl compact="compact">
jpayne@68 777 <dt> &lsquo;<samp>-h</samp>&rsquo;</dt>
jpayne@68 778 <dt> &lsquo;<samp>--help</samp>&rsquo;</dt>
jpayne@68 779 <dd><a name="IDX221"></a>
jpayne@68 780 <a name="IDX222"></a>
jpayne@68 781 <p>Display this help and exit.
jpayne@68 782 </p>
jpayne@68 783 </dd>
jpayne@68 784 <dt> &lsquo;<samp>-V</samp>&rsquo;</dt>
jpayne@68 785 <dt> &lsquo;<samp>--version</samp>&rsquo;</dt>
jpayne@68 786 <dd><a name="IDX223"></a>
jpayne@68 787 <a name="IDX224"></a>
jpayne@68 788 <p>Output version information and exit.
jpayne@68 789 </p>
jpayne@68 790 </dd>
jpayne@68 791 <dt> &lsquo;<samp>-v</samp>&rsquo;</dt>
jpayne@68 792 <dt> &lsquo;<samp>--verbose</samp>&rsquo;</dt>
jpayne@68 793 <dd><a name="IDX225"></a>
jpayne@68 794 <a name="IDX226"></a>
jpayne@68 795 <p>Increase verbosity level.
jpayne@68 796 </p>
jpayne@68 797 </dd>
jpayne@68 798 </dl>
jpayne@68 799
jpayne@68 800
jpayne@68 801 <table cellpadding="1" cellspacing="1" border="0">
jpayne@68 802 <tr><td valign="middle" align="left">[<a href="#SEC35" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
jpayne@68 803 <td valign="middle" align="left">[<a href="gettext_6.html#SEC45" title="Next chapter"> &gt;&gt; </a>]</td>
jpayne@68 804 <td valign="middle" align="left"> &nbsp; </td>
jpayne@68 805 <td valign="middle" align="left"> &nbsp; </td>
jpayne@68 806 <td valign="middle" align="left"> &nbsp; </td>
jpayne@68 807 <td valign="middle" align="left"> &nbsp; </td>
jpayne@68 808 <td valign="middle" align="left"> &nbsp; </td>
jpayne@68 809 <td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
jpayne@68 810 <td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
jpayne@68 811 <td valign="middle" align="left">[<a href="gettext_21.html#SEC389" title="Index">Index</a>]</td>
jpayne@68 812 <td valign="middle" align="left">[<a href="gettext_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
jpayne@68 813 </tr></table>
jpayne@68 814 <p>
jpayne@68 815 <font size="-1">
jpayne@68 816 This document was generated by <em>Bruno Haible</em> on <em>February, 21 2024</em> using <a href="https://www.nongnu.org/texi2html/"><em>texi2html 1.78a</em></a>.
jpayne@68 817 </font>
jpayne@68 818 <br>
jpayne@68 819
jpayne@68 820 </p>
jpayne@68 821 </body>
jpayne@68 822 </html>