How to prepare a .txt file for translation with Studio 2009
Thread poster: Denise Thurley-Newton

Denise Thurley-Newton  Identity Verified
United Kingdom
Local time: 21:42
English to Portuguese
Mar 7, 2013

I received a file from a client that has translatable and untranslatable text. I need to be able to lock the untranslatable part. Here is the excerpt:

{# Contact us #}
{% translate CVSMCCVS_2 %}Contact us{% endtranslate CVSMCCVS_2 %}

{# Terms & Conditions #}
{% translate CVSMCCVS_3 %}Terms & Conditions{% endtranslate CVSMCCVS_3 %}

{# Privacy policy #}
{% translate CVSMCCVS_4 %}Privacy policy{% endtranslate CVSMCCVS_4 %}

{# Advertise with us #}
{% translate CVSMCCVS_5 %}Advertise with us{% endtranslate CVSMCCVS_5 %}

{# Advertise with us #}
{% translate CVSMCCVS_6 %}Advertise with us{% endtranslate CVSMCCVS_6 %}


Can I use some kind of filter to block the untranslatable part of the sentence? I only need to translate the bits in the middle... Please help!!! This is .txt. file extension.

Thank you in advance for your help!!!


 

Bernard Lieber  Identity Verified
Local time: 22:43
English to French
+ ...
Project Settings Mar 7, 2013

Project Settings -> File Types -> Text, expand -> Structure patterns should do the trick.

HTH,

Bernard


 

Denise Thurley-Newton  Identity Verified
United Kingdom
Local time: 21:43
English to Portuguese
TOPIC STARTER
Project settings Mar 7, 2013

Thank you for your reply. I tried to work on there but I am not familiar with opening and closing pattern. Do you know what I need to write in there? Thank you.

 

Bernard Lieber  Identity Verified
Local time: 22:43
English to French
+ ...
Opening/Closing Mar 7, 2013

For instance, enter {% translate CVSMCCVS_2 %} as opening and {% endtranslate CVSMCCVS_2 %} as closing and so on.

 

SDL Community  Identity Verified
United Kingdom
Local time: 22:43
English
If the rest of the file... Mar 7, 2013

... looks like your example then you may be able to use these:

Opening Pattern
^{%.*?%}

Closing Pattern
\b{%.*?%}$

So either create a new filetype and use the Regular Expression Delimited text filetype when you sect the one you want, or just edit the existing txt filetype. So add the patterns in here:


Then when you open the file you should see this:


But this will only work if the format of the rest of the file matches the example you have shown here because the pattern is just looking for {% then anything followed by %}, then your text, and then {% then anything followed by %} at the end.

So if you get funny results you'll have to think about changing the pattern to suit.

Hope this helps. If you're not sure drop me an email and I'll send you the filetype I just created to do this with your example.

Paul
pfilkin@sdl.com


[Edited at 2013-03-07 21:44 GMT]


 

SDL Community  Identity Verified
United Kingdom
Local time: 22:43
English
Project Settings vs Tools Options Mar 8, 2013

Denise Thurley-Newton wrote:

Thank you for your reply. I tried to work on there but I am not familiar with opening and closing pattern. Do you know what I need to write in there? Thank you.


Just a note on this. Changing the filetype and adding patterns in the Project Settings won't do anything unless you add all the files again into the existing Project whose settings you changed.

The approach may be better if you make the changes under Tools -> Options and then create your Project.

Regards

Paul


 

Denise Thurley-Newton  Identity Verified
United Kingdom
Local time: 21:43
English to Portuguese
TOPIC STARTER
Thank you... Mar 8, 2013

Thank you Paul. Yes, I realised that I had to create a new project. Everything worked really well. I am really pleased with the result. Thank you again.

 


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 prepare a .txt file for translation with Studio 2009

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 »
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 »



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