Xfce Wiki

Sub domains
 

This is an old revision of the document!


Merge PO files

The command line tool msgmerge is used to merge two PO files into one. It is really easy to use, here is an example:

msgmerge updated-po-file reference-file > output.po

The result in output.po contains the reference-file with the new translated strings from the updated-po-file.

This tool can be used to merge strings from the development branch towards a stable branch or vice-versa.

An example with a Dutch translation file for a package called “packageW”, which is fully translated in the stable “Xfce 4.8” and needs to be merged with an incomplete Dutch translation file in the development branch “master”.

Both files are in the Downloads folder.

Copy/paste the following command in your terminal:

[code] cd Downloads [/code]

(press Enter)

Now copy/paste the following command in your terminal:

[code] msgmerge packageW-xfce-4-8.nl.po packageW-master.nl.po > NEWpackageW.master.nl.po [/code]

(press Enter)

Then delete both “packageW-xfce-4-8.nl.po” (you don't need it anymore) and “packageW-master.nl.po” (you don't want a name conflict in the next step).

Then rename “NEWpackageW.master.nl.po” to “packageW.master.nl.po”.

Finally: upload “packageW.master.nl.po” in Transifex.

Note that you cannot send the output directly to “packageW-master.nl.po” because it will fail with an 100% unchanged PO file.