msgcat

concatenates and merges gettext PO files

TLDR

Concatenate PO files
$ msgcat [file1.po] [file2.po] -o [combined.po]
Merge with unique messages
$ msgcat --use-first [file1.po] [file2.po] -o [output.po]
Sort messages
$ msgcat --sort-output [input.po] -o [sorted.po]
Remove duplicates
$ msgcat --unique [input.po] -o [output.po]

SYNOPSIS

msgcat [options] inputfile...

DESCRIPTION

msgcat concatenates and merges gettext PO files. Combines multiple translation files, handles duplicates, and normalizes output. Part of GNU gettext for managing internationalization catalogs.

PARAMETERS

-o file

Output file.
--use-first
Use first translation for duplicates.
--sort-output
Sort messages alphabetically.
--unique
Remove duplicate messages.
-t encoding
Output encoding.

INSTALL

sudo apt install gettext
sudo dnf install gettext
sudo pacman -S gettext
sudo apk add gettext
brew install gettext
nix profile install nixpkgs#gettext

SEE ALSO

msgattrib(1), msgfmt(1), msgunfmt(1)