1<HTML> 2<HEAD> 3<!-- This HTML file has been created by texi2html 1.52b 4 from gettext.texi on 27 November 2006 --> 5 6<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8"> 7<TITLE>GNU gettext utilities - 5 Making the PO Template File</TITLE> 8</HEAD> 9<BODY> 10Go to the <A HREF="gettext_1.html">first</A>, <A HREF="gettext_4.html">previous</A>, <A HREF="gettext_6.html">next</A>, <A HREF="gettext_25.html">last</A> section, <A HREF="gettext_toc.html">table of contents</A>. 11<P><HR><P> 12 13 14<H1><A NAME="SEC21" HREF="gettext_toc.html#TOC21">5 Making the PO Template File</A></H1> 15<P> 16<A NAME="IDX142"></A> 17 18</P> 19<P> 20After preparing the sources, the programmer creates a PO template file. 21This section explains how to use <CODE>xgettext</CODE> for this purpose. 22 23</P> 24<P> 25<CODE>xgettext</CODE> creates a file named <TT>‘<VAR>domainname</VAR>.po’</TT>. You 26should then rename it to <TT>‘<VAR>domainname</VAR>.pot’</TT>. (Why doesn't 27<CODE>xgettext</CODE> create it under the name <TT>‘<VAR>domainname</VAR>.pot’</TT> 28right away? The answer is: for historical reasons. When <CODE>xgettext</CODE> 29was specified, the distinction between a PO file and PO file template 30was fuzzy, and the suffix <SAMP>‘.pot’</SAMP> wasn't in use at that time.) 31 32</P> 33 34 35 36<H2><A NAME="SEC22" HREF="gettext_toc.html#TOC22">5.1 Invoking the <CODE>xgettext</CODE> Program</A></H2> 37 38<P> 39<A NAME="IDX143"></A> 40<A NAME="IDX144"></A> 41 42<PRE> 43xgettext [<VAR>option</VAR>] [<VAR>inputfile</VAR>] ... 44</PRE> 45 46<P> 47The <CODE>xgettext</CODE> program extracts translatable strings from given 48input files. 49 50</P> 51 52 53<H3><A NAME="SEC23" HREF="gettext_toc.html#TOC23">5.1.1 Input file location</A></H3> 54 55<DL COMPACT> 56 57<DT><SAMP>‘<VAR>inputfile</VAR> ...’</SAMP> 58<DD> 59Input files. 60 61<DT><SAMP>‘-f <VAR>file</VAR>’</SAMP> 62<DD> 63<DT><SAMP>‘--files-from=<VAR>file</VAR>’</SAMP> 64<DD> 65<A NAME="IDX145"></A> 66<A NAME="IDX146"></A> 67Read the names of the input files from <VAR>file</VAR> instead of getting 68them from the command line. 69 70<DT><SAMP>‘-D <VAR>directory</VAR>’</SAMP> 71<DD> 72<DT><SAMP>‘--directory=<VAR>directory</VAR>’</SAMP> 73<DD> 74<A NAME="IDX147"></A> 75<A NAME="IDX148"></A> 76Add <VAR>directory</VAR> to the list of directories. Source files are 77searched relative to this list of directories. The resulting <TT>‘.po’</TT> 78file will be written relative to the current directory, though. 79 80</DL> 81 82<P> 83If <VAR>inputfile</VAR> is <SAMP>‘-’</SAMP>, standard input is read. 84 85</P> 86 87 88<H3><A NAME="SEC24" HREF="gettext_toc.html#TOC24">5.1.2 Output file location</A></H3> 89 90<DL COMPACT> 91 92<DT><SAMP>‘-d <VAR>name</VAR>’</SAMP> 93<DD> 94<DT><SAMP>‘--default-domain=<VAR>name</VAR>’</SAMP> 95<DD> 96<A NAME="IDX149"></A> 97<A NAME="IDX150"></A> 98Use <TT>‘<VAR>name</VAR>.po’</TT> for output (instead of <TT>‘messages.po’</TT>). 99 100<DT><SAMP>‘-o <VAR>file</VAR>’</SAMP> 101<DD> 102<DT><SAMP>‘--output=<VAR>file</VAR>’</SAMP> 103<DD> 104<A NAME="IDX151"></A> 105<A NAME="IDX152"></A> 106Write output to specified file (instead of <TT>‘<VAR>name</VAR>.po’</TT> or 107<TT>‘messages.po’</TT>). 108 109<DT><SAMP>‘-p <VAR>dir</VAR>’</SAMP> 110<DD> 111<DT><SAMP>‘--output-dir=<VAR>dir</VAR>’</SAMP> 112<DD> 113<A NAME="IDX153"></A> 114<A NAME="IDX154"></A> 115Output files will be placed in directory <VAR>dir</VAR>. 116 117</DL> 118 119<P> 120<A NAME="IDX155"></A> 121If the output <VAR>file</VAR> is <SAMP>‘-’</SAMP> or <SAMP>‘/dev/stdout’</SAMP>, the output 122is written to standard output. 123 124</P> 125 126 127<H3><A NAME="SEC25" HREF="gettext_toc.html#TOC25">5.1.3 Choice of input file language</A></H3> 128 129<DL COMPACT> 130 131<DT><SAMP>‘-L <VAR>name</VAR>’</SAMP> 132<DD> 133<DT><SAMP>‘--language=<VAR>name</VAR>’</SAMP> 134<DD> 135<A NAME="IDX156"></A> 136<A NAME="IDX157"></A> 137<A NAME="IDX158"></A> 138Specifies the language of the input files. The supported languages 139are <CODE>C</CODE>, <CODE>C++</CODE>, <CODE>ObjectiveC</CODE>, <CODE>PO</CODE>, <CODE>Python</CODE>, 140<CODE>Lisp</CODE>, <CODE>EmacsLisp</CODE>, <CODE>librep</CODE>, <CODE>Scheme</CODE>, <CODE>Smalltalk</CODE>, 141<CODE>Java</CODE>, <CODE>JavaProperties</CODE>, <CODE>C#</CODE>, <CODE>awk</CODE>, <CODE>YCP</CODE>, 142<CODE>Tcl</CODE>, <CODE>Perl</CODE>, <CODE>PHP</CODE>, <CODE>GCC-source</CODE>, <CODE>NXStringTable</CODE>, 143<CODE>RST</CODE>, <CODE>Glade</CODE>. 144 145<DT><SAMP>‘-C’</SAMP> 146<DD> 147<DT><SAMP>‘--c++’</SAMP> 148<DD> 149<A NAME="IDX159"></A> 150<A NAME="IDX160"></A> 151This is a shorthand for <CODE>--language=C++</CODE>. 152 153</DL> 154 155<P> 156By default the language is guessed depending on the input file name 157extension. 158 159</P> 160 161 162<H3><A NAME="SEC26" HREF="gettext_toc.html#TOC26">5.1.4 Input file interpretation</A></H3> 163 164<DL COMPACT> 165 166<DT><SAMP>‘--from-code=<VAR>name</VAR>’</SAMP> 167<DD> 168<A NAME="IDX161"></A> 169Specifies the encoding of the input files. This option is needed only 170if some untranslated message strings or their corresponding comments 171contain non-ASCII characters. Note that Tcl and Glade input files are 172always assumed to be in UTF-8, regardless of this option. 173 174</DL> 175 176<P> 177By default the input files are assumed to be in ASCII. 178 179</P> 180 181 182<H3><A NAME="SEC27" HREF="gettext_toc.html#TOC27">5.1.5 Operation mode</A></H3> 183 184<DL COMPACT> 185 186<DT><SAMP>‘-j’</SAMP> 187<DD> 188<DT><SAMP>‘--join-existing’</SAMP> 189<DD> 190<A NAME="IDX162"></A> 191<A NAME="IDX163"></A> 192Join messages with existing file. 193 194<DT><SAMP>‘-x <VAR>file</VAR>’</SAMP> 195<DD> 196<DT><SAMP>‘--exclude-file=<VAR>file</VAR>’</SAMP> 197<DD> 198<A NAME="IDX164"></A> 199<A NAME="IDX165"></A> 200Entries from <VAR>file</VAR> are not extracted. <VAR>file</VAR> should be a PO or 201POT file. 202 203<DT><SAMP>‘-c [<VAR>tag</VAR>]’</SAMP> 204<DD> 205<DT><SAMP>‘--add-comments[=<VAR>tag</VAR>]’</SAMP> 206<DD> 207<A NAME="IDX166"></A> 208<A NAME="IDX167"></A> 209Place comment block with <VAR>tag</VAR> (or those preceding keyword lines) 210in output file. 211 212</DL> 213 214 215 216<H3><A NAME="SEC28" HREF="gettext_toc.html#TOC28">5.1.6 Language specific options</A></H3> 217 218<DL COMPACT> 219 220<DT><SAMP>‘-a’</SAMP> 221<DD> 222<DT><SAMP>‘--extract-all’</SAMP> 223<DD> 224<A NAME="IDX168"></A> 225<A NAME="IDX169"></A> 226Extract all strings. 227 228This option has an effect with most languages, namely C, C++, ObjectiveC, 229Shell, Python, Lisp, EmacsLisp, librep, Java, C#, awk, Tcl, Perl, PHP, 230GCC-source, Glade. 231 232<DT><SAMP>‘-k <VAR>keywordspec</VAR>’</SAMP> 233<DD> 234<DT><SAMP>‘--keyword[=<VAR>keywordspec</VAR>]’</SAMP> 235<DD> 236<A NAME="IDX170"></A> 237<A NAME="IDX171"></A> 238Additional keyword to be looked for (without <VAR>keywordspec</VAR> means not to 239use default keywords). 240 241<A NAME="IDX172"></A> 242<A NAME="IDX173"></A> 243If <VAR>keywordspec</VAR> is a C identifier <VAR>id</VAR>, <CODE>xgettext</CODE> looks 244for strings in the first argument of each call to the function or macro 245<VAR>id</VAR>. If <VAR>keywordspec</VAR> is of the form 246<SAMP>‘<VAR>id</VAR>:<VAR>argnum</VAR>’</SAMP>, <CODE>xgettext</CODE> looks for strings in the 247<VAR>argnum</VAR>th argument of the call. If <VAR>keywordspec</VAR> is of the form 248<SAMP>‘<VAR>id</VAR>:<VAR>argnum1</VAR>,<VAR>argnum2</VAR>’</SAMP>, <CODE>xgettext</CODE> looks for 249strings in the <VAR>argnum1</VAR>st argument and in the <VAR>argnum2</VAR>nd argument 250of the call, and treats them as singular/plural variants for a message 251with plural handling. Also, if <VAR>keywordspec</VAR> is of the form 252<SAMP>‘<VAR>id</VAR>:<VAR>contextargnum</VAR>c,<VAR>argnum</VAR>’</SAMP> or 253<SAMP>‘<VAR>id</VAR>:<VAR>argnum</VAR>,<VAR>contextargnum</VAR>c’</SAMP>, <CODE>xgettext</CODE> treats 254strings in the <VAR>contextargnum</VAR>th argument as a context specifier. 255And, as a special-purpose support for GNOME, if <VAR>keywordspec</VAR> is of the 256form <SAMP>‘<VAR>id</VAR>:<VAR>argnum</VAR>g’</SAMP>, <CODE>xgettext</CODE> recognizes the 257<VAR>argnum</VAR>th argument as a string with context, using the GNOME <CODE>glib</CODE> 258syntax <SAMP>‘"msgctxt|msgid"’</SAMP>. 259<BR> 260Furthermore, if <VAR>keywordspec</VAR> is of the form 261<SAMP>‘<VAR>id</VAR>:...,<VAR>totalnumargs</VAR>t’</SAMP>, <CODE>xgettext</CODE> recognizes this 262argument specification only if the number of actual arguments is equal to 263<VAR>totalnumargs</VAR>. This is useful for disambiguating overloaded function 264calls in C++. 265<BR> 266Finally, if <VAR>keywordspec</VAR> is of the form 267<SAMP>‘<VAR>id</VAR>:<VAR>argnum</VAR>...,"<VAR>xcomment</VAR>"’</SAMP>, <CODE>xgettext</CODE>, when 268extracting a message from the specified argument strings, adds an extracted 269comment <VAR>xcomment</VAR> to the message. Note that when used through a normal 270shell command line, the double-quotes around the <VAR>xcomment</VAR> need to be 271escaped. 272 273This option has an effect with most languages, namely C, C++, ObjectiveC, 274Shell, Python, Lisp, EmacsLisp, librep, Java, C#, awk, Tcl, Perl, PHP, 275GCC-source, Glade. 276 277The default keyword specifications, which are always looked for if not 278explicitly disabled, are language dependent. They are: 279 280 281<UL> 282<LI> 283 284For C, C++, and GCC-source: <CODE>gettext</CODE>, <CODE>dgettext:2</CODE>, 285<CODE>dcgettext:2</CODE>, <CODE>ngettext:1,2</CODE>, <CODE>dngettext:2,3</CODE>, 286<CODE>dcngettext:2,3</CODE>, <CODE>gettext_noop</CODE>, and <CODE>pgettext:1c,2</CODE>, 287<CODE>dpgettext:2c,3</CODE>, <CODE>dcpgettext:2c,3</CODE>, <CODE>npgettext:1c,2,3</CODE>, 288<CODE>dnpgettext:2c,3,4</CODE>, <CODE>dcnpgettext:2c,3,4</CODE>. 289 290<LI> 291 292For Objective C: Like for C, and also <CODE>NSLocalizedString</CODE>, <CODE>_</CODE>, 293<CODE>NSLocalizedStaticString</CODE>, <CODE>__</CODE>. 294 295<LI> 296 297For Shell scripts: <CODE>gettext</CODE>, <CODE>ngettext:1,2</CODE>, <CODE>eval_gettext</CODE>, 298<CODE>eval_ngettext:1,2</CODE>. 299 300<LI> 301 302For Python: <CODE>gettext</CODE>, <CODE>ugettext</CODE>, <CODE>dgettext:2</CODE>, 303<CODE>ngettext:1,2</CODE>, <CODE>ungettext:1,2</CODE>, <CODE>dngettext:2,3</CODE>, <CODE>_</CODE>. 304 305<LI> 306 307For Lisp: <CODE>gettext</CODE>, <CODE>ngettext:1,2</CODE>, <CODE>gettext-noop</CODE>. 308 309<LI> 310 311For EmacsLisp: <CODE>_</CODE>. 312 313<LI> 314 315For librep: <CODE>_</CODE>. 316 317<LI> 318 319For Scheme: <CODE>gettext</CODE>, <CODE>ngettext:1,2</CODE>, <CODE>gettext-noop</CODE>. 320 321<LI> 322 323For Java: <CODE>GettextResource.gettext:2</CODE>, 324<CODE>GettextResource.ngettext:2,3</CODE>, <CODE>gettext</CODE>, <CODE>ngettext:1,2</CODE>, 325<CODE>getString</CODE>. 326 327<LI> 328 329For C#: <CODE>GetString</CODE>, <CODE>GetPluralString:1,2</CODE>. 330 331<LI> 332 333For awk: <CODE>dcgettext</CODE>, <CODE>dcngettext:1,2</CODE>. 334 335<LI> 336 337For Tcl: <CODE>::msgcat::mc</CODE>. 338 339<LI> 340 341For Perl: <CODE>gettext</CODE>, <CODE>%gettext</CODE>, <CODE>$gettext</CODE>, <CODE>dgettext:2</CODE>, 342<CODE>dcgettext:2</CODE>, <CODE>ngettext:1,2</CODE>, <CODE>dngettext:2,3</CODE>, 343<CODE>dcngettext:2,3</CODE>, <CODE>gettext_noop</CODE>. 344 345<LI> 346 347For PHP: <CODE>_</CODE>, <CODE>gettext</CODE>, <CODE>dgettext:2</CODE>, <CODE>dcgettext:2</CODE>, 348<CODE>ngettext:1,2</CODE>, <CODE>dngettext:2,3</CODE>, <CODE>dcngettext:2,3</CODE>. 349 350<LI> 351 352For Glade 1: <CODE>label</CODE>, <CODE>title</CODE>, <CODE>text</CODE>, <CODE>format</CODE>, 353<CODE>copyright</CODE>, <CODE>comments</CODE>, <CODE>preview_text</CODE>, <CODE>tooltip</CODE>. 354</UL> 355 356To disable the default keyword specifications, the option <SAMP>‘-k’</SAMP> or 357<SAMP>‘--keyword’</SAMP> or <SAMP>‘--keyword=’</SAMP>, without a <VAR>keywordspec</VAR>, can be 358used. 359 360<DT><SAMP>‘--flag=<VAR>word</VAR>:<VAR>arg</VAR>:<VAR>flag</VAR>’</SAMP> 361<DD> 362<A NAME="IDX174"></A> 363Specifies additional flags for strings occurring as part of the <VAR>arg</VAR>th 364argument of the function <VAR>word</VAR>. The possible flags are the possible 365format string indicators, such as <SAMP>‘c-format’</SAMP>, and their negations, 366such as <SAMP>‘no-c-format’</SAMP>, possibly prefixed with <SAMP>‘pass-’</SAMP>. 367<BR> 368<A NAME="IDX175"></A> 369The meaning of <CODE>--flag=<VAR>function</VAR>:<VAR>arg</VAR>:<VAR>lang</VAR>-format</CODE> 370is that in language <VAR>lang</VAR>, the specified <VAR>function</VAR> expects as 371<VAR>arg</VAR>th argument a format string. (For those of you familiar with 372GCC function attributes, <CODE>--flag=<VAR>function</VAR>:<VAR>arg</VAR>:c-format</CODE> is 373roughly equivalent to the declaration 374<SAMP>‘__attribute__ ((__format__ (__printf__, <VAR>arg</VAR>, ...)))’</SAMP> attached 375to <VAR>function</VAR> in a C source file.) 376For example, if you use the <SAMP>‘error’</SAMP> function from GNU libc, you can 377specify its behaviour through <CODE>--flag=error:3:c-format</CODE>. The effect of 378this specification is that <CODE>xgettext</CODE> will mark as format strings all 379<CODE>gettext</CODE> invocations that occur as <VAR>arg</VAR>th argument of 380<VAR>function</VAR>. 381This is useful when such strings contain no format string directives: 382together with the checks done by <SAMP>‘msgfmt -c’</SAMP> it will ensure that 383translators cannot accidentally use format string directives that would 384lead to a crash at runtime. 385<BR> 386<A NAME="IDX176"></A> 387The meaning of <CODE>--flag=<VAR>function</VAR>:<VAR>arg</VAR>:pass-<VAR>lang</VAR>-format</CODE> 388is that in language <VAR>lang</VAR>, if the <VAR>function</VAR> call occurs in a 389position that must yield a format string, then its <VAR>arg</VAR>th argument 390must yield a format string of the same type as well. (If you know GCC 391function attributes, the <CODE>--flag=<VAR>function</VAR>:<VAR>arg</VAR>:pass-c-format</CODE> 392option is roughly equivalent to the declaration 393<SAMP>‘__attribute__ ((__format_arg__ (<VAR>arg</VAR>)))’</SAMP> attached to <VAR>function</VAR> 394in a C source file.) 395For example, if you use the <SAMP>‘_’</SAMP> shortcut for the <CODE>gettext</CODE> function, 396you should use <CODE>--flag=_:1:pass-c-format</CODE>. The effect of this 397specification is that <CODE>xgettext</CODE> will propagate a format string 398requirement for a <CODE>_("string")</CODE> call to its first argument, the literal 399<CODE>"string"</CODE>, and thus mark it as a format string. 400This is useful when such strings contain no format string directives: 401together with the checks done by <SAMP>‘msgfmt -c’</SAMP> it will ensure that 402translators cannot accidentally use format string directives that would 403lead to a crash at runtime. 404<BR> 405This option has an effect with most languages, namely C, C++, ObjectiveC, 406Shell, Python, Lisp, EmacsLisp, librep, Scheme, Java, C#, awk, YCP, Tcl, Perl, PHP, 407GCC-source. 408 409<DT><SAMP>‘-T’</SAMP> 410<DD> 411<DT><SAMP>‘--trigraphs’</SAMP> 412<DD> 413<A NAME="IDX177"></A> 414<A NAME="IDX178"></A> 415<A NAME="IDX179"></A> 416Understand ANSI C trigraphs for input. 417<BR> 418This option has an effect only with the languages C, C++, ObjectiveC. 419 420<DT><SAMP>‘--qt’</SAMP> 421<DD> 422<A NAME="IDX180"></A> 423<A NAME="IDX181"></A> 424Recognize Qt format strings. 425<BR> 426This option has an effect only with the language C++. 427 428<DT><SAMP>‘--boost’</SAMP> 429<DD> 430<A NAME="IDX182"></A> 431<A NAME="IDX183"></A> 432Recognize Boost format strings. 433<BR> 434This option has an effect only with the language C++. 435 436<DT><SAMP>‘--debug’</SAMP> 437<DD> 438<A NAME="IDX184"></A> 439<A NAME="IDX185"></A> 440Use the flags <CODE>c-format</CODE> and <CODE>possible-c-format</CODE> to show who was 441responsible for marking a message as a format string. The latter form is 442used if the <CODE>xgettext</CODE> program decided, the format form is used if 443the programmer prescribed it. 444 445By default only the <CODE>c-format</CODE> form is used. The translator should 446not have to care about these details. 447 448</DL> 449 450<P> 451This implementation of <CODE>xgettext</CODE> is able to process a few awkward 452cases, like strings in preprocessor macros, ANSI concatenation of 453adjacent strings, and escaped end of lines for continued strings. 454 455</P> 456 457 458<H3><A NAME="SEC29" HREF="gettext_toc.html#TOC29">5.1.7 Output details</A></H3> 459 460<DL COMPACT> 461 462<DT><SAMP>‘--force-po’</SAMP> 463<DD> 464<A NAME="IDX186"></A> 465Always write an output file even if no message is defined. 466 467<DT><SAMP>‘-i’</SAMP> 468<DD> 469<DT><SAMP>‘--indent’</SAMP> 470<DD> 471<A NAME="IDX187"></A> 472<A NAME="IDX188"></A> 473Write the .po file using indented style. 474 475<DT><SAMP>‘--no-location’</SAMP> 476<DD> 477<A NAME="IDX189"></A> 478Do not write <SAMP>‘#: <VAR>filename</VAR>:<VAR>line</VAR>’</SAMP> lines. 479 480<DT><SAMP>‘-n’</SAMP> 481<DD> 482<DT><SAMP>‘--add-location’</SAMP> 483<DD> 484<A NAME="IDX190"></A> 485<A NAME="IDX191"></A> 486Generate <SAMP>‘#: <VAR>filename</VAR>:<VAR>line</VAR>’</SAMP> lines (default). 487 488<DT><SAMP>‘--strict’</SAMP> 489<DD> 490<A NAME="IDX192"></A> 491Write out a strict Uniforum conforming PO file. Note that this 492Uniforum format should be avoided because it doesn't support the 493GNU extensions. 494 495<DT><SAMP>‘--properties-output’</SAMP> 496<DD> 497<A NAME="IDX193"></A> 498Write out a Java ResourceBundle in Java <CODE>.properties</CODE> syntax. Note 499that this file format doesn't support plural forms and silently drops 500obsolete messages. 501 502<DT><SAMP>‘--stringtable-output’</SAMP> 503<DD> 504<A NAME="IDX194"></A> 505Write out a NeXTstep/GNUstep localized resource file in <CODE>.strings</CODE> syntax. 506Note that this file format doesn't support plural forms. 507 508<DT><SAMP>‘-w <VAR>number</VAR>’</SAMP> 509<DD> 510<DT><SAMP>‘--width=<VAR>number</VAR>’</SAMP> 511<DD> 512<A NAME="IDX195"></A> 513<A NAME="IDX196"></A> 514Set the output page width. Long strings in the output files will be 515split across multiple lines in order to ensure that each line's width 516(= number of screen columns) is less or equal to the given <VAR>number</VAR>. 517 518<DT><SAMP>‘--no-wrap’</SAMP> 519<DD> 520<A NAME="IDX197"></A> 521Do not break long message lines. Message lines whose width exceeds the 522output page width will not be split into several lines. Only file reference 523lines which are wider than the output page width will be split. 524 525<DT><SAMP>‘-s’</SAMP> 526<DD> 527<DT><SAMP>‘--sort-output’</SAMP> 528<DD> 529<A NAME="IDX198"></A> 530<A NAME="IDX199"></A> 531<A NAME="IDX200"></A> 532Generate sorted output. Note that using this option makes it much harder 533for the translator to understand each message's context. 534 535<DT><SAMP>‘-F’</SAMP> 536<DD> 537<DT><SAMP>‘--sort-by-file’</SAMP> 538<DD> 539<A NAME="IDX201"></A> 540<A NAME="IDX202"></A> 541Sort output by file location. 542 543<DT><SAMP>‘--omit-header’</SAMP> 544<DD> 545<A NAME="IDX203"></A> 546Don't write header with <SAMP>‘msgid ""’</SAMP> entry. 547 548<A NAME="IDX204"></A> 549This is useful for testing purposes because it eliminates a source 550of variance for generated <CODE>.gmo</CODE> files. With <CODE>--omit-header</CODE>, 551two invocations of <CODE>xgettext</CODE> on the same files with the same 552options at different times are guaranteed to produce the same results. 553 554<DT><SAMP>‘--copyright-holder=<VAR>string</VAR>’</SAMP> 555<DD> 556<A NAME="IDX205"></A> 557Set the copyright holder in the output. <VAR>string</VAR> should be the 558copyright holder of the surrounding package. (Note that the msgstr 559strings, extracted from the package's sources, belong to the copyright 560holder of the package.) Translators are expected to transfer or disclaim 561the copyright for their translations, so that package maintainers can 562distribute them without legal risk. If <VAR>string</VAR> is empty, the output 563files are marked as being in the public domain; in this case, the translators 564are expected to disclaim their copyright, again so that package maintainers 565can distribute them without legal risk. 566 567The default value for <VAR>string</VAR> is the Free Software Foundation, Inc., 568simply because <CODE>xgettext</CODE> was first used in the GNU project. 569 570<DT><SAMP>‘--foreign-user’</SAMP> 571<DD> 572<A NAME="IDX206"></A> 573Omit FSF copyright in output. This option is equivalent to 574<SAMP>‘--copyright-holder=”’</SAMP>. It can be useful for packages outside the GNU 575project that want their translations to be in the public domain. 576 577<DT><SAMP>‘--msgid-bugs-address=<VAR>email@address</VAR>’</SAMP> 578<DD> 579<A NAME="IDX207"></A> 580Set the reporting address for msgid bugs. This is the email address or URL 581to which the translators shall report bugs in the untranslated strings: 582 583 584<UL> 585<LI>Strings which are not entire sentences, see the maintainer guidelines 586 587in section <A HREF="gettext_4.html#SEC14">4.3 Preparing Translatable Strings</A>. 588<LI>Strings which use unclear terms or require additional context to be 589 590understood. 591<LI>Strings which make invalid assumptions about notation of date, time or 592 593money. 594<LI>Pluralisation problems. 595 596<LI>Incorrect English spelling. 597 598<LI>Incorrect formatting. 599 600</UL> 601 602It can be your email address, or a mailing list address where translators 603can write to without being subscribed, or the URL of a web page through 604which the translators can contact you. 605 606The default value is empty, which means that translators will be clueless! 607Don't forget to specify this option. 608 609<DT><SAMP>‘-m [<VAR>string</VAR>]’</SAMP> 610<DD> 611<DT><SAMP>‘--msgstr-prefix[=<VAR>string</VAR>]’</SAMP> 612<DD> 613<A NAME="IDX208"></A> 614<A NAME="IDX209"></A> 615Use <VAR>string</VAR> (or "" if not specified) as prefix for msgstr entries. 616 617<DT><SAMP>‘-M [<VAR>string</VAR>]’</SAMP> 618<DD> 619<DT><SAMP>‘--msgstr-suffix[=<VAR>string</VAR>]’</SAMP> 620<DD> 621<A NAME="IDX210"></A> 622<A NAME="IDX211"></A> 623Use <VAR>string</VAR> (or "" if not specified) as suffix for msgstr entries. 624 625</DL> 626 627 628 629<H3><A NAME="SEC30" HREF="gettext_toc.html#TOC30">5.1.8 Informative output</A></H3> 630 631<DL COMPACT> 632 633<DT><SAMP>‘-h’</SAMP> 634<DD> 635<DT><SAMP>‘--help’</SAMP> 636<DD> 637<A NAME="IDX212"></A> 638<A NAME="IDX213"></A> 639Display this help and exit. 640 641<DT><SAMP>‘-V’</SAMP> 642<DD> 643<DT><SAMP>‘--version’</SAMP> 644<DD> 645<A NAME="IDX214"></A> 646<A NAME="IDX215"></A> 647Output version information and exit. 648 649</DL> 650 651<P><HR><P> 652Go to the <A HREF="gettext_1.html">first</A>, <A HREF="gettext_4.html">previous</A>, <A HREF="gettext_6.html">next</A>, <A HREF="gettext_25.html">last</A> section, <A HREF="gettext_toc.html">table of contents</A>. 653</BODY> 654</HTML> 655