Salesforce

WorldServer: Portable Object (.PO) file-formats fail at the segmentation step with error Violation of PRIMARY KEY constraint 'segmentsPk'

« Go Back

Information

 
Article TypeSolution Article
Scope/EnvironmentWorldServer 11.7.x
Symptoms/Context
A PO file fails at the segmentation step with the error below:

Violation of PRIMARY KEY constraint 'segmentsPk'
 
Completed Segment Asset step of task 2 in time [00:00:00] on engine [ws-legacy:engine#5] with result Error. 
Execution output: 
Cannot parse asset data. Details: com.idiominc.ws.filters.FilterParseException: Violation of PRIMARY KEY constraint 'segmentsPk'. 
Cannot insert duplicate key in object 'dbo.SEGMENTS'. The duplicate key value is (2284018, 0000000001).
Note: the value indicated in the error message will vary.

In an Oracle WorldServer  environment, the error is slightly different:

ORA-00001: Unique Constraint (WORLDSERVER.SEGMENTSPK) verletzt
 
Resolution
The segmentation is failing in WorldServer because these .po files already have translated content in them. In short, PO files are bilingual files, similar to xliff or xlf and the PO file you are translating already has some text translated. This has been logged as a defect with our development team under CRQ-27933. This defect will be addressed in version 11.8.1. where the translated content will automatically appear in the target segment.

Workaround: edit the source *.po file and remove the translated text from the msgstr value. For example, change

msgid "Email Address"
msgstr "E-Mail-Adresse"


to

msgid "Email Address"
msgstr ""


Without such text, the segmentation will be successful.
 
Root Cause
The segmentation is failing in WorldServer because these PO files already have translated content in them. In short, PO files are bilingual files, similar to xliff or xlf and the PO file you are translating already has some text translated.

Example:
msgctxt ""
"{}"
msgid "Email Address"
msgstr "E-Mail-Adresse"

In this string, the msgid is the source and msgstr is the target. Because of such translations, the segmentation is failing in WorldServer.
Reference
Defect: CRQ-27933
Attachment 1 
Attachment 2 
Attachment 3 
Attachment 4 
Attachment 5 

Powered by