Under Community Review

Possibility to regex superscript characters

Please implement a way to regex superscript characters in Trados Studio. 

This is currently is not possible because superscript is automatically tagged in Studio and regex does not work for tagged characters.


Parents
  • Thanks Monika - can you explain your use case a bit more, just for my understanding? Thanks, Daniel

  • My client has a few international units which should not be translated. So I tried to tag these units using Regex in Trados to lock them for processing. Unfortunately, this doesn't work for units with superscript numbers, as these are automatically tagged in Trados. Regex works fine outside of Trados, but because of the "superscript tag", it doesn't work within Trados. Support wasn't able to find a workaround here either.

    The unit I tried to regex is "(min-1 / rpm)" and here is the regex I tried to use.

    Trados Studio dialog box showing the AddEdit Embedded Content Rule with a Regular Expression field containing '(min-1srpm)' and Translate option set to 'Not translatable'.

Comment
  • My client has a few international units which should not be translated. So I tried to tag these units using Regex in Trados to lock them for processing. Unfortunately, this doesn't work for units with superscript numbers, as these are automatically tagged in Trados. Regex works fine outside of Trados, but because of the "superscript tag", it doesn't work within Trados. Support wasn't able to find a workaround here either.

    The unit I tried to regex is "(min-1 / rpm)" and here is the regex I tried to use.

    Trados Studio dialog box showing the AddEdit Embedded Content Rule with a Regular Expression field containing '(min-1srpm)' and Translate option set to 'Not translatable'.

Children
  • Thanks Monika - tagging   to see if he would have any ideas. I was wondering if the "-1" can be tagged on its own but that might alter unwanted other text potentially, but then you should get opening tag + placeholder + closing tag. But it might be too aggressive. Thanks, Daniel 

  •  

    Have you tried replacing them with the hidden text attribute in Word?  That would cause the entire unit to become a tag, and hence not translatable?

  • Hello Paul, that would be quite a lot of work as the customer has about 200.000 modules in their system. I was already suggesting to the customer to implement a non translatable format but that would be a ton of work for all the modules this is why I hoped I could regex the units.

  •   

    I guess you could do this with a powershell script and regex, or even a Word macro, so that the units were all non-translatable before going into Trados Studio.  Creating the script would just be a little more work (one-off) than creating all the regex you'd need to support that anyway.

  • Hi Monika, 
    As far as I understand from your regex example, you suppose to process each type of unit individually. I mean not every single instance of min-1 / rpm, but all instances of min-1 / rpm, all instances of kg/m³, all instances of rpm, etc. Am I right? If yes, you can batch replace all type of a unit with the same hidden unit.
    To this effect, select a unit, press Ctrl+C, press Ctrl+H. 
    In 'Find what', press Ctrl+V to paste your unit.
    In 'Replace with', click Format > Font > Hidden and leave the field with no value at all (blank).
    Make sure the 'Replace with' field has a 'hidden' attribute.
    Click Replace all. This would make all the instances of that unit non-translatable.
    Proceed with other units using the same steps.
    Screenshot of Trados Studio Ideas showing the 'Find and Replace' dialog box with 'min-1  rpm' in the 'Find what' field. The 'Replace with' field is set to 'hidden' with instructions to ensure it reads 'hidden'. The 'Font' format option is highlighted with an arrow pointing to the 'hidden' checkbox, which is checked. A green checkmark indicates the correct setting, and a note says to keep all other fields unchanged.