Using CAT for strings with numerical ID Thread poster: Austra Muizniece
|
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 d... See more 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] ▲ Collapse | | | Hynek Palatin Czech Republic Local time: 14:35 Member (2003) 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" a... See more 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. ▲ Collapse | | | Vito Smolej Germany Local time: 14:35 Member (2004) English to Slovenian + ... SITE LOCALIZER 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 fil... See more 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] ▲ Collapse | |
|
|
Austra Muizniece Latvia Local time: 15:35 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. | | | Samuel Murray Netherlands Local time: 14:35 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. | | | Didier Briel France Local time: 14:35 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 | | | Vito Smolej Germany Local time: 14:35 Member (2004) English to Slovenian + ... SITE LOCALIZER 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] | | | 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 Trados Studio 2022 Freelance | The leading translation software used by over 270,000 translators.
Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop
and cloud solution, empowering you to work in the most efficient and cost-effective way.
More info » |
| 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
Buy now! » |
|
| | | | X Sign in to your ProZ.com account... | | | | | |