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'.

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

  • Ah, one more thing... Unless you have a specific reason, I would not include parentheses in Find what. This would only convert the content between them, and you would clearly see in Trados a placeholder in parentheses. I think it would add more "context" for you to quickly understand what that placeholder stands for (for a unit).

  • Hello Stepan, thank you for your reply.
    I am aware that I can hide the units in a word document before I import the file. But there are quite a lot of units, which would be a tremendous amount of work beforehand everytime. The customer is not really consistent in the way they write the units so I have to search for every possible way. Sometimes it is written with brackets, sometimes without, sometimes with white spaces, sometimes without. Sometimes with square brackets, sometimes with round brackets.
    This is why I was hoping there was a way to regex them all in Trados so that I do not have to hide everything everytime in every document.

Comment
  • Hello Stepan, thank you for your reply.
    I am aware that I can hide the units in a word document before I import the file. But there are quite a lot of units, which would be a tremendous amount of work beforehand everytime. The customer is not really consistent in the way they write the units so I have to search for every possible way. Sometimes it is written with brackets, sometimes without, sometimes with white spaces, sometimes without. Sometimes with square brackets, sometimes with round brackets.
    This is why I was hoping there was a way to regex them all in Trados so that I do not have to hide everything everytime in every document.

Children
No Data