December 25, 2005 6:32 PM

Updating translate toolkit for POT files SRC680_m147+

Long awaited task for all OpenOffice.org translators using POT files is here! Right now, we all use old translate toolkit version that merges all same strings in PO file to one entry. New versions of translate toolkit (0.8 RC5) allows to separate them.

This blog entry will describe, how you should upgrade your tooling and PO files.

So, to update your PO files to new translate toolkit you should prepare the following:
  • your latest/current GSI file produced with the old tooling
  • new translate toolkit installation
Of course you have your GSI ready - this should be your regular output from the translation process. Installation of the new version of translate toolkit is very easy:
# Download the current version
wget http://switch.dl.sourceforge.net/sourceforge/translate/translate-toolkit-0.8rc5.tar.gz
# Unpack it
tar xvfz translate-toolkit-0.8rc5.tar.gz
# Install it (somewhere)
cd translate-toolkit-0.8rc5
./setup.py install --home=~/.ooo/Translate
I have chosen the directory ~/.ooo/Translate. You should choose the directory yourself.

Now you have everything ready for migration!

Create new (thus empty) temporary directory - I'll use /tmp/migration below and copy your current GSI file there:
p@pc:/tmp> mkdir migration
p@pc:/tmp> cp ~/.ooo/build/Files/SRC680_m147/GSI_cs.sdf.bz2 migration
p@pc:/tmp> cd migration
p@pc:/tmp/migration> bunzip2 GSI_cs.sdf.bz2
p@pc:/tmp/migration> ls -l
total 23628
-rw-r--r--  1 p users 24162376 2005-12-25 17:31 GSI_cs.sdf
Now, we will generate new PO files with the new translate toolkit:
p@pc:/tmp/migration> export PYTHONPATH=/tmp/TRANSLATE/lib/python
p@pc:/tmp/migration> ~/.ooo/Translate/bin/oo2po -i GSI_cs.sdf -o po -l cs
oo2po: warning: Output directory does not exist. Attempting to create
processing 230 files...
[###########################################] 100%
After the utility oo2po finishes the work, the directory po will be populated with new PO files. Verify them and merge them to your CVS or whatever mechanism you use to track the translation process.

This should be everything you need to do to upgrade.

I have uploaded POT files generated with new translate toolkit to ftp.linux.cz with .UPDATED_TRANSLATE suffix so you can update immediately.

For more informations, read my previous blog entries: If you have more questions, do not hesitate to contact OpenOffice.org's dev@l10n mailing list.

Posted by Pavel | Permanent link | File under: OpenOffice.org