Mobile menu

How to convert a bilingual TTX file into a PO file (poedit)
Thread poster: Gert Sass (M.A.)

Gert Sass (M.A.)  Identity Verified
Germany
Local time: 20:30
Member (2006)
English to German
+ ...
Feb 4, 2008

Does anyone know of a way to convert a bilingual TTX file into a PO file (poedit file). This is needed for a website translation of some 50,000 words. I started using poEdit, but it looks very time-consuming to me with at least 3 key strokes needed to advance from one TU to the next, so I would be much more comfortable using Tageditor instead of poEdit.
Here is what the PM told me upon my proposal to use Tageditor:

”It doesn't matter to the client if you use Tageditor or poEdit, however, the client
imposes to receive the Po files with the two columns.
I know we can export an html version and work with tageditor but I am not
sure if we can transform the html files into po format.
If you find a solution you can work with the software you want but we need
Po files.”
While there seems to be no problem with processing the according HTML file with Tageditor, the question is how will I be able to convert the TTX file into the PO format once I have finished the translation?

I am using SDL Trados 2006. My poEdit version was downloaded from www.poedit.com.

I would greatly appreciate any help in this. TIA


Direct link Reply with quote
 

Harry Bornemann  Identity Verified
Mexico
English to German
+ ...
.po is rather a TM format than a document format Feb 4, 2008

After you cleaned your TTX files into the TM and export this to text format,
the exported TM should look essentially like this:

<TrU>
<Seg L=EN-US>Source line
<Seg L=DE-DE>Target line
</TrU>

Now you would need a search&replace procedure or a script to transform it into the .po format:

#. Comment
msgid "Source line"
msgstr "Target line "
"Continued target line"

HTH,

Harry


[Edited at 2008-02-04 20:41]


Direct link Reply with quote
 

Vito Smolej
Germany
Local time: 20:30
Member (2004)
English to Slovenian
+ ...
using trados for po files Feb 4, 2008

I am using SDL Trados 2006. My poEdit version was downloaded from www.poedit.com.


You may want to have a look at pootle on sourceforge - one of the few projects dealing with PO format. I have no direct experience with it. I have translated what must be about 80.000 words of OpenOffice help ith TRADOS. The latest method - and I tried a few - was close to what Harry suggests - but different.

1. Take a monolingual PO in the form of

msgid "source"

and change it into

msgid "source"
msgstr "source"

(i.e. essentially make a bilingual Source > Source PO file)

2. The trick: make everything but the second string in the pair external or nontranslatable (!).

Trados will then only see the second source as something to translate. Of course if you then look at the bilingual contents before cleaning, it does look crazy. But once you clean it, it should revert to a bilingual (source > target) PO file, you can check out with POedit.

The extra kick of course comes when learning how to parse the whole darn thing: the "source" It can be really HAIRY.I used Tortoise tagger by Alexander Okunev - http://www.accurussian.net/tagger.htm. Essentially it's a preprocessor for the Word global search & replace machine - and you will need something of this sort to do the required changes. At 50.000 words workload I honestly feel it pays to go this way.

[Edited at 2008-02-05 06:27]


Direct link Reply with quote
 

Samuel Murray  Identity Verified
Netherlands
Local time: 20:30
Member (2006)
English to Afrikaans
+ ...
Some pointers Feb 5, 2008

Gert Sass (M.A.) wrote:
I started using poEdit, but it looks very time-consuming to me with at least 3 key strokes needed to advance from one TU to the next, so I would be much more comfortable using Tageditor instead of poEdit.


There are setting in PoEdit that you can change so that the focus always jumps to the one window instead of the other. This may save you on keystrokes.

"...however, the client imposes to receive the Po files with the two columns.


I have no idea what "the two columns" mean because PO files don't have columns... although they are displayed in PoEdit in columns, so perhaps the client simply means that he wants compliant PO files that open correctly in PoEdit.

I assume the client sent you compliant PO files to begin with. To use them in Wordfast, Trados or OmegaT, you need to convert them to source=source format. You can try to use find/replace, but that is dangerous, so I suggest you get msgen.exe from the Gnu Gettext suite. It is a commandline tool but it produces compliant PO files quickly. You can then try to translate those formatted PO files in your CAT tool.

http://gnuwin32.sourceforge.net/packages/gettext.htm (I think)

You can also use the Translate Toolkit's po2csv program to convert the PO files to CSV, which you can open in Excel and then translate in any program you want, and then save from Excel as CSV again and use csv2po to convert it back to PO.

http://translate.sourceforge.net/wiki/toolkit/csv2po (requires Python)

Before you use po2csv and csv2po extensively, experiment with small files to see if your version of Excel handles CSV files correctly -- although if not, you can set certain extra functions in po2csv and csv2po to make provision for it (eg codepage).

If your CAT tool can translate XLIFF, then you can also try the Translate Toolkit's program po2xliff (and xliff2po), which may or may not work yet -- test it first.

http://translate.sourceforge.net/wiki/toolkit/xliff2po (requires Python)


Direct link Reply with quote
 

Samuel Murray  Identity Verified
Netherlands
Local time: 20:30
Member (2006)
English to Afrikaans
+ ...
Careful with source=source formatting Feb 5, 2008

Harry Bornemann wrote:
#. Comment
msgid "Source line"
msgstr "Target line "
"Continued target line"


Examples of valid PO segments are:

# Comment
msgid "Text here"
msgstr "Text here"

# Comment
msgid ""
"Text here"
msgstr ""
"Text here"

# Comment
msgid "Text here"
"more text here"
msgstr "Text here"
"more text here"

... and don't forget that quotes are escaped:

# Comment
msgid "Text \"here\""
msgstr "Text \"here\""

# Comment
msgid ""
"Text \"here\""
msgstr ""
"Text \"here\""

... all of which can wreak havoc if you're trying to do the source=source formatting yourself. Better use a tool for it, like msgen.exe.


Direct link Reply with quote
 

Samuel Murray  Identity Verified
Netherlands
Local time: 20:30
Member (2006)
English to Afrikaans
+ ...
Pootle Feb 5, 2008

Vito Smolej wrote:
You may want to have a look at Pootle on sourceforge - one of the few projects dealing with PO format. I have no direct experience with it.


Using Pootle on a desktop computer is not for the feint of heart. Pootle is really meant as a web-based translation system. I have installed and used Pootle successfully on Windows XP Professional, but I wouldn't recommend it unless you're doing PO jobs often and you collaborate with several colleagues who don't use CAT tools.

If you want to see Pootle in action, see here:
http://translate.sourceforge.net/wiki/pootle/live_servers


Direct link Reply with quote
 

Samuel Murray  Identity Verified
Netherlands
Local time: 20:30
Member (2006)
English to Afrikaans
+ ...
PoEdit's HTML export... Feb 5, 2008

Gert Sass (M.A.) wrote:
"I know we can export an html version and work with tageditor but I am not sure if we can transform the html files into po format."


PoEdit can export the PO file to HTML, but that is for display purposes only. The export is not lossless. Comments, that form an integral part of the PO format, are not included in the HTML export. There is therefore no way to convert the HTML back into the original PO (even if you are smart enough to write a script to do it).


Direct link Reply with quote
 

Harry Bornemann  Identity Verified
Mexico
English to German
+ ...
Tools.. Feb 6, 2008

Samuel Murray wrote:

Examples of valid PO segments are:
...
Better use a tool for it, like msgen.exe.

Thanks for the reminder, I knew I remembered only the minimum requirements which I am practically needing.

My only PO customer mostly uses the Comment field for the source text and inserts a code or filename in the msgid field, which are of course not translatable.

I could not find any CAT tool able to handle this misuse, so I am using Perl for both conversions. I think there is no better language to parse text.


Direct link Reply with quote
 

Samuel Murray  Identity Verified
Netherlands
Local time: 20:30
Member (2006)
English to Afrikaans
+ ...
A horrible practice, indeed Feb 7, 2008

Harry Bornemann wrote:
My only PO customer mostly uses the Comment field for the source text and inserts a code or filename in the msgid field, which are of course not translatable.


A horrible practice indeed. I know of no PO editor that can handle that sort of thing, so any client using that method has obviously created their own PO file creator after only the briefest of glances at the file format specifiations.


Direct link Reply with quote
 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

How to convert a bilingual TTX file into a PO file (poedit)

Advanced search


Translation news related to SDL Trados





PerfectIt consistency checker
Faster Checking, Greater Accuracy

PerfectIt helps deliver error-free documents. It improves consistency, ensures quality and helps to enforce style guides. It’s a powerful tool for pro users, and comes with the assurance of a 30-day money back guarantee.

More info »
Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

More info »



All of ProZ.com
  • All of ProZ.com
  • Term search
  • Jobs