Merging files from SDL Trados

This Forum is for general issues about MadCap Lingo
Post Reply
mdpais-c
Propeller Head
Posts: 20
Joined: Wed May 13, 2020 11:56 am

Merging files from SDL Trados

Post by mdpais-c »

I'm a complete newbie with Lingo. I'm a technical writer that's been working with Flare for over a year, and with our online help project almost complete, I've started looking into the process of getting it translated from our outsourced translation partner. So here's what I've done and where I'm stuck.

1. I built and saved my Flare project.
2. I opened Lingo and created a new Lingo project with the Flare project as the source file.
3. I created a bundle selecting the XLIFF Files Bundle option and sent the created .ZIP folder to our translator.
4. The translator was able to open the folder without a problem in Trados, translated it and send back a .ZIP folder with the translated files.

My attempts to merge the translated .ZIP folder into Lingo have not been successful. Each time I attempt to do so, I'm met with a ton of errors which all seem to be one of two kinds:

XLIFF in translation unit X is corrupt. Object reference not set to an instance of an object.
OR
The XLIFF in filename is no longer valid, so you will need to contact the translator to repair it: Specified argument was out of the range of valid values. Parameter name: Corrupted nodes in translation units.

Am I missing something or doing something wrong?
doloremipsum
Sr. Propeller Head
Posts: 290
Joined: Mon Aug 26, 2019 2:11 pm

Re: Merging files from SDL Trados

Post by doloremipsum »

I'm not experienced with translating via Trados, but it sounds like the XLIFF bundle it has produced are not quite what Lingo was expecting. Here are a few thoughts for avenues you could explore:
  • Compare one of the XLIFF files you sent to the translator with the translated copy (using WinCompare or similar to highlight the differences). You might be able to spot some change in the XML structure which has made Lingo unable to read it.
  • Ask the translator whether there were any specific settings they used. Check the Trados forums or any documentation they might have about working with Lingo to see whether there's anything the translator needs to do to create compatible bundles.
  • Ask Madcap Support, or get the translator to ask Trados support.
ETA: Of course someone else has had the same problem a bit further down in the forums... viewtopic.php?f=40&t=33403
in hoc foro dolorem ipsum amamus, consectimur, adipisci volumus.
rpa
Propeller Head
Posts: 36
Joined: Mon Jun 10, 2013 3:47 am
Location: Thurgau, Switzerland
Contact:

Re: Merging files from SDL Trados

Post by rpa »

I had the same problem with my translator agency. Since my translator could not see any problems on his side, I had find a solution by myself. After some research I figured out that the problem was a missing xml-tag: mrk. This tag is not the xlf files that the translator is sending me. That's why lingo is crashing when trying to import the files.

Solution
To solve this problem, I open the xlf file in a text editor (in my case it is notepad++) and do the following:
1. Goto "search" and enable regex.
2. Do the first find & replace:
2.1. Search for

Code: Select all

([^>]*)(</source>)
and replace it with

Code: Select all

$1$2<seg-source><mrk mtype="seg" mid="1">$1</mrk></seg-source>
3. Do the second find & replace in the same file:
3.1. Search for

Code: Select all

(<target state="translated">)([^<]*)
and replace it with

Code: Select all

$1<mrk mtype="seg" mid="1">$2</mrk>
4. Save the xlf file and zip it
5. Import in Lingo.

I made a small makro in Notepad++ to perform the steps obove with one click.

Note: Since I'm not having many files to edit after I receive them from the translator, this solutions fits very well for me. It might be different when it has to be done for hunderds of files.

I hope this solutions works for you too.
bwofficer
Propeller Head
Posts: 57
Joined: Tue May 12, 2020 2:16 am

Re: Merging files from SDL Trados

Post by bwofficer »

rpa wrote:1. Goto "search" and enable regex.
2. Do the first find & replace:
2.1. Search for

Code: Select all

([^>]*)(</source>)
and replace it with

Code: Select all

$1$2<seg-source><mrk mtype="seg" mid="1">$1</mrk></seg-source>
3. Do the second find & replace in the same file:
3.1. Search for

Code: Select all

(<target state="translated">)([^<]*)
and replace it with

Code: Select all

$1<mrk mtype="seg" mid="1">$2</mrk>
4. Save the xlf file and zip it
5. Import in Lingo.
I'm having the same problem. I don't understand regex search and replace, and I'm very nervous of trying the code blind. Can you please explain what it is doing in terms a non-programmer would understand? It would be awfully helpful!

Thanks!
telmaiara
Jr. Propeller Head
Posts: 7
Joined: Thu May 11, 2023 3:20 pm

Re: Merging files from SDL Trados

Post by telmaiara »

I encountered a similar issue, and my colleague and I were able to identify where the problem was. Here’s what happened:

In Lingo, when we click in an empty segment to input a translation, the following error message appears: “Specified argument was out of the range of valid values. Parameter name: startIndex.”

We noticed that there were three translation units in the translation memory for that segment, but only one was triggering the error message and causing Lingo to crash. This particular entry contained tags that were not used by Flare or Lingo, which made it challenging for Lingo to handle. The affected entry originated from the import of a TMX file from memoQ.

The unrecognized tag in our case was <bmk>.
Post Reply