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: 08:35
Member (2009)
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: 09:35
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: 08:35
Member (2009)
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: 09:35
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: 09:35
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: 09:35
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: 08:35
Member (2009)
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







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

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

More info »
Déjà Vu X3
Try it, Love it

Find out why Déjà Vu is today the most flexible, customizable and user-friendly tool on the market. See the brand new features in action: *Completely redesigned user interface *Live Preview *Inline spell checking *Inline

More info »



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