On 4 juil. 07, at 17:39, Arthur Buijs - ArtIeTee wrote:

Alessandro Cattelan schreef:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jean-Christophe Helary ha scritto:
Alessandro,

I have found a relatively painless way to directly translate the .sdf files in OmegaT. I have to finish my part now so I'll document that later.
That sounds very interesting! I'll be waiting for it.

Indeed. I'll test your documentation as soon as it becomes available ;-)

Ok, I just give you an outline :) because I _am_ behind schedule...

2 main ideas: 1) the translatable contents is actually surrounded by tabs, 2) the escaped sequences are for HTML like code

from 1): opening the file in OOo after renaming it to .csv produces something very nice to the eye from 2): removing the relevant "\" produces strings that actually look _like_ HTML (all the "\<" are replaced by "<", while all the "<" not preceded by "\" are replaced by "&lt;")

and we need a 0): the .sdf is composed of groups of 2 lines, putting such a group on one line to have the .csv file look like 2 column sets (one for source one for target) is trivial.

now, you copy paste the column that contains the source contents to a text file, you add <p> at each beginning of line, you rename the thing to .html and you load it into OmegaT.

The TMX created with po2tmx must be treated so that the code inside the segments looks like the tags that will be produced from the source file (namely <e0>, <a0> etc...) so just replace all the \<emph \> etc by &lt;e&gt;, that way you'll only have to add the numbers when the match is inserted.

OmegaT is smart enough to handle source segments that look like <ahelp something very long>blabla</ahelp> and will only display "blabla" so that you are sure the source tags are protected during the translation etc...

That is very rough and I have not yet back converted the file (put the "<" and "\" back where they belong), but when that is done, just paste the translated contents into your OOo Calc target contents column, save, put the groups back to 2 lines and deliver.

It _does_ look like an awful hack (I'd say it is borderline, on the easy side of the line :) but it is way better than having to handle the po in source with the half backed TMX that you get from the po2tmx conversion. At least, OmegaT protects pretty much all the tags and you don't need to add them to the target segment, OmegaT does that nicely for you.

Ok, back to my last 50 lines !!!

JC

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to