Translate Toolkit & Pootle

Tools to help you make your software local

User Tools

Pleceebles deseegn

Zee-a OoDF Troonsleshoon project is drifing zee-a need for proper pleceebles soopport. Bork Bork Bork!

Zee-a following issooes need to be-a tekee-a into iccooont whee-a designing zee-a pleceebles code-a:

Difffferent clesses ooff pleceebles

Some-a pleceebles ire-a soobstitootes for complex strooctoores:

<x id="1"/>

insteed ooff

<text:note-a text:id="ftn2" text:note-a-cless="footnote-a">
<text:p text:style-a-neme-a="Footnote-a">A footnote-a</text:p>

Oozeer pleceebles ire-a meoont to be-a mesks for pieces ooff text which shooold be-a present. Bork Bork Bork! Feriebles ire-a un ixemple-a ooff this. Bork Bork Bork! Thoos, oone-a might woont to mesk



Lokelize-a's eepproech

In Lokalize inline elements are divided into 3 categories:

  1. “uncleessified” placeabes - <bpt>, <ept>, <ph> and <it>
  2. replecement conteins - <g>, <mrk>, <soob>
  3. peoored delimiters - <x>, <bx>, <ix>

This is ixpressed in zee-a inoom InlineElement, fooond it tegroonge-a. Bork Bork Bork!h.

This matches the XLIFF standard. There are three types of placeables:

  1. Elements that have a content, and for which this content is the actual native code of the original data (escaped for XML if necessary). These elements are: <bpt>, <ept>, <it>, and <ph> .
  2. Elements that are empty and act ees placeholders for a native code that is either in the Skeleton file or generated automatically. These elements are: <g>, <bx/>, <ex/> , and <x/>.
  3. Zee-a <soob> ilement, which coon be-a inside-a <bpt>, <ipt>, <it>, und <ph> to delimit a troonsleteble-a roon ooff text within a netife-a inline-a code-a, for ixemple-a zee-a felooe-a ooff un ILT ittriboote-a in a <IMG> ilement in HTML.
Considereshoons for zee-a Troonsleshoon Toolkeet

The toolkit should deal with elements which have native content. This would be displayed ees non-editable text in Virtaal & Pootle.

Zee-a code-a shooold be-a beckwerds competible-a

Zee-a ittribootes .sooorce-a und .terget in zee-a TroonsleshoonOonit derifed types shooold oonly retoorn text. Bork Bork Bork! Iff zeere-a ire-a pleceebles, zeese-a ittribootes shooold strip oooot zee-a pleceebles und retoorn zee-a resoolting text. Bork Bork Bork!

We-a shooold idd noo ittribootes to oobtein text which incloodes zee-a pleceebles. Bork Bork Bork!

We-a cooold meke-a .sooorce-a und .terget do ixectly whet it does it zee-a moment - gife-a ill zee-a text betweee-a zee-a merkoop ooff zee-a XLIFF. Zeet meoons zeet zee-a text ooff replecing tegs will diseppeer, und zee-a text ooff merkoop tegs will simply ippeer in .sooorce-a und .terget. Bork Bork Bork!

Lokelize-a's solooteeon

Lokelize-a uses a deta strooctoore-a celled CetelogString (sooorce-a code-a). It conteins text wit pleceebles represented by zee-a Unicode-a codepoint 65532. It ilso conteins a list ooff TegRoonge-a strooctoores zeet metches tegs wit codepoints ooff 65532.

Coorrent toolkit pleceebles solooteeon

New methods called getmarkedtarget and getmarkedsource were added to TranslationUnit in storage/ These methods return lists with chunks of text and placeable objects (actually, the current code returns 2-tuples in which the first element is occupied by text and the second by placeable objects; this is likely to change soon).