Markups-Tags in XLIFF files seen as text not as tags

Hi,

I often received XLIFF files with texts that contains tags such as {1> SENTENCE.<1}, or {/b> SENTENCE.<\b} etc. These markups are not recognised as tags but as text. That means that I have to type manually {1> SENTENCE.<1}.

Is there a way to 'tell' Studio to treat those markups as tags to simplify the translation process.

Thank you for your response.

Manuella

emoji
Parents
  •  

    You can use the embedded content settings in the XLIFF Filetype.  You need to do this BEFORE you create your project and just create a single placeholder rule with an expression like this:

    {[^}]+}

    Trados Studio options menu with Embedded content selected, showing the AddEdit Embedded Content Rule dialog with a regular expression placeholder rule defined.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 12:41 PM (GMT 0) on 29 Feb 2024]
  • Hi Paul,

    Thanks for your response but I am not very familiar with Regex rules. Do I need to create the rule as you have indicated {[^]+} or to mention each of the tags for ex. {<1 in between the brackets[.. ]. AND do I need to do it before EACH project or is it enough to go to options>Files type>Xliff>Embedded content and to do it for once and for all?

    emoji
  •  

    Do I need to create the rule as you have indicated {[^]+} or to mention each of the tags for ex. {<1 in between the brackets[.. ].

    As I indicated.  If all of your codes follow the same pattern as you have shown here then the regex I gave you will catch them all.  However, as I was writing the explanation for you I realised I didn't do this correctly.  That regex would have captured the entire string:

    {1> SENTENCE.<1}

    I read it too quickly and didn't notice you probably meant this to be a representation of something like this:

    {1> This is some text that needs to be translated.<1}

    {1> Here's some more translatable text.<1}

    {/b> Here's some bold text.<\b}

    It definitely helps to provide a proper snippet of code when you want help so it's 100% clear what your needs are.  However, there is another reason why a snippet is very important.  Tags like these are going to be invalid in XLIFF unless they are written in CDATA or use compliant tags.

    So, before I try to explain how to do this properly (the regex is the easy bit) can you provide a small snippet of the actual file?  Should be easy to replace the translatable text for a few lines with something that won't break an NDA.  Is it something like this:

    <trans-unit id="1">
    <source><ph id="1">{1&gt;</ph> This is some text that needs to be translated.<ph id="2">&lt;1}</ph></source>
    <target><ph id="1">{1&gt;</ph> This is some text that needs to be translated.<ph id="2">&lt;1}</ph></target>
    </trans-unit>

    Or this:

    <trans-unit id="1">
    <source><![CDATA[{1> This is some text that needs to be translated. <1}]]></source>
    <target><![CDATA[{1> This is some text that needs to be translated. <1} ]]></target>
    </trans-unit>

    for example?  Or something else altogether?

    If you can share a complete file it's even better, but this much at least would help provide you a better answer.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
Reply
  •  

    Do I need to create the rule as you have indicated {[^]+} or to mention each of the tags for ex. {<1 in between the brackets[.. ].

    As I indicated.  If all of your codes follow the same pattern as you have shown here then the regex I gave you will catch them all.  However, as I was writing the explanation for you I realised I didn't do this correctly.  That regex would have captured the entire string:

    {1> SENTENCE.<1}

    I read it too quickly and didn't notice you probably meant this to be a representation of something like this:

    {1> This is some text that needs to be translated.<1}

    {1> Here's some more translatable text.<1}

    {/b> Here's some bold text.<\b}

    It definitely helps to provide a proper snippet of code when you want help so it's 100% clear what your needs are.  However, there is another reason why a snippet is very important.  Tags like these are going to be invalid in XLIFF unless they are written in CDATA or use compliant tags.

    So, before I try to explain how to do this properly (the regex is the easy bit) can you provide a small snippet of the actual file?  Should be easy to replace the translatable text for a few lines with something that won't break an NDA.  Is it something like this:

    <trans-unit id="1">
    <source><ph id="1">{1&gt;</ph> This is some text that needs to be translated.<ph id="2">&lt;1}</ph></source>
    <target><ph id="1">{1&gt;</ph> This is some text that needs to be translated.<ph id="2">&lt;1}</ph></target>
    </trans-unit>

    Or this:

    <trans-unit id="1">
    <source><![CDATA[{1> This is some text that needs to be translated. <1}]]></source>
    <target><![CDATA[{1> This is some text that needs to be translated. <1} ]]></target>
    </trans-unit>

    for example?  Or something else altogether?

    If you can share a complete file it's even better, but this much at least would help provide you a better answer.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
Children