Friday, February 15, 2008

Attention to community translators!

(Edited 18.02) Today Pavel will generate new set of pot-files using translate-tools 1.1.0. This means that traslation teams, providing localized sdf-files for his build system should perform some additional moves.
  1. Generate sdf-file from existsing translations (when you are not doing it everyday) using OLD TOOLKIT.
  2. Backup all you have (when you keep your files in cvs it's not mandatory, you can easily rollback when something goes wrong).
  3. Download and install the new toolkit from http://translate.sourceforge.net/wiki/toolkit/installation (as there were some issues with released 1.1.0, better download 1.1.1rcX from 18.02 or later)
  4. You need additionally python-lxml package to work with new toolkit, setup doesnt give any messages about it but you cannot generate sdf-files when python-lxml is missing.
  5. Regenerate your translation po-files (this is my command line, use your own paths and language codes) - attention - this will change duplicate styles from kde style to msgctxt:
    oo2po -l et /home/ain/ooocvs/et/GSI_et.sdf /home/ain/ooocvs/et/po/ (you can get a warning about 'targetlanguage not found...', this means that you have a file with indicated name completely untranslated, when you agree, it's OK)
  6. Download new pot-files from Pavel's ftp site (with date 15.02.2008 or later).
  7. Merge translations with new pot files (pot2po).
  8. Regenerate new sdf-file with (this is my command line, use your own paths and language codes):
    po2oo -l et -t /home/ain/ooocvs/et/en-US.sdf /home/ain/ooocvs/et/po/ GSI_et.sdf
  9. Run gsicheck. (Fixed in 1.1.1rc1 - You may encounter some errors which are caused by bogus whitespaces inside tags (was not problem before, because no tool had any idea that these double-escaped things are tags), for example by backconversion to sdf a tag "<ahelp >" is not recognized (space before closing angle), also tag"<ahelp hid..." (two adjacent spaces). These problems are created by translators using GUI tools because earlier gettext tools didn't know that this double escaped thing was a tag and put linebreak often inside of a tag, and it is very easy with gui tool put additional whitespace in end of such line (translator will not see line ending quotes). This problem should go with new toolkit.) When there are no errors go to 11.
  10. Fix the errors and go back to 9.
  11. Seems like you did it.
Attention: all these new pot files are generated only for OO.o 3.0 development tree. When you still want to provide translations for 2.4 tree (for your own use for example - or when you are distributing community builds), you should either have 2 versions of toolkits installed (eg. one in userspace, one systemwide) or you should convert 2.4 translations to new format too. Pavel told, he will not provide new pot files for 2.4 tree, as there should be no changes in this area any more.