Salesforce

WorldServer - How to identify mismatches in Tag/Placeholders Ids in a WorldServer Translation Memory

« Go Back

Information

 
TitleWorldServer - How to identify mismatches in Tag/Placeholders Ids in a WorldServer Translation Memory
URL Name000003931
SummaryMismatches in the Tag or Placeholder-IDs coming from a Translation Memory might lead to an error during  Segmentation or Save in WorldServer. This articles explains how to identify them through a Freefor SQL query.
Scope/EnvironmentWorldServer
Question
Mismatches in the Tag or Placeholder-IDs coming from a Translation Memory might lead to an error during  Segmentation or Save in WorldServer.

For instance, one of these errors:

The given key was not present in the dictionary
Placeholder not referenced
Placeholder not found

at the SegmentationSave or Save target step.

WorldServer cannot generate a target file and those target segments need to be manually fixed in Browser Workbench in order for the error to be solved. This issue might also prevent the export of a Task to a WorldServer (WSXZ) Studio package.

Also the error java.lang.NullPointerException during Segment Asset or Pretranslate is caused by wrong TM entries.

How can I prevent this issue to happen by fixing those TM entries directly in the WorldServer TM?
Answer
The following query identifies mismatches in Tag/Placeholder IDs. In WorldServer, go to

Tools > Translation Memories

and click on the relevant Translation Memory to open it. Select the source and target language of your choice (or select all source and all target, as needed).

Use the Freeform SQL Search to find those entries and enter this Regular Expression in the Freeform SQL field:

[Source] like '%{1}%' and [Target] not like '%{1}%'

This is how the Search might look like:

User-added image

You might want to subsequently replace the number "1" with other numbers like "2", "3" etc to find more entries.

[Source] like '%{2}%' and [Target] not like '%{2}%'
[Source] like '%{3}%' and [Target] not like '%{3}%'


You could also run this Query that identifies all misplaced tags from 1 to 7 (you can add or remove more numbers as needed):
 
([Source] like '%{1}%' and [Target] not like '%{1}%') or ([Source] like '%{2}%' and [Target] not like '%{2}%') or ([Source] like '%{3}%' and [Target] not like '%{3}%') or ([Source] like '%{4}%' and [Target] not like '%{4}%') or ([Source] like '%{5}%' and [Target] not like '%{5}%') or ([Source] like '%{6}%' and [Target] not like '%{6}%') or ([Source] like '%{7}%' and [Target] not like '%{7}%')

Here is an example of how the results of such a search could look like, clearly displaying TM entries where the placeholders in the source entry do not match the ones in the target entry:

User-added image

You can open each TM entry and fix the tag issue and save your change:

User-added image 
 
Reference
Attachment 1 
Attachment 2 
Attachment 3 
Attachment 4 
Attachment 5 

Powered by