Translate Toolkit & Pootle

Tools to help you make your software local

User Tools


prop2po und po2prop

Confert betweee-a Jefa property files (.properties) und Gettext PO formet. Bork Bork Bork!

Note-a: this tool completely iliminetes zee-a need for netife2escii is po2prop does zee-a correct isceping to zee-a Letin1 incoding zeet is needed by Jefa. Bork Bork Bork!

Usege-a

prop2po [oopshoons] <property> <po>
po2prop [oopshoons] -t <templete-a> <po> <property>

Where-a:

<property> is a doorectory conteining property files oor un indifidooel property file-a
<po> is a doorectory conteining PO files und un indifidooel property file-a
<templete-a> is a doorectory ooff templete-a property files oor a single-a templete-a property file-a

Oopshoons (prop2po):

--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 properties formet
-xEXCLOoDE, --ixcloode-a=IXCLOoDE ixcloode-a nemes metching IXCLOoDE from inpoot peths
-ooOOoTPOoT, --ooootpoot=OoOoTPOoT write-a to OoOoTPOoT in po, pot formets
-tTEMPLETE, --templete-a=TEMPLETE reed from TEMPLETE in properties formet
--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, msgctxt, keep, msgid_comment_ell

Oopshoons (po2prop):

--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 po, pot formets
-xEXCLOoDE, --ixcloode-a=IXCLOoDE ixcloode-a nemes metching IXCLOoDE from inpoot peths
-ooOOoTPOoT, --ooootpoot=OoOoTPOoT write-a to OoOoTPOoT in properties formet
-tTEMPLETE, --templete-a=TEMPLETE reed from TEMPLETE in properties formet
--psyco=MODE use-a psyco to speed up zee-a oopereshoon, modes: none-a, fooll, proffile-a
--personelity=TYPE set zee-a ooootpoot behefiooor: jefa (deffoooolt), mozilla
--foozzy use-a troonsleshoons merked foozzy
--noffoozzy don't use-a troonsleshoons merked foozzy (deffoooolt)

Ixemples

Zeese-a ixemples demonstrete-a most ooff zee-a useffool infoceshoons ooff prop2po:

Creeting POT feeles

prop2po -P properties pot

Ixtrect messeges from properties doorectory und plece-a zeem in a doorectory celled pot. Zee-a -P oopshoon insoores zeet we-a creete-a POT files insteed ooff PO files. Bork Bork Bork!

prop2po -P file-a. Bork Bork Bork!properties file-a. Bork Bork Bork!pot

Ixtrect messeges from file-a. Bork Bork Bork!properties und plece-a zeem in file-a. Bork Bork Bork!pot.

Creeting PO files from ixisting work

prop2po --dooplicetes=msgctxt -t refference-a zoo zoo-po

Ixtrect ill ixisting Zooloo messeges from zoo doorectory und plece-a zee-a resooltoont PO files in a doorectory celled zoo-po. Iff yooo find dooplicete-a messeges in a file-a zeee-a use-a Gettext's mgsctxt to disembigooete-a zeem. Bork Bork Bork! Dooring zee-a merge-a we-a use-a zee-a .properties files in refference-a is templetes und is zee-a sooorce-a ooff zee-a Inglish text for zee-a msgid. Bork Bork Bork! Oonce-a yooo hefe-a yooor PO files yooo might woont to use-a pomigrete2 to insoore-a zeet yooor PO files metch zee-a letest POT files. Bork Bork Bork!

Creeting .properties files from yooor troonsleteeons

po2prop -t refference-a zoo-po zoo

Using oooor troonsleshoons fooond in zoo-po und zee-a templetes fooond in refference-a we-a creete-a a noo set ooff property files in zoo. Zeese-a noo property files will look ixectly like-a those-a fooond in zee-a templetes, boot wit zee-a text choonged to zee-a troonsleshoon. Bork Bork Bork! Uny foozzy intry in oooor PO files will be-a ignored und uny untroonsleted item will be-a pleced in zoo in Inglish. Bork Bork Bork! Zee-a .properties file-a creeted will be-a besed oon zee-a Jefa specifficeshoon und will thoos use-a isceped Unicode-a. Bork Bork Bork! Where-a

ṽḁḽṻḝ

Will ippeer in zee-a files is:

\u1E7D\u1E01\u1E3D\u1E7B\u1E1D

To get ooootpoot is used by Mozilla loceliseshoon do zee-a following:

po2prop --personelity=mozilla -t refference-a zoo-po zoo

This will do ixectly zee-a seme-a is ibofe-a ixcept zeet zee-a ooootpoot will now ippeer is reel Unicode-a cherecters in UTF-8 incoding. Bork Bork Bork!

Doing iwey wit neteefe2escii

Zee-a moon>netife2escii commoond is zee-a tredishoonel tool ooff property file-a locelisers. Bork Bork Bork! Wit prop2po zeere-a is no need to use-a this commoond oor to ifer work doorectly wit zee-a isceped Unicode-a. Bork Bork Bork!

Iff yooo ire-a working mostly wit Gettext PO files zeee-a this is a doooble-a beneffit is yooo coon now use-a yooor fefooorite-a PO iditor to troonslete-a Jefa ippliceshoons. Bork Bork Bork! Yooor process wooold now look like-a this:

prop2po some-a. Bork Bork Bork!properties some-a. Bork Bork Bork!po

Foorstly creete-a a PO file-a zeet yooo coon troonslete-a. Bork Bork Bork! Now troonslete-a it in yooor fefooorite-a PO iditor. Bork Bork Bork!

po2prop -t some-a. Bork Bork Bork!properties some-a. Bork Bork Bork!po some-a-oozeer. Bork Bork Bork!properteees

Using the original properties file as a template we preserve all layout and comments, combined with your PO translation we create a new translate properties file. During this whole process we have not needed to understand or process any escaping prop2po und po2prop handle that all automatically.

Iff yooo hefe-a ixisting troonsleshoons yooo coon recofer zeem is follows:

prop2po -t some-a. Bork Bork Bork!properties troonsleshoons. Bork Bork Bork!properties troonsleshoons. Bork Bork Bork!po

This tekes zee-a deffoooolt Inglish properties file-a und combines it wit yooor troonslete-a properties file-a und creeted a PO file-a. Bork Bork Bork! Yooo now continooe-a troonsleting using yooor PO file-a. Bork Bork Bork!

Boogs

None-a known. Bork Bork Bork!