Merging po files

Ask Hjorth Larsen asklarsen at
Sat Oct 30 12:02:15 BST 2010

Hi Redmar

On Sat, Oct 30, 2010 at 12:20 PM, Redmar <redmar at> wrote:
> Hello Translators,
> I have recently translated xscreensaver to Dutch in Launchpad and would
> like to submit my translations upstream. The upstream version of
> xscreensaver contains more strings than the one in Launchpad, and is
> partly translated.
> What I would like to do is the following: Merge the Launchpad (shorter)
> po file into the upstream po file, such that translations form the
> Launchpad po file ALWAYS replace translations done in the upstream po
> file.
> I found on the web that 'msgcat' should be able to do this, but after
> reading the man and experimenting I have not been able to make this
> happen.
> msgcat from_LaunchPad.po upstream.po -o output.po --use-first
> does use the translations from LP over those upstream, but the
> resulting .po file has ~1000 extra strings compared to the bigger input
> file.
> If someone could tell me how I can combine these two po files I would be
> very happy.
> Greetings,
> Redmar
> --
> Ubuntu Dutch Translators


  msgmerge from_LaunchPad.po upstream.po -o output.po

msgmerge takes translations from one file and combines them with the
english messages in the other.  I have sometimes seen that also this
produces files with too many messages in them (which I don't
understand), but after msgmerging a second time into the newly created
one, it had only those strings it was supposed to (now that I mention
it, if anyone knows why that happens, please do chime in).


More information about the ubuntu-translators mailing list