How to make attributes of a HTML tag translatable? (Trados 2022)

Hello,

I have a HTML file which is recognized as XHTML 1.1 V 1.2. These files contain <a>-Tags which look like this:

<a contenteditable="false" data-primary="design" data-secondary="stress testing ideas for desirability" data-tertiary="building better products" data-type="indexterm" id="Dstressbetter02">&nbsp;</a>

Now I want to access the attributes and translate them in Trados (they are indexterms of a book).

I tried to change the parser of file type HTML 5, tag <a>, accordingly but to no avail. (I believe this is the right one, called from XHTML 1.1?)

I hope that I could tell Trados to make individual attributes of the tag accessible and translatable by

- changing the correct properties of the a tag here

- adding the atttributes to the list and make them translatable.

But it just doesn't work. What am I doing wrong? :-)

Trados Studio Edit Rule dialog box showing properties for inline tag with attributes 'href' and 'target' set to not translate.

Many thanks for any tipps or help!!



Generated Image Alt-Text
[edited by: Trados AI at 7:46 AM (GMT 0) on 29 Feb 2024]
emoji
Parents
  •   

    I can only assume the following:

    1. you are not editing the right rule
    2. you have not added the attributes you have to translate

    I tested with this:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "www.w3.org/.../xhtml11.dtd">
    <html xmlns="www.w3.org/.../xhtml">
    <head>
      <title>Jens Test</title>
    </head>
    <body>
    
    <a contenteditable="false" data-primary="design" data-secondary="stress testing ideas for desirability" data-tertiary="building better products" data-type="indexterm" id="Dstressbetter02"> </a>
    
    </body>
    </html>

    And get this:

    Trados Studio preview showing HTML content with titles 'Jens Test', 'stress testing ideas for desirability', and 'building better products'.

    I just edited the "a" parser rule and added "data-secondary" and "data-tertiary" as new translatable attributes.

    Trados Studio parser options with 'a' tag selected, showing it is translatable but not protected content.

    Trados Studio edit rule window for 'a' tag, with 'data-secondary' and 'data-tertiary' attributes set to translatable.

    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



    Generated Image Alt-Text
    [edited by: Trados AI at 7:46 AM (GMT 0) on 29 Feb 2024]
Reply
  •   

    I can only assume the following:

    1. you are not editing the right rule
    2. you have not added the attributes you have to translate

    I tested with this:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "www.w3.org/.../xhtml11.dtd">
    <html xmlns="www.w3.org/.../xhtml">
    <head>
      <title>Jens Test</title>
    </head>
    <body>
    
    <a contenteditable="false" data-primary="design" data-secondary="stress testing ideas for desirability" data-tertiary="building better products" data-type="indexterm" id="Dstressbetter02"> </a>
    
    </body>
    </html>

    And get this:

    Trados Studio preview showing HTML content with titles 'Jens Test', 'stress testing ideas for desirability', and 'building better products'.

    I just edited the "a" parser rule and added "data-secondary" and "data-tertiary" as new translatable attributes.

    Trados Studio parser options with 'a' tag selected, showing it is translatable but not protected content.

    Trados Studio edit rule window for 'a' tag, with 'data-secondary' and 'data-tertiary' attributes set to translatable.

    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



    Generated Image Alt-Text
    [edited by: Trados AI at 7:46 AM (GMT 0) on 29 Feb 2024]
Children