jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: GNU gettext utilities: 7. Updating Existing PO Files jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:
[ << ][ >> ]           [Top][Contents][Index][ ? ]
jpayne@68: jpayne@68:
jpayne@68: jpayne@68: jpayne@68:

7. Updating Existing PO Files

jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

7.1 Invoking the msgmerge Program

jpayne@68: jpayne@68: jpayne@68:
 
msgmerge [option] def.po ref.pot
jpayne@68: 
jpayne@68: jpayne@68:

The msgmerge program merges two Uniforum style .po files together. jpayne@68: The def.po file is an existing PO file with translations which will jpayne@68: be taken over to the newly created file as long as they still match; jpayne@68: comments will be preserved, but extracted comments and file positions will jpayne@68: be discarded. The ref.pot file is the last created PO file with jpayne@68: up-to-date source references but old translations, or a PO Template file jpayne@68: (generally created by xgettext); any translations or comments jpayne@68: in the file will be discarded, however dot comments and file positions jpayne@68: will be preserved. Where an exact match cannot be found, fuzzy matching jpayne@68: is used to produce better results. jpayne@68:

jpayne@68: jpayne@68: jpayne@68:

7.1.1 Input file location

jpayne@68: jpayne@68:
jpayne@68:
def.po
jpayne@68:

Translations referring to old sources. jpayne@68:

jpayne@68:
jpayne@68:
ref.pot
jpayne@68:

References to the new sources. jpayne@68:

jpayne@68:
jpayne@68:
-D directory
jpayne@68:
--directory=directory
jpayne@68:
jpayne@68: jpayne@68:

Add directory to the list of directories. Source files are jpayne@68: searched relative to this list of directories. The resulting ‘.po’ jpayne@68: file will be written relative to the current directory, though. jpayne@68:

jpayne@68:
jpayne@68:
-C file
jpayne@68:
--compendium=file
jpayne@68:
jpayne@68: jpayne@68:

Specify an additional library of message translations. See section Using Translation Compendia. jpayne@68: This option may be specified more than once. jpayne@68:

jpayne@68:
jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68:

7.1.2 Operation mode

jpayne@68: jpayne@68:
jpayne@68:
-U
jpayne@68:
--update
jpayne@68:
jpayne@68: jpayne@68:

Update def.po. Do nothing if def.po is already up to date. jpayne@68:

jpayne@68:
jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68:

7.1.3 Output file location

jpayne@68: jpayne@68:
jpayne@68:
-o file
jpayne@68:
--output-file=file
jpayne@68:
jpayne@68: jpayne@68:

Write output to specified file. jpayne@68:

jpayne@68:
jpayne@68:
jpayne@68: jpayne@68: jpayne@68:

The results are written to standard output if no output file is specified jpayne@68: or if it is ‘-’. jpayne@68:

jpayne@68: jpayne@68: jpayne@68:

7.1.4 Output file location in update mode

jpayne@68: jpayne@68:

The result is written back to def.po. jpayne@68:

jpayne@68:
jpayne@68:
--backup=control
jpayne@68:
jpayne@68: jpayne@68:

Make a backup of def.po jpayne@68:

jpayne@68:
jpayne@68:
--suffix=suffix
jpayne@68:
jpayne@68:

Override the usual backup suffix. jpayne@68:

jpayne@68:
jpayne@68:
jpayne@68: jpayne@68: jpayne@68:

The version control method may be selected via the --backup option jpayne@68: or through the VERSION_CONTROL environment variable. Here are the jpayne@68: values: jpayne@68:

jpayne@68:
jpayne@68:
none
jpayne@68:
off
jpayne@68:

Never make backups (even if --backup is given). jpayne@68:

jpayne@68:
jpayne@68:
numbered
jpayne@68:
t
jpayne@68:

Make numbered backups. jpayne@68:

jpayne@68:
jpayne@68:
existing
jpayne@68:
nil
jpayne@68:

Make numbered backups if numbered backups for this file already exist, jpayne@68: otherwise make simple backups. jpayne@68:

jpayne@68:
jpayne@68:
simple
jpayne@68:
never
jpayne@68:

Always make simple backups. jpayne@68:

jpayne@68:
jpayne@68:
jpayne@68: jpayne@68:

The backup suffix is ‘~’, unless set with --suffix or the jpayne@68: SIMPLE_BACKUP_SUFFIX environment variable. jpayne@68:

jpayne@68: jpayne@68: jpayne@68:

7.1.5 Operation modifiers

jpayne@68: jpayne@68:
jpayne@68:
-m
jpayne@68:
--multi-domain
jpayne@68:
jpayne@68: jpayne@68:

Apply ref.pot to each of the domains in def.po. jpayne@68:

jpayne@68:
jpayne@68:
--for-msgfmt
jpayne@68:
jpayne@68:

Produce a PO file meant for msgfmt only, not for a translator. jpayne@68: This option omits untranslated messages, fuzzy messages (except the header jpayne@68: entry), and obsolete messages from the output. Also, it omits translator jpayne@68: comments and ‘#: filename:line’ lines from the output. jpayne@68: In particular, this option implies ‘--no-fuzzy-matching’. jpayne@68:

jpayne@68:
jpayne@68:
-N
jpayne@68:
--no-fuzzy-matching
jpayne@68:
jpayne@68: jpayne@68:

Do not use fuzzy matching when an exact match is not found. This may speed jpayne@68: up the operation considerably. jpayne@68:

jpayne@68:
jpayne@68:
--previous
jpayne@68:
jpayne@68:

Keep the previous msgids of translated messages, marked with ‘#|’, when jpayne@68: adding the fuzzy marker to such messages. jpayne@68:

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68:

7.1.6 Input file syntax

jpayne@68: jpayne@68:
jpayne@68:
-P
jpayne@68:
--properties-input
jpayne@68:
jpayne@68: jpayne@68:

Assume the input files are Java ResourceBundles in Java .properties jpayne@68: syntax, not in PO file syntax. jpayne@68:

jpayne@68:
jpayne@68:
--stringtable-input
jpayne@68:
jpayne@68:

Assume the input files are NeXTstep/GNUstep localized resource files in jpayne@68: .strings syntax, not in PO file syntax. jpayne@68:

jpayne@68:
jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68:

7.1.7 Output details

jpayne@68: jpayne@68: jpayne@68:
jpayne@68:
--lang=catalogname
jpayne@68:
jpayne@68:

Specify the ‘Language’ field to be used in the header entry. See jpayne@68: Filling in the Header Entry for the meaning of this field. Note: The jpayne@68: ‘Language-Team’ and ‘Plural-Forms’ fields are left unchanged. jpayne@68: If this option is not specified, the ‘Language’ field is inferred, as jpayne@68: best as possible, from the ‘Language-Team’ field. jpayne@68:

jpayne@68:
jpayne@68:
--color
jpayne@68:
--color=when
jpayne@68:
jpayne@68:

Specify whether or when to use colors and other text attributes. jpayne@68: See The --color option for details. jpayne@68:

jpayne@68:
jpayne@68:
--style=style_file
jpayne@68:
jpayne@68:

Specify the CSS style rule file to use for --color. jpayne@68: See The --style option for details. jpayne@68:

jpayne@68:
jpayne@68:
--force-po
jpayne@68:
jpayne@68:

Always write an output file even if it contains no message. jpayne@68:

jpayne@68:
jpayne@68:
-i
jpayne@68:
--indent
jpayne@68:
jpayne@68: jpayne@68:

Write the .po file using indented style. jpayne@68:

jpayne@68:
jpayne@68:
--no-location
jpayne@68:
jpayne@68:

Do not write ‘#: filename:line’ lines. jpayne@68:

jpayne@68:
jpayne@68:
-n
jpayne@68:
--add-location=type
jpayne@68:
jpayne@68:

Generate ‘#: filename:line’ lines (default). jpayne@68:

jpayne@68:

The optional type can be either ‘full’, ‘file’, or jpayne@68: ‘never’. If it is not given or ‘full’, it generates the jpayne@68: lines with both file name and line number. If it is ‘file’, the jpayne@68: line number part is omitted. If it is ‘never’, it completely jpayne@68: suppresses the lines (same as --no-location). jpayne@68:

jpayne@68:
jpayne@68:
--strict
jpayne@68:
jpayne@68:

Write out a strict Uniforum conforming PO file. Note that this jpayne@68: Uniforum format should be avoided because it doesn't support the jpayne@68: GNU extensions. jpayne@68:

jpayne@68:
jpayne@68:
-p
jpayne@68:
--properties-output
jpayne@68:
jpayne@68: jpayne@68:

Write out a Java ResourceBundle in Java .properties syntax. Note jpayne@68: that this file format doesn't support plural forms and silently drops jpayne@68: obsolete messages. jpayne@68:

jpayne@68:
jpayne@68:
--stringtable-output
jpayne@68:
jpayne@68:

Write out a NeXTstep/GNUstep localized resource file in .strings syntax. jpayne@68: Note that this file format doesn't support plural forms. jpayne@68:

jpayne@68:
jpayne@68:
-w number
jpayne@68:
--width=number
jpayne@68:
jpayne@68: jpayne@68:

Set the output page width. Long strings in the output files will be jpayne@68: split across multiple lines in order to ensure that each line's width jpayne@68: (= number of screen columns) is less or equal to the given number. jpayne@68:

jpayne@68:
jpayne@68:
--no-wrap
jpayne@68:
jpayne@68:

Do not break long message lines. Message lines whose width exceeds the jpayne@68: output page width will not be split into several lines. Only file reference jpayne@68: lines which are wider than the output page width will be split. jpayne@68:

jpayne@68:
jpayne@68:
-s
jpayne@68:
--sort-output
jpayne@68:
jpayne@68: jpayne@68: jpayne@68:

Generate sorted output. Note that using this option makes it much harder jpayne@68: for the translator to understand each message's context. jpayne@68:

jpayne@68:
jpayne@68:
-F
jpayne@68:
--sort-by-file
jpayne@68:
jpayne@68: jpayne@68:

Sort output by file location. jpayne@68:

jpayne@68:
jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68:

7.1.8 Informative output

jpayne@68: jpayne@68:
jpayne@68:
-h
jpayne@68:
--help
jpayne@68:
jpayne@68: jpayne@68:

Display this help and exit. jpayne@68:

jpayne@68:
jpayne@68:
-V
jpayne@68:
--version
jpayne@68:
jpayne@68: jpayne@68:

Output version information and exit. jpayne@68:

jpayne@68:
jpayne@68:
-v
jpayne@68:
--verbose
jpayne@68:
jpayne@68: jpayne@68:

Increase verbosity level. jpayne@68:

jpayne@68:
jpayne@68:
-q
jpayne@68:
--quiet
jpayne@68:
--silent
jpayne@68:
jpayne@68: jpayne@68: jpayne@68:

Suppress progress indicators. jpayne@68:

jpayne@68:
jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:
[ << ][ >> ]           [Top][Contents][Index][ ? ]
jpayne@68:

jpayne@68: jpayne@68: This document was generated by Bruno Haible on February, 21 2024 using texi2html 1.78a. jpayne@68: jpayne@68:
jpayne@68: jpayne@68:

jpayne@68: jpayne@68: