Using CAT for strings with numerical ID
Thread poster: Austra Muizniece

Austra Muizniece  Identity Verified
Latvia
Local time: 03:42
Member (2004)
English to Latvian
+ ...
Sep 26, 2006

I do regular translations for a client in packaging industry and most of the work is updating previous translations . Normally I work with rtf and xml files which are a piece of cake, but every once in a while I have to update a file with "us" extension. It is normally called xxxlng.us, can be opened in notepad and then edited in Word. This file contains a list of strings that look like this:

"M12345=text"
"M12346=text"
"M12347=text"

All the strings have a different ID at the beginning. Now, the problems start when I try to work on this file with CAT tools. In updated files the string IDs change, the text mostly stays the same, but segments come up as fuzzy matches, so I have to edit the ID. I end up having about 1000 strings in total, with only a few changes in the text, but because of the changes in ID numbers I have to spend a lot of time on this file.

Is there an easier way to do this? Is there a way to divide the strings in 2 parts (ID and text) and assemble them later? I have Trados 6 Freelance and Déjà Vu X 7.0.284.


[Rediģēts plkst. 2006-09-26 10:12]


Direct link Reply with quote
 

Hynek Palatin  Identity Verified
Czech Republic
Local time: 02:42
English to Czech
+ ...
Using CAT for strings with numerical ID Sep 26, 2006

First add the Trados styles to the document. Open it in Word, press Alt-F8 and run the sAddTagStyles macro.

Then apply the tw4winExternal style to the ID and to the double quotes:

1. Search for:
(M*=)

Replace with:
\1
and the tw4winExternal style

Check "Use Wildcards" and Replace All.

2. Search for:
"

Replace with:
"
and the tw4winExternal style

Uncheck "Use Wildcards" and Replace All.

From now on, Trados will skip the IDs.


Direct link Reply with quote
 

Vito Smolej
Germany
Local time: 02:42
Member (2004)
English to Slovenian
+ ...
I see two ways Sep 26, 2006

One simple way:

1: add "=" to the list of characters that segment the text (in TWB files/setup/segmentation rules)

2. Change Mnnnn to M nnnnn (1 - nnnn is now simple insertable)

The results should be that Mnnnnn= turns into two segments - "M nnnn" that will pretranslate and "your text" which is what you want

3. once finished, you need do drop the blanks from "M nnnn"

The other way: if you format the strings M^#^#^#^#= in your file (using global search and replace) as tw4winExternal, Trados will skip it. TortoiseTagger.dot (downloadable, just google for it) can help you do that.
[EDIT] Hynek said the same.

well, there's the third way - send me the file;)

regards

Vito

[Edited at 2006-09-26 10:54]

[Edited at 2006-09-26 10:55]


Direct link Reply with quote
 

Austra Muizniece  Identity Verified
Latvia
Local time: 03:42
Member (2004)
English to Latvian
+ ...
TOPIC STARTER
Thank you, Vito and Hynek Sep 26, 2006

I'll try this out and see how it works.


Vito Smolej wrote:

well, there's the third way - send me the file;)



You probably wouldn't enjoy receiving a file like that every 2-3 weeks:), but thanks for the offer anyway.


Direct link Reply with quote
 

Samuel Murray  Identity Verified
Netherlands
Local time: 02:42
Member (2006)
English to Afrikaans
+ ...
Tips for Wordfast and OmegaT Sep 26, 2006

Austra Muizniece wrote:
This file contains a list of strings that look like this:

"M12345=text"
"M12346=text"
"M12347=text"


In Wordfast, use MS Word's find/replace with regex to mark everything before the equal sign as tw4winExternal. In OmegaT, add a segmentation rule that breaks the text at the equal sign, or replace all equal signs in your favourite text editor with =. (equal, fullstop, space) and translate using normal rules. Afterwards, remove the fullstops.

Is there an easier way to do this? Is there a way to divide the strings in 2 parts (ID and text) and assemble them later?


You can use a spreadsheet. Replace all equal signs with tabs, and open the file in the spreadsheet. Copy the B column to a new document and translate it. Copy it back, and then copy both columns to a new document, and replace tabs with equal signs.


Direct link Reply with quote
 

Didier Briel  Identity Verified
France
Local time: 02:42
Member (2007)
English to French
+ ...
Standard format in OmegaT Sep 27, 2006

Hello Samuel,

Austra Muizniece wrote:
This file contains a list of strings that look like this:

"M12345=text"
"M12346=text"
"M12347=text"


Samuel Murray wrote:
In OmegaT, add a segmentation rule that breaks the text at the equal sign, or replace all equal signs in your favourite text editor with =. (equal, fullstop, space) and translate using normal rules. Afterwards, remove the fullstops.


There is a simpler way in OmegaT:
OmegaT has a specific format for this. All you have to do is rename your file to ".ini" (e.g., xxxlng.us.ini), or add the ".us" extension to the "Key=Value text files" filter.

And voilà.

Didier Briel


Direct link Reply with quote
 

Vito Smolej
Germany
Local time: 02:42
Member (2004)
English to Slovenian
+ ...
WHO SAID I WOULD NOT ENJOY IT?!... Oct 3, 2006

We were not amused;)

Vito

PS: I would OF COURSE write myself a little piece of code... which I would send you on the second or third mail. So that we could have time to discuss ... hmmm ... Knut Hamsun ... or salmon fishing in Norway...


[Edited at 2006-10-03 22:44]


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 »

Using CAT for strings with numerical ID

Advanced search







Across v6.3
Translation Toolkit and Sales Potential under One Roof

Apart from features that enable you to translate more efficiently, the new Across Translator Edition v6.3 comprises your crossMarket membership. The new online network for Across users assists you in exploring new sales potential and generating revenue.

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