Regex, variables in XML and Excel files
Thread poster: Hakan Kiyici

Hakan Kiyici  Identity Verified
Turkey
Local time: 11:41
Member (2009)
English to Turkish
+ ...
May 16

Hi,

I was wondering if anyone can help or give direction for this. I use Trados 2015.

I have a client who is likely to have more of this kind of content with variables and placeholders. I have checked the available options of Regex and using variables. But I couldn't make them work.

The file comes in XML and Any XML picks it up. But I would need the solution for Excel file as well (I could not make the Excel option work either. Saw https://multifarious.filkin.com/2013/08/21/embedded_content_excel/ )

I tried to modify Embedded Content Processing etc. Maybe I am looking at this from wrong perspective.

Below is an excerpt.

Any help would be greatly appreciated. It would be great time saver as I am copying the source to the target and moving the variable around by copy-paste.

Thank you


If you understand this and would still like to proceed with %1% choice, click the "{:sidSGAllowExecutionButton:}" button below.[n:15]If the object(s) were previously removed by {:sidMainCaption:}

Please click the "%2%" button to have {:sidMainCaption:} close all %1% windows.[n]To skip scanning %1% cookies, click the "{:sidSkip:}" button.


Direct link Reply with quote
 

Jaime Oriard  Identity Verified
Mexico
Local time: 03:41
Member (2005)
English to Spanish
+ ...
You're in the right track May 16

You just have to write the regex you need. Try with this simple one:

To catch %...% try %[^\s]+%
To catch {...} try \{[^\s]+\}
To catch [...] try \[[^\s]+\]

Or you could just put them together, like so:
%[^\s]+%|\{[^\s]+\}|\[[^\s]+\]

Be careful though. These are so basic that they may catch strings that need to be translated.

I normally use this site to test my regex: https://regexr.com/

Good luck!


Direct link Reply with quote
 

Hakan Kiyici  Identity Verified
Turkey
Local time: 11:41
Member (2009)
English to Turkish
+ ...
TOPIC STARTER
will look into this May 16

Hi Jaime,

Thank you for the invaluable information. I will try these.

I believe these should go to Embedded Content Processing section. I tried both XML and Excel version. I will try these if they catch those variables.

Kind regards

Hakan Kiyici

Jaime Oriard wrote:

You just have to write the regex you need. Try with this simple one:

To catch %...% try %[^\s]+%
To catch {...} try \{[^\s]+\}
To catch
try \[[^\s]+\]

Or you could just put them together, like so:
%[^\s]+%|\{[^\s]+\}|\[[^\s]+\]

Be careful though. These are so basic that they may catch strings that need to be translated.

I normally use this site to test my regex: https://regexr.com/

Good luck! [/quote]


Direct link Reply with quote
 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Regex, variables in XML and Excel files

Advanced search







Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »
SDL MultiTerm 2017
Guarantee a unified, consistent and high-quality translation with terminology software by the industry leaders.

SDL MultiTerm 2017 allows translators to create one central location to store and manage multilingual terminology, and with SDL MultiTerm Extract 2017 you can automatically create term lists from your existing documentation to save time.

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search