XLIFF: problem with attribute only existing in target element

Hi,

I need to translate XLIFF files that contain a "state" attribute only in <target> element:

<trans-unit id="AccountingExerciseCloseAccountingPeriodDto.survey.Page1.accountingExerciseId.title" xml:space="preserve">
<source xml:lang="en-US">Fiscal year</source>
<target xml:lang="fr-FR" state="signed-off">Exercice comptable</target>
<note>uid:AccountingExerciseCloseAccountingPeriodDto.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.title</note>
</trans-unit>

What I need to do is to translate the <source> element, edit the "state" attribute and write both in <target> element.

I managed to add the "state" attribute as a metadata to display it in my string list, and order the string lists by "state". I can even edit this metadata in the "More" tab for each string. But when I generate the target file, the initial <target> elements are overwritten and thus, this "state" attribute is removed. How can I force Passolo to add it to the target file?

Here are my settings in the rule configuration:

Trados Studio XML Data Element configuration window showing Element field with 'xlfifffilebodytrans-unitsource' and Meta Data field with 'following-sibling::#attribute::state'.

Trados Studio XML Rule Configuration window with Tree View tab selected, displaying language elements and data elements for source and target with 'state' attribute.

I am certainly missing something...

Thanks for your help!



Generated Image Alt-Text
[edited by: Trados AI at 5:56 AM (GMT 0) on 5 Mar 2024]
emoji
  • You are not missing anything. Passolo is supporting XLIFF with its internal generic XML parser that needs to be configured and that has its own limitations. There is no dedicated XLIFF parser in Passolo that supports all the bells and whistles of XLIFF. 

    Passolo is maintaining its own internal states for string entries. Even if you have been able to read the state attribute from the target element, this does not automatically change the status of the entries in the Passolo translation list. When the translated XLIFF target file is written, the attributes of the source element are automatically transferred to the target element and the existing state attributes disappear.

    The only possible solution is to implement a small macro customization that sets the internal string entry state according to the imported target element state and is inserting the current string entry state into the XLIFF target file after it was written.

    emoji
  • Hi Achim,

    Thank you for answering.

    The goal was not to replace Passolo statuses, only to re-write an attribute in target elements. As I understand, the problem is that it is not existing in the source element and thus cannot be used when generating target files.

    I'll give a try with macros, though I'm definitely not a VBA specialist... 

    Thank you again,

    Samy 

    emoji