Hello team,
I am getting errors from the Trados plugin when using our automatic translation API, and I wanted to know what the best course of action would be to fix that error.
We use a connector that received an XLIFF file from Trados, then translates that file and sends it back. Here is an example of such a translation with our API:
<?xml version="1.0" encoding="utf-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en-GB" original="dummy.xml" datatype="mimetype" mimetype="xml/xliff">
<body>
<trans-unit id="1">
<source>This is a <bpt id="1" type="97" />property configuration<ept id="1" /> of the <bpt id="2" type="100" />tests<ept id="2" />.</source>
<target>Ceci est une <bpt id="1" xid="1" type="97" />configuration<ept id="1" /> des<bpt id="2" xid="1" type="97" /> propriétés<ept id="2" />, dans les <bpt id="3" xid="2" type="100" />tests<ept id="3" />.</target>
<seg-source>
<mrk id="1" type="seg" mtype="seg">This is a <bpt id="1" type="97" />property configuration<ept id="1" /> of the <bpt id="2" type="100" />tests<ept id="2" />.</mrk>
</seg-source>
</trans-unit>
</body>
</file>
</xliff>
In this XLIFF file, our translation API tries to apply the paired tag to two different sections of the sentence that are distinct. "property configuration" becomes "configration des propriétés", which demands two distinct bpt/ept tags, each pointing to the original one in source through 'xid' (and 'type').
This input is not accepted by Trados studio. We used the versions from 2022 and 2024. We read the logs for the 2024 version:
[ERROR] [ReadXliffData] source tag count != target tag count - src: 2 - tgt: 4 - replaceTgtWithSrc: True
And we observe that the source is in the target, with surrounding "##" tags.
We looked at the XLIFF 1.2 specification and we assumed that the above XLIFF file is correct, so there should be no error and the tag should be duplicated in the target when using Trados Studio.
What should we do when we would like to apply a paired tag to two split sections of a sentence?
Thanks in advance for your answer.
Alexis