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 Reply
  •  

    I used your file with the same settings I used before and get this:

    Screenshot of Trados Studio preview showing text with highlighted tags such as 'a' and 'em' indicating correct parser rule settings.

    Which looks fine to me.  So lets tackle the more basic questions just in case:

    1. did you do this in your Project Settings or in File Options?
    2. if you use the preview feature in the filetype view it will show you the same view as me if you have the same settings, perhaps check using that feature first

    And just to revisit this:

    thanks, that is exactly what (at least I thought) I did. But will check again.

    You definitely did not do the same thing based on your screenshot.  You had this:

    Screenshot of Trados Studio parser rule settings with empty fields for 'Tag name' and 'Conditions'.

    So you have not edited the "a" parser rule.  Please check there as well.  Also double check in here that you have added the attributes in question as you have not shown them in your screenshot:

    Screenshot of Trados Studio attribute settings showing 'href' and 'target' attributes set to 'False' for translation.

    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 7:46 AM (GMT 0) on 29 Feb 2024]
Children