[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.11.1.1 Concatenate PO Files

To concatenate several valid PO files into one compendium file you can use `msgcomm' or `msgcat' (the latter preferred):

 
msgcat -o compendium.po file1.po file2.po

By default, msgcat will accumulate divergent translations for the same string. Those occurences will be marked as fuzzy and highly visible decorated; calling msgcat on `file1.po':

 
#: src/hello.c:200
#, c-format
msgid "Report bugs to <%s>.\n"
msgstr "Comunicar `bugs' a <%s>.\n"

and `file2.po':

 
#: src/bye.c:100
#, c-format
msgid "Report bugs to <%s>.\n"
msgstr "Comunicar \"bugs\" a <%s>.\n"

will result in:

 
#: src/hello.c:200 src/bye.c:100
#, fuzzy, c-format
msgid "Report bugs to <%s>.\n"
msgstr ""
"#-#-#-#-#  file1.po  #-#-#-#-#\n"
"Comunicar `bugs' a <%s>.\n"
"#-#-#-#-#  file2.po  #-#-#-#-#\n"
"Comunicar \"bugs\" a <%s>.\n"

The translator will have to resolve this "conflict" manually; she has to decide whether the first or the second version is appropriate (or provide a new translation), to delete the "marker lines", and finally to remove the fuzzy mark.

If the translator knows in advance the first found translation of a message is always the best translation she can make use to the `--use-first' switch:

 
msgcat --use-first -o compendium.po file1.po file2.po

A good compendium file must not contain fuzzy or untranslated entries. If input files are "dirty" you must preprocess the input files or postprocess the result using `msgattrib --translated --no-fuzzy'.



This document was generated on May 6, 2002 using texi2html