How to ignore certain segments of a text while preparing file in Studio 2017
Thread poster: Roberto Nine

Roberto Nine
Argentina
Local time: 06:08
Member (2014)
English to Spanish
Apr 5, 2017

Hi all!

I have a .txt file to translate. When I add it to my project in Studio 2017, via the Prepare option, my doubt is how tell the Batch processor to ignore/lock certain lines. These lines are surrounded by the "##" string, i.e.:

##text not to translate1##
text to translate1
##text not to translate2##
text to translate2
##text not to translate3##
text to translate3

Once the sdlxliff is generated, the result should be:

Segm. 1: text to translate1
Segm. 2: text to translate2
Segm. 3: text to translate3

I tried creating a rule in the embedded content processor, but can't seem to get the regexp or settings right.

Thanks for your help!


Direct link Reply with quote
 

Nina Esser
Germany
Local time: 10:08
Member (2017)
English to German
Java resource Apr 6, 2017

I'm on Studio 2009 at the moment, but I think this should work for later versions as well: Tell Studio the file is a Java Resource file (normally .properties). There's an option in the files types section to specify that comments start with # and that comments need not be translated.

Direct link Reply with quote
 

CafeTran Training
Netherlands
Local time: 10:08
Quick and Dirty Apr 6, 2017

My Q&D approach would be to paste your text in Microsoft Word and hide all lines with "##" via Find and Replace.

Direct link Reply with quote
 

_stephan  Identity Verified
Germany
Local time: 10:08
English to German
Text File Type Apr 6, 2017

Technically Nina's right. The catch is that by default the Java Resources file type expects a delimiter between the property name and the translatable string, which is not the case in your example. I'm not sure you can modify the filter to work with your file.

What you can do, though, is modify the text file type (note: the file type, not the embedded content processor).

This is the default document structure:

Opening pattern = ^
Closing pattern = $


Change the opening pattern to:

^(?!#)

The filter should then skip the lines that begin with a hash.

Hope that helps.

Stephan


Direct link Reply with quote
 

Stepan Konev  Identity Verified
Russian Federation
Local time: 12:08
English to Russian
Try this Apr 6, 2017

Review tab -> Use this regex:
^##.+##$
Enter

Alternatively, when in MS Word, you can Find and Replace this:
Find what (Use wildcards): (\##)(*)(\##)
Replace with (font format - Hidden): \1\2\3



[Edited at 2017-04-06 12:00 GMT]


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 »

How to ignore certain segments of a text while preparing file in Studio 2017

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 »
CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use SDL Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

More info »



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