Find and then Replace with formatting

Hi

In Trados Studio editor, I need to find a text or some instances (say matching my regex in 'Find what': ([\p{IsCyrillic}])

and replace them with the same instance (or using $1 regex) in the 'Replace with' field, but make the instance bold.


Please advise my Replace with regex for this case.

Trados Studio Find and Replace dialog box with regex '(pIsCyrillic)' in 'Find what' field and '$1' in 'Replace with' field, showing an error icon next to it.

In general, are the options to apply text formatting in the 'Replace with'?  using tags? or ...

It would be a real miracle to have a simple approach just like in MS Word
Trados Studio Find and Replace dialog box in Russian, with empty 'Find what' field and 'Replace with' field set to bold format.



Generated Image Alt-Text
[edited by: Trados AI at 12:04 PM (GMT 0) on 29 Feb 2024]
emoji
  • Hello,

    In Trados Studio, you can indeed use regular expressions (regex) to find and replace text, but applying formatting like bold to the replaced text is not directly supported. However, there's a workaround you can use:

    Step 1: Use the 'Find what' field to enter your regex. In your case, it would be ([\p{IsCyrillic}]).

    Step 2: In the 'Replace with' field, replace the instance with a unique string that does not occur elsewhere in your text. For example, you could use something like ##$1##.

    Step 3: After replacing all instances, you can then manually search for the unique string (##$1## in this example) and apply the bold formatting.

    Please note that this is a workaround and might not be as efficient as the find and replace function in MS Word. Trados Studio's primary focus is on translation memory and terminology management, and while it does offer some text editing features, they might not be as extensive as those in dedicated word processing software.

    I hope this helps! If you have any other questions, feel free to ask.

    Best regards,

    RWS Community AI

    emoji
  •  

    This is not Word... it's a tool to handle the translation of DOCX, XLSX, PPTX, XML, HTML, IDML, MIF, RESX, etc. etc.

    But I agree that a neat solution would be to do a search & Replace of tags since this is essentially what we are dealing with.  What they do is completely irrelevant and sometimes inappropriate when people think of them as formatting tags.  I suggest you raise an enhancement request for it in the ideas site.

    In the meantime you could try using a tool like Cleanup Tags which could be used to do a batch search & replace of words with surrounding tags, and you could make the tags match the formatting style of the file you were translating.

    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
  • try using a tool like Cleanup Tags

    Thank you, I will give it a try.

    In the meantime, let me explain what I was trying to achieve. Sometimes I need to clearly indicate that my abbreviations or tags contain Cyrillic letters instead of Latin letters. To achieve this, I intentionally keep the Cyrillic letters in my target English text and make them italicized so that the reader can easily distinguish between АВС (авс) and ABC (abc), even though they look exactly the same.

    emoji