Any way to get regular expressions to work in MT Enhanced Provider for SDL Trados Studio's find & replace XML files?

I want straight quotes to be automatically converted to curly ones in the Google Translate MT output,

So:

In this document, the term "room" is used for an enclosed space. > In this document, the term “room” is used for an enclosed space.

I tried adding the following in the XML file:

<EditItem Enabled="true" EditItemType="plain_text">
<FindText>"[\w\s]+"</FindText>
<ReplaceText>“[\w\s]+”</ReplaceText>
</EditItem>

But apparently regex is not supported.

Any other ideas on how to achieve this? 

GT4T has a handy little option that does this automatically, btw.



added URL for GT4T
[edited by: Michael Beijer at 1:01 PM (GMT 0) on 7 Dec 2022]
emoji
Parents Reply
  •  

    It's not possible now, and we won't be doing any more work on the MT Enhanced Provider.  But don't worry... we've just split it up into two providers, one plugin for Microsoft and one for Google.  We did this for a few reasons:

    1. we didn't write the original plugin and it's difficult to work on
    2. it's not obvious to users who just want Google or just want Microsoft
    3. the UI and UX needed improving, especially around Google with the AutoML

    We have retained the concept of the "XML file" for both plugins and I guess we could look at adding a regular expression capability to it... maybe not for the first release but we could look at it.  In my head using back references might be better since I imagine the use of regex in any scenario will be designed to manipulate something you derive from the source (the txt you want to change, not the source text) and we probably need to have some control to tell the engine it is a regex and not text, but I don't see any reason why we couldn't do that.

    We'll plan something in to look at it.

    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
Children