Handling HTML in Trados Studio 2011
Thread poster: xALEXx

xALEXx
Local time: 07:27
Polish to German
Jul 19, 2012

Hi,

I am about to translate a website and I got from the client .txt documents which look like the part below:

customer.registration.label.acceptTermsAndConditions=Zapoznałem się z treścią regulaminu sklepu i akceptuję jego treść.

Is it possible to hide the text left from the equals sign which is part of the code, so I see in trados only the part I have to translate?

Thx


 

Soonthon LUPKITARO(Ph.D.)  Identity Verified
Thailand
Local time: 12:27
Member (2004)
English to Thai
+ ...
Simplest way Jul 19, 2012

If the format is identical to all lines, add codes in one table column of MS Word, select as hidden fonts. And translate only the texts in the second column [save as MS Word].
If you have many HTML files, use MS Word Macro to repeat the steps.

Soonthon Lupkitaro


 

SDL Community  Identity Verified
United Kingdom
Local time: 07:27
English
The easiest way... Jul 20, 2012

xALEXx wrote:

Hi,

I am about to translate a website and I got from the client .txt documents which look like the part below:

customer.registration.label.acceptTermsAndConditions=Zapoznałem się z treścią regulaminu sklepu i akceptuję jego treść.

Is it possible to hide the text left from the equals sign which is part of the code, so I see in trados only the part I have to translate?

Thx



... if you have been given *.txt files like this is to create a filetype in Studio that extracts the text you wish to translate. If you put them into Word, select all the non-translatable text and make them a non-translatable style, and then you have to copy and paste all your files into a word document first and then copy and paste them out again afterwards. Might be ok for one or two files, but not if you have a lot.

So the easiest way is to create a filetype for the files you have been given. There is a video here that explains the basics of how to create a regex filetype: http://goo.gl/c6mMS

The difference for you would be that the filename remains as *.txt and not *.lng as shown in the video. And the rules are different, so leave the Document Structure as the default and instead add two rules as Inline Tags.

</?[a-z][a-z0-9]*[^<>]*>
^[\w\.]*=

The first one will handle the html references in most cases, and the second one will take the code leading up to the first equals sign and move it outside the segment as it's at the start of the line. So as long as this example you provided is indicative of all of your code then this should work. It looks like this in Studio:


Regards

Paul


 

xALEXx
Local time: 07:27
Polish to German
TOPIC STARTER
clarification Jul 20, 2012

Hi Paul,
Thanks for your explanation. Regarding the second rule you mentioned (^[\w\.]*=), which way do I need to enter it in the below dialog box?




SDL Support wrote:

xALEXx wrote:

Hi,

I am about to translate a website and I got from the client .txt documents which look like the part below:

customer.registration.label.acceptTermsAndConditions=Zapoznałem się z treścią regulaminu sklepu i akceptuję jego treść.

Is it possible to hide the text left from the equals sign which is part of the code, so I see in trados only the part I have to translate?

Thx



... if you have been given *.txt files like this is to create a filetype in Studio that extracts the text you wish to translate. If you put them into Word, select all the non-translatable text and make them a non-translatable style, and then you have to copy and paste all your files into a word document first and then copy and paste them out again afterwards. Might be ok for one or two files, but not if you have a lot.

So the easiest way is to create a filetype for the files you have been given. There is a video here that explains the basics of how to create a regex filetype: http://goo.gl/c6mMS

The difference for you would be that the filename remains as *.txt and not *.lng as shown in the video. And the rules are different, so leave the Document Structure as the default and instead add two rules as Inline Tags.


^[\w\.]*=

The first one will handle the html references in most cases, and the second one will take the code leading up to the first equals sign and move it outside the segment as it's at the start of the line. So as long as this example you provided is indicative of all of your code then this should work. It looks like this in Studio:


Regards

Paul




[Edited at 2012-07-20 13:35 GMT]

[Edited at 2012-07-20 14:45 GMT]


 

SDL Community  Identity Verified
United Kingdom
Local time: 07:27
English
Adding the inline tag rules Jul 20, 2012

xALEXx wrote:

Hi Paul,
Thanks for your explanation. Regarding the second rule you mentioned (^[\w\.]*=), which way do I need to enter it in the below dialog box?



Hi,

The tags in this case I made placeables rather than tag pairs, so enter the expressions in here:


You could use a tag pair for the html, but often it's a lot easier just to use the generic placeholder as this catches most things.

Regards

Paul


 

xALEXx
Local time: 07:27
Polish to German
TOPIC STARTER
It works :) Jul 23, 2012

Thanks a lot, your solution works great! :]

 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Handling HTML in Trados Studio 2011

Advanced search







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 »
BaccS – Business Accounting Software
Modern desktop project management for freelance translators

BaccS makes it easy for translators to manage their projects, schedule tasks, create invoices, and view highly customizable reports. User-friendly, ProZ.com integration, community-driven development – a few reasons BaccS is trusted by translators!

More info »



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