Convert original OOo .po files to Rosetta .po files

Tim Morley t_morley at argonet.co.uk
Wed Jun 14 15:08:28 BST 2006


On 14 Jun 2006, at 12:00, Felipe wrote:

> it is not clear to me how to
> convert the original OOo ".po" files to the Rosetta ones.  Anyone can
> help me please?

Hi there.

I don't know of an automated way to do it, but it's actually fairly  
simple to do by hand, using the basic gettext tools. (Search for  
"gettext" in Synaptic if you don't already have these packages on  
your Ubuntu machine.)

The procedure goes like this:
   (1) make all the ~230 .po files of OOo into one giant .po file
   (2) merge this into the ~10 blank .po files from Rosetta
   (3) delete the redundant translations from the end of each  
resulting file

And this is how to do it:
   (1) Get to the directory which contains (a tree of directories  
which contain) all the .po files from OOo, then type:
       tim at home:~$ msgcat `find . -name "*.po"` > allTranslations.po
You now have a huge file called allTranslations.po which contains  
(d'uh!) all your translations.
   (2) Now take each of the blank template files that you've  
downloaded from Rosetta (ooo-writer.po, ooo-calc.po, etc.) and do  
this with each of them:
       tim at home:~$ msgmerge allTranslations.po ooo-writer.po --output- 
file=ooo-writer-translated.po
       tim at home:~$ msgmerge allTranslations.po ooo-calc.po --output- 
file=ooo-calc-translated.po
       etc.
   (3) Now, in each of the new files you've created (ooo-writer- 
translated.po etc.) you'll find a mass of redundant translations  
which all start with #~. They're all grouped together at the end of  
the file, so you just need to find where they start, and delete  
everything from then on, and save the resulting file.

Et voilà. One set of merged files. It worked for us on the Esperanto  
project, but give us a shout (on the list) if you run into a problem.

Cheers.


Tim




More information about the rosetta-users mailing list