GNU Info

Info Node: ( Invocation

( Invocation

Next: MO Files Prev: Binaries Up: Binaries
Enter node , (file) or (file)node

Invoking the `msgfmt' Program

     Usage: msgfmt [OPTION] FILENAME.po ...

     Align strings to NUMBER bytes (default: 1).

     Display this help and exit.

     Binary file will not include the hash table.

`-o FILE'
     Specify output file name as FILE.

     Direct the program to work strictly following the Uniforum/Sun
     implementation.  Currently this only affects the naming of the
     output file.  If this option is not given the name of the output
     file is the same as the domain name.  If the strict Uniforum mode
     is enabled the suffix `.mo' is added to the file name if it is not
     already present.

     We find this behaviour of Sun's implementation rather silly and so
     by default this mode is _not_ selected.

     Detect and diagnose input file anomalies which might represent
     translation errors.  The `msgid' and `msgstr' strings are studied
     and compared.  It is considered abnormal that one string starts or
     ends with a newline while the other does not.

     Also, if the string represents a format string used in a
     `printf'-like function both strings should have the same number of
     `%' format specifiers, with matching types.  If the flag
     `c-format' or `possible-c-format' appears in the special comment
     <#,> for this entry a check is performed.  For example, the check
     will diagnose using `%.*s' against `%s', or `%d' against `%s', or
     `%d' against `%x'.  It can even handle positional parameters.

     Normally the `xgettext' program automatically decides whether a
     string is a format string or not.  This algorithm is not perfect,
     though.  It might regard a string as a format string though it is
     not used in a `printf'-like function and so `msgfmt' might report
     errors where there are none.  Or the other way round: a string is
     not regarded as a format string but it is used in a `printf'-like

     So solve this problem the programmer can dictate the decision to
     the `xgettext' program (Note: c-format).  The translator should
     not consider removing the flag from the <#,> line.  This "fix"
     would be reversed again as soon as `msgmerge' is called the next

     Output version information and exit.

   If input file is `-', standard input is read.  If output file is
`-', output is written to standard output.

automatically generated by info2www version