Thursday, October 3, 2013

"Multiple Placeholder Tags with the Same ID" Error When Adding a Bilingual Doc File to a Studio Project

Problem: Adding a bilingual doc file to an existing Studio project and then choosing the batch task Prepare Without Project TM causes Studio to throw an error citing multiple placeholder tags with the same ID, causing the Convert to Translatable Format task to fail.

For some reason, if the file is open under a Single Document workflow (instead of being added to an existing project), Studio is able to open and process the file correctly. So if this is more convenient (for example, if it's just one file, a single TM, etc.), then this would be the fastest solution: treat the file as a Single Document instead of adding it to a project. (Note that you may still get the error when attempting to save the file, but the target file will still be produced.)

However, since using a Single Document workflow is not always practical, a solution to this issue is described below.




(Apparent) cause: I have been able to narrow down the cause for this problem to the use of page number fields in Word documents that cause this error. The screenshot below shows the only content of the file I used for this test.



Solution: What has worked for me has been temporarily replacing the page number fields in the bilingual doc file, adding the file to my project, working on the file in Studio, exporting as target, and then, in the target bilingual doc, adding back the page number files. So the steps are:

1. Replace the number fields with random letters:



2. Save the file in Word, add it to the Studio project, and process normally.



3. Translate the file in Studio. When the relevant TU is processed, Studio will give a tag verification error because I only removed the page number and number of pages fields in the target segment, but the tags remained for the source segment:


Fortunately, this doesn't prevent me from saving the target file.

4. Restore the page number fields in the target file.

Upon opening the target file, we can see that the "X" and "Y" are still where the page number fields should be:



A simple copy-paste operation in Word restores the page number fields:



And that's it. This needs to be done for each individual file in the project that throws this error.







Quick and Painless Conversion to Bilingual Doc Format with SDL LegIt!

I have posted before about the steps to create a bilingual (or unclean) DOC file.

To use this process, a user needed to have Trados Workbench installed. This was a source of confusion and frustration for many translators, especially for adopters of Studio who never used "the old Trados" and therefore were not familiar with Workbench or didn't have a working Trados 2007 license.

But it looks like thanks to a great little SDL Open Exchange app called LegIt!, Trados Workbench will soon be but a distant memory, at least for this particular process.


Note that SDL LegIt! requires SDL Trados Studio 2014.

The app is extremely simple to use: all it takes is 4 clicks.

1st click:  Choose whether your want to Convert to TTX or Convert to Bilingual Doc

2nd click:  Select your TM
                  Notes:
                  * Only TMs in TMW format can be selected here
                  * The source and target languages are automatically populated from the TM
                  * You can still segment a file with no TM (skip this 2nd click). When no TM is selected, you
                     will have to select the source and target languages manually.

3rd click:  Select your document(s)
                  Notes:
                  * Only DOC (Word 97-2003 Document) files can be bilingual. If your document has a
                     DOCX extension and you have selected "Convert to Bilingual Doc" the conversion will
                     fail and the file will be converted to TTX instead. Go to MS Word and save as DOC first
                     for successful conversion.

4th click:  Convert
                   Notes:
                  * If you forget to do the 1st click and check Convert to Bilingual Doc (or Convert to TTX),
                     nothing will happen when you click Convert, and you won't get an error message, so make
                     sure you have checked either box before clicking the Convert button.



As a final note, keep in mind that this process overwrites your original Word files. However, for each converted file, a .BAK file is added to your original file location. By changing the file extension to .DOC, you will once again have your original, unsegmented source file.