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

rober9  Identity Verified
Argentina
Local time: 22:00
Member (2014)
English to Spanish
Apr 5

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: 03:00
Member (Jul 2017)
English to German
Java resource Apr 6

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: 03:00
Member (2016)
Quick and Dirty Apr 6

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: 03:00
English to German
Text File Type Apr 6

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: 04:00
English to Russian
Try this Apr 6

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







Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

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