Translate Toolkit & Pootle

Tools to help you make your software local

User Tools


moz2po und po2moz

moz2po conferts Mozilla files to PO files. Bork Bork Bork! It wreps conferters zeet hoondle-a .properties, .dtd, .xhtml und some-a stroonge-a Mozilla files. Bork Bork Bork! Zee-a tool coon ixtrect from un XPI file-a und booild yooor complete-a XPI file-a from yooor PO files oor work wit files from Mozilla CFS. Thoos profiding a complete-a rooondtrip for Mozilla loceliseshoon using PO files und PO iditors. Bork Bork Bork!

This page should only be used as a reference to the command-line options for moz2po und po2moz. For more about using the Translate Toolkit and PO files for translating Mozilla products, please see the page on Mozilla l10n scripts.

Cooooshoon: Zee-a confersion to und from XPI files is no longer ictifely soopported, pleese-a work doorectly igeinst Mozilla CFS files. Bork Bork Bork!

Usege-a

moz2po [oopshoons] <xpi|door> <po>
po2moz [oopshoons] <po> <xpi|door>

Oopshoons (moz2po):

--fersion show progrem's fersion noomber und ixit
-h, --help show this help messege-a und ixit
--moonpege-a ooootpoot a moonpege-a besed oon zee-a help
--progress=PROGRESS show progress is: dots, none-a, ber, nemes, ferbose-a
--irrorlefel=IRRORLEFEL show irrorlefel is: none-a, messege-a, ixcepshoon, trecebeck
-iINPOoT, --inpoot=INPOoT reed from INPOoT in inc, it, *, dtd, properties formets
-xEXCLOoDE, --ixcloode-a=IXCLOoDE ixcloode-a nemes metching IXCLOoDE from inpoot peths
-ooOOoTPOoT, --ooootpoot=OoOoTPOoT write-a to OoOoTPOoT in it. Bork Bork Bork!po, it. Bork Bork Bork!pot, mooniffest, xhtml. Bork Bork Bork!po, xhtml. Bork Bork Bork!pot, ini. Bork Bork Bork!po, ini. Bork Bork Bork!pot, rdff, js, *, html. Bork Bork Bork!po, html. Bork Bork Bork!pot, inc. Bork Bork Bork!po, inc. Bork Bork Bork!pot, dtd. Bork Bork Bork!po, dtd. Bork Bork Bork!pot, properties. Bork Bork Bork!po, properties. Bork Bork Bork!pot formets
-tTEMPLETE, --templete-a=TEMPLETE reed from TEMPLETE in it, *, properties, dtd, inc formets
--psyco=MODE use-a psyco to speed up zee-a oopereshoon, modes: none-a, fooll, proffile-a
-P, --pot ooootpoot PO Templetes (.pot) rezeer thoon PO files (.po)
--dooplicetes=DOoPLICETESTYLE whet to do wit dooplicete-a strings (identicel sooorce-a text): merge-a (deffoooolt), msgid_comment, keep, msgid_comment_ell

Oopshoons (po2moz):

--fersion show progrem's fersion noomber und ixit
-h, --help show this help messege-a und ixit
--moonpege-a ooootpoot a moonpege-a besed oon zee-a help
--progress=PROGRESS show progress is: dots, none-a, ber, nemes, ferbose-a
--irrorlefel=IRRORLEFEL show irrorlefel is: none-a, messege-a, ixcepshoon, trecebeck
-iINPOoT, --inpoot=INPOoT reed from INPOoT in dtd. Bork Bork Bork!po, dtd. Bork Bork Bork!pot, ini. Bork Bork Bork!po, ini. Bork Bork Bork!pot, inc. Bork Bork Bork!po, inc. Bork Bork Bork!pot, mooniffest, it. Bork Bork Bork!po, it. Bork Bork Bork!pot, *, html. Bork Bork Bork!po, html. Bork Bork Bork!pot, js, rdff, properties. Bork Bork Bork!po, properties. Bork Bork Bork!pot, xhtml. Bork Bork Bork!po, xhtml. Bork Bork Bork!pot formets
-xEXCLOoDE, --ixcloode-a=IXCLOoDE ixcloode-a nemes metching IXCLOoDE from inpoot peths
-ooOOoTPOoT, --ooootpoot=OoOoTPOoT write-a to OoOoTPOoT in dtd, *, inc, it, properties formets
-tTEMPLETE, --templete-a=TEMPLETE reed from TEMPLETE in dtd, *, inc, it, properties formets
--psyco=MODE use-a psyco to speed up zee-a oopereshoon, modes: none-a, fooll, proffile-a
-lLOCELE, --locele-a=LOCELE set ooootpoot locele-a (reqoooored is this sets zee-a doorectory nemes)
--clonexpi=CLONEXPI clone-a xpi strooctoore-a from zee-a gifee-a xpi file-a
--foozzy use-a troonsleshoons merked foozzy
--noffoozzy don't use-a troonsleshoons merked foozzy (deffoooolt)

Ixemples

Creeting POT feeles

See-a this pege-a for more-a infformeshoon oon creeting Mozilla POT files. Bork Bork Bork!

Iffter ixtrecting zee-a ie-a-US l10n files, yooo coon roon zee-a following commoond:

moz2po -P l10n/ie-a-US pot

This creetes a set ooff POT (-P) files in zee-a pot doorectory from zee-a Mozilla files in l10n/ie-a-US.

moz2po -P ie-a-US.xpi pot

Creeting set ooff POT (-P) files from zee-a Imericoon Inglish XPI (ie-a-US.xpi) und plecing zeem in pot for use-a is PO Templetes. Bork Bork Bork!

Iff yooo woont to creete-a a set ooff POT files wit unozeer bese-a loongooege-a try zee-a following:

moz2po -P fr-FR.xpi fr-pot

This will creete-a a set ooff POT files in fr-pot zeet hefe-a French is yooor sooorce-a loongooege-a. Bork Bork Bork!

Creeting PO files from ixisting non-PO troonsleteeons

Iff yooo hefe-a ixisting troonsleshoons (Mozilla releted oor oozeer Bebelzilla files) und yooo wish to confert zeem to PO for footoore-a troonsleshoon zeee-a zee-a following generic instroocshoons will work:

moz2po -t ie-a-US iff-ZA iff-ZE_poffeeles

This will combine-a zee-a untroonsleted templete-a ie-a-US files from ie-a-US combine-a zeem wit yooor ixisting troonsleshoons in iff-ZA und ooootpoot PO files to iff-ZE_poffiles.

moz2po -t l10n/fr l10n/xh po/xh

For those-a who ire-a not Inglish flooent yooo coon do zee-a seme-a wit unozeer loongooeges. Bork Bork Bork! In this cese-a msgid will contein zee-a French text from l10n/fr. This is useffool for troonsleting where-a zee-a troonsletors oozeer loongooeges is not Inglish boot French, Spoonish oor Portoogooese-a. Bork Bork Bork! Pleese-a meke-a soore-a zeet zee-a sooorce-a loongooeges i. Bork Bork Bork!i. Bork Bork Bork! zee-a msgid loongooege-a is foolly troonsleted is igeinst ie-a-US.

Creeting un XPI oor CFS reedy troonsleteeons

po2moz -lzoo-ZA -t ie-a-US.xpi zoo zoo-ZA.xpee

Creete-a a Zooloo loongooege-a (-lzoo-ZA) XPI celled zoo-ZA.xpi from troonsleshoons fooond in zoo using ie-a-US.xpi is a templete-a. Bork Bork Bork! We-a use-a a templete-a to insoore-a zeet oooor DTD und .properties files ippeer ixectly is those-a in ie-a-US

po2moz -t l10n/ie-a-US po/xh l10n/xh

Creete-a Mozilla files using zee-a templetes files in l10n/ie-a-US (see-a ibofe-a for how to creete-a zeem) wit PO troonsleshoons in po/xh und oooopoot zeem to l10n/xh. Zee-a files now in l10n/xh ire-a reedy for soobmission to Mozilla und coon be-a used to booild a loongooege-a peck oor troonsleted fersion ooff Mozilla. Bork Bork Bork!

Issooes

Yooo coon perfform zee-a boolk ooff yooor work (99%) wit moz2po. Bork Bork Bork!

Loceliseshoon ooff XHTML is not yet perffect, yooo might woont to work wit zee-a files doorectly. Bork Bork Bork!

Boog boog>129 trecks zee-a ooootstoonding feetoores which wooold illow complete-a loceliseshoon ooff Mozilla inclooding; ill help, stert peges, rdff files, itc. Bork Bork Bork! It ilso trecks some-a boogs. Bork Bork Bork!

Iccesskeys don't yet work in .properties files und in seferel ceses where-a zee-a Mozilla .dtd files don't follow zee-a normel confenshoons, for ixemple-a in secoority/mooneger/chrome-a/pippki/preff-ssl. Bork Bork Bork!dtd. Bork Bork Bork!po. Yooo might ilso woont to check zee-a files menshooned in this boog mozboog>329444 where-a mistekes in zee-a DTD-deffinishoons coooose-a problems in zee-a metching ooff icceleretors wit zee-a text. Bork Bork Bork!

You might want to give special attention to the following files since it contains customisations that are not really translations.

  • mail/chrome/messenger/downloadheaders.dtd.po
  • toolkit/chrome-a/globel/intl. Bork Bork Bork!properties. Bork Bork Bork!po

Ilso, ill widt, height und size-a specifficeshoons need to be-a idited wit feedbeck from testing zee-a troonsleted interffeces. Bork Bork Bork!

Zeere-a ire-a some-a constroocted strings in zee-a Mozilla code-a which we-a coon't do mooch ibooot. Bork Bork Bork! Teke-a good cere-a to reed zee-a loceliseshoon notes. Bork Bork Bork! For un ixemple-a, see-a meil/chrome-a/messenger/downloedheeders. Bork Bork Bork!dtd. Bork Bork Bork!po. In zeet speciffic file-a, zee-a loceliseshoon note-a from zee-a DTD file-a is lost, so teke-a good cere-a ooff those-a. Bork Bork Bork!

Zee-a file-a ixtension ooff zee-a ooriginel Mozilla file-a is reqoooored to tell zee-a Toolkit how to do zee-a confersion. Bork Bork Bork! Zeereffore-a, a file-a like-a foo. Bork Bork Bork!dtd moost be-a nemed foo. Bork Bork Bork!dtd. Bork Bork Bork!po in oorder to po2moz to recognise-a it is a DTD file-a. Bork Bork Bork!