Regex to turn "tags" into actual Studio tags
Thread poster: Jos Vlemmix

Jos Vlemmix  Identity Verified
Local time: 12:26
English to Dutch
+ ...
Apr 19, 2016

Hi,


I'm running into some issues with files that contain the following tags in plain text. I'd like Studio to pick these up and convert them to a Studio tag so I can make sure I'm not missing anything.

After some research I came to the conclusion that a regular expression filter is my best bet.

The tags sequences in question:
Code:

<ul>
</li>\r\n<li>
</li>\r\n</ul>\r\n




There's text scattered throughout these that need translation so just hiding, so ideally they'd get tagged and it breaks to the next segment. Is that possible? I just can't seem to wrap my head around regex

[Edited at 2016-04-19 16:05 GMT]

[Edited at 2016-04-19 16:10 GMT]


Direct link Reply with quote
 

Emma Goldsmith  Identity Verified
Spain
Local time: 13:26
Member (2010)
Spanish to English
Inline tags Apr 19, 2016

I think you should be able to use this:
\<.+?\>
to convert your text into placeholder inline tags in a .txt file type.

For more info, check out this thread (although it applies to excel files):
http://www.proz.com/forum/sdl_trados_support/288571-studio_2011_how_to_display_{0}_as_tag.html


Direct link Reply with quote
 
Alaina Brantner
United States
Local time: 06:26
Spanish to English
Is there a solution for this in Trados 2015? Apr 19, 2016

Hello all,

I am running into a similar problem as originally posted in this thread. I'm running an HTML file for translation, and some of the coding has not been picked up as such. I therefore need to convert that text to tags. I also believe that regular expressions are the solution, and I've tried including a regular expression that should cover these strings in the variable list. However upon analysis of the files, the tags remain.

Is there perhaps an app or plugin for Trados 2015 that I could use to carry out this tagging? Am I perhaps using the "variables" function incorrectly?

Any help is greatly appreciated!

Best,
Alaina


Direct link Reply with quote
 

Jos Vlemmix  Identity Verified
Local time: 12:26
English to Dutch
+ ...
TOPIC STARTER
Partial success Apr 20, 2016

Emma Goldsmith wrote:

I think you should be able to use this:
\
to convert your text into placeholder inline tags in a .txt file type.

For more info, check out this thread (although it applies to excel files):
http://www.proz.com/forum/sdl_trados_support/288571-studio_2011_how_to_display_{0}_as_tag.html



Thanks Emma! Unfortunately Studio threw an error saying I needed to check my internal tags, so that didn't quite work for me there. Probably because not all the things I was looking to tag were in angle brackets?

However, your post did inspire me and what I ended up doing was creating a separate placeholder for each angle bracket tag. PLUS the following for any bit of code starting with a backslash: \\.+?

This ended up catching all the extraneous text so it's looking MUCH better now

[Edited at 2016-04-20 07:47 GMT]


Direct link Reply with quote
 
Michael Bailey  Identity Verified
Austria
Local time: 13:26
German to English
+ ...
The same with square brackets... Apr 21, 2016

I am being sent text files for Translation, that are destined for a WordPress Website

The most substantial Problem is that there are square bracketted items e.g.

[foldout title="Weiterführende Links" level="3"]

And I need to be able to translate just Weiterführende Links

Then there is a section of text and then a

[/foldout] item

Any advice gratefully appreciated.


Direct link Reply with quote
 
Rafa Gómez  Identity Verified
Spain
Local time: 13:26
Member (2009)
English to Spanish
Try this Apr 21, 2016

Add these inline tags to the Text file type:



Quick and dirty, though it should work with your example.


Direct link Reply with quote
 
Michael Bailey  Identity Verified
Austria
Local time: 13:26
German to English
+ ...
Great! May 13, 2016

Thanks Rafa - it does the job!

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 to turn "tags" into actual Studio tags

Advanced search







memoQ translator pro
Kilgray's memoQ is the world's fastest developing integrated localization & translation environment rendering you more productive and efficient.

With our advanced file filters, unlimited language and advanced file support, memoQ translator pro has been designed for translators and reviewers who work on their own, with other translators or in team-based translation projects.

More info »
PerfectIt consistency checker
Faster Checking, Greater Accuracy

PerfectIt helps deliver error-free documents. It improves consistency, ensures quality and helps to enforce style guides. It’s a powerful tool for pro users, and comes with the assurance of a 30-day money back guarantee.

More info »



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