po files are used by programs to translate the messages in different languages. Thus they contain a list of all translatable strings extracted from the code and their corresponding translation, in a given language. Here are given some information to manipulate and few resources to help the translation, mainly derived from experiments in for Debian project translation to French.

File formating

For ease of reading text files on any type of screen it is common to limit the size of their line to 80 characters. The following command allows to cut the lines at 80 characters while maintaining the specific labeling of po files:

$ msgcat fr.po -o fr.po

You can specify the length of a line to another value if necessary with the -w option. So to format a po file with 40 characters:

$ msgcat -w40 fr.po -o fr.po

Update of a file while already start the translation

When translating sometimes the original po file have been updated while your translation is not finished. The following command can update your po file (fr.po) with new data from the new file (fr.new.po):

$ msgmerge --update --previous fr.po fr.new.po

You can continue on your translation on the updated fr.po file.