Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to combine two .po translation files together?

We have two .po files, each from different branches of a piece of software.

We need to combine these into a single .po file.

There are duplicates between the two files, and the ideal handling would be for one file's strings to be favoured (consistently).

We have a SUSE system so the --output-file doesn't seem to have the behaviour of ignoring/merging duplicates which the Sun version has according to a man page I found from a web search. (We do not have a Sun machine handy!)

like image 593
fooquency Avatar asked Oct 13 '09 17:10

fooquency


People also ask

What is .po format?

A . PO file is a portable object file, which is text-based. These types of files are used in commonly in software development. The . PO file may be referenced by Java programs, GNU gettext, or other software programs as a properties file.

How do I read a .po file?

You can open and edit a PO file in any text or source code editor, such as Microsoft Visual Studio Code (cross-platform) or GitHub Atom (cross-platform).


1 Answers

What you are looking for is the msgcat util, it concatenates and merges the specified PO dictionaries.

This is part of gettext utils, for more information please consult gettext manual page on msgcat.

like image 83
sorin Avatar answered Oct 07 '22 21:10

sorin