MSGMERGE(1)

๐Ÿ’– MSGMERGE โ€” bestie edition ๐Ÿ’–

okay so real talk: this is the msgmerge page from section 1 (User Commands) of the manual, and it's literally about smashing two translation files together so your .po stays cute and current. let's go ๐Ÿฆ‹


โœจ NAME โœจ

msgmerge โ€” merge message catalog and template ๐Ÿซถ


โœจ SYNOPSIS โœจ

msgmerge [OPTION] def.po ref.pot

โœจ DESCRIPTION โœจ

so what it does: it merges two Uniforum style .po files together. periodt. ๐Ÿ’…

here's the tea on each one:

  • def.po โ€” this is your existing PO file, the one with actual translations. those translations get carried over into the brand-new file as long as they still match. comments? preserved, bestie. but extracted comments and file positions get thrown out. ๐Ÿ™ˆ
  • ref.pot โ€” this is the most recently created PO file, the one with up-to-date source references but old translations. OR it's a PO Template file (usually something xgettext made). any translations or comments inside it get discarded โ€” BUT dot comments and file positions are preserved. ๐Ÿ’–

and when it can't find an exact match? it uses fuzzy matching to get better results. slay.

also important, no cap: mandatory arguments to long options are mandatory for short options too.

๐ŸŒธ Input file location ๐ŸŒธ

  • def.po โ€” translations referring to old sources
  • ref.pot โ€” references to new sources
  • -D, --directory=DIRECTORY โ€” add DIRECTORY to the list for input files search
  • -C, --compendium=FILE โ€” an extra library of message translations; you can specify this more than once, bestie, stack 'em ๐ŸŽ€

๐ŸŒธ Operation mode ๐ŸŒธ

  • -U, --update โ€” update def.po, and do literally nothing if def.po is already up to date

๐ŸŒธ Output file location ๐ŸŒธ

  • -o, --output-file=FILE โ€” write output to the specified file

The results go to standard output if you don't give an output file, or if it's -.

Output file location in update mode: the result gets written back to def.po.

  • --backup=CONTROL โ€” make a backup of def.po
  • --suffix=SUFFIX โ€” override the usual backup suffix

The version control method can be picked via the --backup option or through the VERSION_CONTROL environment variable. here are the values, icons only:

  • none, off โ€” never make backups (even if --backup is given) ๐Ÿ’€
  • numbered, t โ€” make numbered backups
  • existing, nil โ€” numbered if numbered backups exist, simple otherwise
  • simple, never โ€” always make simple backups

The backup suffix is '~', unless it's set with --suffix or the SIMPLE_BACKUP_SUFFIX environment variable. โœจ

๐ŸŒธ Operation modifiers ๐ŸŒธ

  • -m, --multi-domain โ€” apply ref.pot to each of the domains in def.po
  • --for-msgfmt โ€” produce output for 'msgfmt', not for a translator
  • -N, --no-fuzzy-matching โ€” do not use fuzzy matching
  • --previous โ€” keep previous msgids of translated messages

๐ŸŒธ Input file syntax ๐ŸŒธ

  • -P, --properties-input โ€” input files are in Java .properties syntax
  • --stringtable-input โ€” input files are in NeXTstep/GNUstep .strings syntax

๐ŸŒธ Output details ๐ŸŒธ

  • --lang=CATALOGNAME โ€” set the 'Language' field in the header entry
  • --color โ€” use colors and other text attributes always
  • --color=WHEN โ€” use colors and other text attributes if WHEN. WHEN may be 'always', 'never', 'auto', or 'html'.
  • --style=STYLEFILE โ€” specify CSS style rule file for --color
  • -e, --no-escape โ€” do not use C escapes in output (default)
  • -E, --escape โ€” use C escapes in output, no extended chars
  • --force-po โ€” write PO file even if empty
  • -i, --indent โ€” indented output style
  • --no-location โ€” suppress '#: filename:line' lines
  • -n, --add-location โ€” preserve '#: filename:line' lines (default)
  • --strict โ€” strict Uniforum output style
  • -p, --properties-output โ€” write out a Java .properties file
  • --stringtable-output โ€” write out a NeXTstep/GNUstep .strings file
  • -w, --width=NUMBER โ€” set output page width
  • --no-wrap โ€” do not break long message lines, longer than the output page width, into several lines
  • -s, --sort-output โ€” generate sorted output (deprecated โš ๏ธ)
  • -F, --sort-by-file โ€” sort output by file location
๐Ÿšฉ heads up bestie: -s / --sort-output is deprecated. it still exists, but likeโ€ฆ it's giving legacy.

๐ŸŒธ Informative output ๐ŸŒธ

  • -h, --help โ€” display this help and exit
  • -V, --version โ€” output version information and exit
  • -v, --verbose โ€” increase verbosity level
  • -q, --quiet, --silent โ€” suppress progress indicators

โœจ AUTHOR โœจ

Written by Peter Miller and Bruno Haible. ๐Ÿ‘‘


โœจ REPORTING BUGS โœจ

found a bug? report it in the bug tracker at <https://savannah.gnu.org/projects/gettext> or by email to <bug-gettext@gnu.org>. ๐Ÿ›


Copyright ยฉ 1995-2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. ๐Ÿ˜ญ


โœจ SEE ALSO โœจ

The full documentation for msgmerge is maintained as a Texinfo manual. If the info and msgmerge programs are properly installed at your site, the command

info msgmerge

should give you access to the complete manual. ๐ŸŒˆ


and that's the whole page, bestie!! this was the msgmerge man page from GNU gettext-tools 1.0, dated January 2026 โ€” go forth and merge those catalogs, you absolute icon ๐Ÿ’–โœจ๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from