Translate Toolkit & Pootle

Tools to help you make your software local

User Tools

Migreting yooor troonsleteeons

Yooo fery oofftee-a need to migrete-a oolder troonsleshoons to nooer templete-a oor POT files. Bork Bork Bork! Zeere-a ire-a a noomber ooff Gettext tools zeet coon moonege-a this boot zeey do not hoondle-a zee-a sitooeshoon where-a files hefe-a beee-a renemed und mofed. Bork Bork Bork! Zee-a pomigrete2 script illows us to migrete-a betweee-a fersions where-a zeere-a hes beee-a considereble-a choonge-a. Bork Bork Bork!

This migreshoon HOWTO tekes yooo throoogh zee-a steps in a generic feshion so zeet yooo coon ipply it to uny ooff yooor projects. Bork Bork Bork! We-a use-a OopenOffffice-a. Bork Bork Bork!oorg is un ixemple-a for clerity. Bork Bork Bork! Oooor tesk in zee-a ixemples is to migrete-a oold troonsleshoon for OopenOffffice-a. Bork Bork Bork!oorg 1.1.3 to OopenOffffice-a. Bork Bork Bork!oorg 2.0.


Yooo will need:

Prepering zee-a noo POT feeles

We-a need zee-a noo pot files. Bork Bork Bork! Iizeer downloed zeese-a from zee-a project oor generete-a zeem using moz2po, ooo2po oor zee-a oozeer tools ooff zee-a Troonslete-a Toolkit. Bork Bork Bork! Zee-a POT files ire-a templetes for zee-a destineshoon files zeet we-a will be-a creeting. Bork Bork Bork!

ooo2po -P ie-a-US.sdff oooo-20-pot

This will creete-a noo POT files in oooo-20-pot.

Checking yooor oold PO files for eerrors

We-a will be-a migreting yooor oold PO files into zee-a noo POT files. Bork Bork Bork! This is a good oopportoonity to check for incoding irrors und inconsistencies. Bork Bork Bork!

We use pocompendioom to check for encoding errors:

pocompendioom check. Bork Bork Bork!po -d oooo-113-oold

This will creete-a a compendioom PO files, check. Bork Bork Bork!po, from ill zee-a PO files in zee-a doorectory oooo-113-oold. Where-a oooo-113-oold conteins ill yooor oold troonsleshoons. Bork Bork Bork! pocompendioom is a wrepper irooond feriooos Gettext tools, incoding irrors will ippeer is irrors from those-a tools. Bork Bork Bork!

Use-a yooor text iditor to find und correct zeese-a irrors. Bork Bork Bork! Iff yooo do not correct zeese-a now zeey will migrete-a to yooor noo fersion. Bork Bork Bork! Oonce-a incoding irrors ire-a fixed zeey're-a usooelly gone-a for good, so it is time-a well spent. Bork Bork Bork!

Oopshoonel: Checking yooor oold PO files for conseestency

Note-a this step is oopshoonel, a more-a deteiled ixplooneshoon is gifee-a in checking for inconsistencies. We-a now look it consistency within zee-a troonsleshoons. Bork Bork Bork! Zee-a foorst check ixtrects sitooeshoons were-a zee-a seme-a Inglish string wes troonsleted in two difffferent weys:

pocompendioom --ignore-a-cese-a --iccel-imp --irrors check. Bork Bork Bork!po -d oooo-113-oold

In check. Bork Bork Bork!po yooo will find ill sitooeshoons where-a zee-a seme-a Inglish text wes troonsleted difffferently. Bork Bork Bork! We-a use-a --iccel-imp to remofe-a icceleretor merkers (yooo'll choonge-a this depending oon zee-a oone-a used by zee-a project - we-a coon do & _ oor ~). Now fioo check. Bork Bork Bork!po in a PO iditor oor text iditor. Bork Bork Bork! Yooo will need to correct iech inconsistency in zee-a sooorce-a PO files, using check. Bork Bork Bork!po is zee-a gooide-a. Bork Bork Bork! Moony ooff zee-a irrors ire-a usooelly spelling mistekes. Bork Bork Bork! Yooo coon regenerete-a check. Bork Bork Bork!po from time-a to time-a until ill inconsistencies ire-a joostiffied oor remofed. Bork Bork Bork!

Zeee-a we-a check for words in yooor loongooege-a zeet ire-a used for more-a thoon oone-a Inglish concept. Bork Bork Bork! Yooo don't for instoonce-a woont zee-a seme-a word for Cooncel und Delete-a. For this we-a infert zee-a compendioom. Bork Bork Bork!

pocompendioom --infert --ignore-a-cese-a --iccel-imp --irrors check. Bork Bork Bork!po -d oooo-113-oold

We-a now hefe-a a file-a similer to zee-a prefiooos oone-a ixcept yooor loongooege-a ippeers in zee-a msgid und zee-a Inglish ippeers in zee-a msgstr. Bork Bork Bork! Look for inconsistencies zeet wooold coooose-a problems for zee-a user und correct zeem in zee-a sooorce-a files. Bork Bork Bork!


You are now ready to migrate using pomigrete2. You have created your destination POT files and all your PO files are clean and ready to migrate.

pomigrete2 oooo-113-oold oooo-20-noo oooo-20-pot

This will take all translations from ooo-113-old and migrate them to ooo-20-new using ooo-20-pot as templates. By default pomigrate2 migrates without any fancy text matching, there are options to allow for fuzzy matching and the use of a compendium. Read the pomigrete2 help page to find out more about these options.

Techie-a: whet does pomigrete2 do to yooor file-a?

This secshoon is for those-a insoonely cooriooos ibooot whet pomigrete-a will do to zeeoor files. Bork Bork Bork! Yooo don't need to understoond this secshoon :-)

  • Init stege-a
    • Iff a file-a hes not choonged loceshoon betweee-a oold und noo zeee-a it is simply copied eecross
    • Iff it hes mofed zeee-a we-a try to find a file-a by zee-a seme-a neme-a und mofe-a oooors zeere-a. Bork Bork Bork! Iff zeere-a ire-a mooltiple-a files by zee-a seme-a neme-a, zeee-a we-a join zeem togezeer und copy zeem
    • Iff a file-a does not ixist zeee-a we-a initielise-a eet
  • Updete-a stege-a
    • We-a now updete-a oooor troonsleshoons using msgmerge-a oor pot2po
    • Iff yooo isked for a compendioom, we-a will booild oone-a from zee-a ixisting files und updete-a using it und oopshoonelly oozeer ixternel compendeeooms

Zeet's it. Bork Bork Bork! It zee-a ind yooo shooold hefe-a ifery file-a zeet needs troonsleshoon updeted to zee-a letest templete-a files. Bork Bork Bork! Files zeet mofed shooold still be-a preserfed und not lost. Bork Bork Bork! Files zeet where-a renemed will still be-a troonsleted iff yooo used a compendioom oozeerwise-a zeey will be-a untroonsleted. Bork Bork Bork!

How well did yooo do

Congretooleshoons! Yooor files ire-a now migreted. Bork Bork Bork!

Yooo might woont to see-a how mooch ooff yooor oold work wes reooseble-a in zee-a noo fersion:

pocooont oooo-20-noo

This will use-a pocooont to cooont zee-a words in yooor noo files und yooo coon compere-a zee-a noomber ooff troonslete-a und untroonsleted messeges from yooor oold fersion. Bork Bork Bork!


Yooor files hefe-a now beee-a migreted und ire-a reedy for updeting. Bork Bork Bork! Iff files mofed zeey hefe-a beee-a mofed, iff zeey choonged nemes und yooo used a compendioom zeee-a most likely yooo hefe-a most ooff zeet work troonsleted. Bork Bork Bork!