Hi there
When we look inside an INI file, there are some sections between square brackets with different settings. The relevant one for what we are trying to do is [Tags]. After modifying this INI via Trados, duplicating the "data" element with a conditional, we get the following:
Code:
[Tags]
Tag1=data:External,Other Attributes:att
Tag2=data[@att="015"]:External,Group,Other Attributes:att
Tag3=control:External,Group,Other Attributes:att
DefaultTagStyle=External
Tag4=--end--
Each line begins with "TagX" with X consecutive numbers. The last one is always "TagN=--end--", where N is the highest number. Experimenting a bit with the Tag Editor it looks as if the tags and conditional attributes are saved with no rhyme nor reason. And the "DefaultTagStyle" line is somewhere in the middle of them, also nowhere in particular. Maybe there is some kind of optimisation going on, but I couldn't figure out any pattern.
Anyway, notice that the tags are marked as "External" (that is, they delimit segments), and the non-translatable ones say "Group" after "External". And the syntax for a tag with a conditional is
Code:
tagname[@attribute="attributevalue"]
So the only thing left to achieve a nice INI file is to get the list of attributes as in my previous post and create the corresponding lines:
TagX=data[@att="YYY"]:External,Group,Other Attributes:att
... with the X going up one by one, and the YYY going through the attributes we want to mark as non-translatable. Next time I'll post a script that does this.
Cheers.
P.