How make swap (reverse) for single segments in tmx?
Thread poster: Yuriy Vassilenko

Yuriy Vassilenko  Identity Verified
Russian Federation
Local time: 12:17
English to Russian
Sep 12, 2010

How make swap (reverse) source-target for single segments in tmx?

 

esperantisto  Identity Verified
Local time: 12:17
Member (2006)
English to Russian
+ ...
Be more specific Sep 12, 2010

What is the program you work with and what are you trying to achieve? For OmegaT, this question is irrelevant. In fact, a TMX segment looks like:

Code:


Правая сторона



Right side




Nothing to reverse actually. Only srclang in the header can be modified.

Damn, despite of tagging the code as code, it’s parsed by ProZ.

[Edited at 2010-09-12 11:17 GMT]


 

Yuriy Vassilenko  Identity Verified
Russian Federation
Local time: 12:17
English to Russian
TOPIC STARTER
// Sep 12, 2010

I told about tmx-files & mixed segments (EN-RU & RU-EN in one file).

[Редактировалось 2010-09-12 12:16 GMT]


 

esperantisto  Identity Verified
Local time: 12:17
Member (2006)
English to Russian
+ ...
Again Sep 12, 2010

Yuriy, there is nothing to reverse or swap in a TMX unit, there is no mark for source or target. It is the parser that decides if the text between and should be treated as source or target (based on srclang in the header).

 

Yuriy Vassilenko  Identity Verified
Russian Federation
Local time: 12:17
English to Russian
TOPIC STARTER
// Sep 12, 2010

See structure of tmx file, please.

 

Antoní­n Otáhal
Local time: 11:17
Member (2005)
English to Czech
+ ...
Olifant Sep 12, 2010

I believe your problem could be resolved using the Olifant freeware - at least you can give it a try...

http://sourceforge.net/projects/okapi/files/Olifant%20(Stable)/

Antonin


 

sasa.
Russian Federation
Local time: 17:17
English to Russian
+ ...
How make swap (reverse) for single segments in tmx? Sep 26, 2010

Yuriy Vassilenko wrote:

How make swap (reverse) source-target for single segments in tmx?


Yuriy,
You still need to swap segmentes in .TMX file?


 

Péter Tófalvi  Identity Verified
Hungary
Local time: 11:17
Member
English to Hungarian
+ ...
Not true Apr 22, 2017

esperantisto wrote:

Yuriy, there is nothing to reverse or swap in a TMX unit, there is no mark for source or target. It is the parser that decides if the text between and should be treated as source or target (based on srclang in the header).

This is a very old discussion, but is worth refreshing it.
...
Let's say I want to use an English-French TMX in a French-English translation project and not just for lookup (read-only), but continuously, updating the entries in the TMX file.

It is obvious that I MUST revert the TMX file.

How to do that?

A TMX (actually an XML) file has the following structure:


So, we clearly have:
srclang: en
and
targetlang: fr

Let's just change these two parameters in the header and leave all TUs in the body unchanged and see what happens! Done that, saved the file.

I then opened the TMX in Okapi Olifant, and the source-target pairs displayed as I wanted, but looking again in the TMX file with an editor (Notepad++ ← can handle max. 500 MB files!) the physical order of TU entries didn't change. This was actually of no importance for me, but I wanted an aesthetic output, so I imported the TMX in a popular CAT tool, then exported it again as TMX.
I then opened the new TMX in Notepad++ and voilá, looked like a wonder: the order of former source and target segments was changed/reverted, and now I had a perfectly reverted TMX. A dream come true.icon_smile.gif

[Edited at 2017-04-22 22:17 GMT]


 


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


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

How make swap (reverse) for single segments in tmx?

Advanced search







CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use SDL Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

More info »
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 »



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