Ignoring text in square brackets Thread poster: IanW (X)
| IanW (X) Local time: 13:01 German to English + ...
Greetings all, I am working on a text which is to be reimported into an online program, which means that every paragraph is preceded by a series of numbers and letters in square brackets, e.g. [29113 t7]. This is not only irritating, but also dangerous, since most numbers are treated as close matches of existing numbers, and there is a risk of changing the numbers unwittingly. My question is this: is it possible to change the Trados settings so that these numbers in squ... See more Greetings all, I am working on a text which is to be reimported into an online program, which means that every paragraph is preceded by a series of numbers and letters in square brackets, e.g. [29113 t7]. This is not only irritating, but also dangerous, since most numbers are treated as close matches of existing numbers, and there is a risk of changing the numbers unwittingly. My question is this: is it possible to change the Trados settings so that these numbers in square brackets are ignored - or at least treated as non-matches. Any suggestions very much appreciated Thanks Ian ▲ Collapse | | | File/Setup/Substitutions | Apr 28, 2004 |
Hi Ian, Try in the "Substitution" tab in the menu File/Setup, or in the "Non-translatable text" tab of the very same menu. I don't know exactly how it works, but it should do the trick. If not, you can simply copy the source segment each time these brackets occur, with Alt + Inser. So they will not appear as fuzzy matches. HTH, Sylvain
[Edited at 2004-04-28 07:58] | | | IanW (X) Local time: 13:01 German to English + ... TOPIC STARTER Thanks, but ... | Apr 28, 2004 |
Hi Sylvain, Thanks for your tips. As it happens, I am using the "Alt + Insert" method at the moment, but was looking for a solution which would ignore the stuff in square brackets completely. I've had a look at the Substitution settings, but can't figure out if and how this is possible. Can anyone else help? Ian | | | Okay, here's how you do it | Apr 28, 2004 |
Hi Ian, you can use the tw4WinExternal style to mark the bracketed text as "untouchable" for Trados. To do this, follow these ten steps: 1. Open the document (obviously) and make sure the Trados macros are activated. 2. Press Alt+F8 to bring up the Macros dialog and select "sAddTagStyles" from the list. 3. Run that macro. 4. Press Ctrl+H to display the Find&Replace dialog. 5. In the "Find what" field, enter \[*\] (that's Backslash-Opening Bracket-Aste... See more Hi Ian, you can use the tw4WinExternal style to mark the bracketed text as "untouchable" for Trados. To do this, follow these ten steps: 1. Open the document (obviously) and make sure the Trados macros are activated. 2. Press Alt+F8 to bring up the Macros dialog and select "sAddTagStyles" from the list. 3. Run that macro. 4. Press Ctrl+H to display the Find&Replace dialog. 5. In the "Find what" field, enter \[*\] (that's Backslash-Opening Bracket-Asterisk-Backslash-Closing Bracket, in case the special code sequences get eaten up by the ProZ.com forum system again.) 6. Click on the "Replace with" field and enter ^& (Circumflex-Ampersand). Alternatively, you can select, ah, heck, dunno how it's called in English Word versions ("Contents of the Find what box"?), but you're prolly using a German one anyway - it's labeled "Suchen nach Text" or "Suchtext" - from the "Special" menu in that dialog. 7. Check the "Pattern Matching"/"Wildcards" (Platzhalterzeichen verwenden) option. 8. Click on "Format"->"Style..." (Formatvorlage...) 9. Select "tw4WinExternal" from the list and click "OK". 10. If you now click "Replace all", every occurence of brackets with text in between will be in gray color and Trados should skip them. Be careful though, if you have square brackets in the text flow itself that you do need to edit/translate, you will not be able to access these anymore using Trados. Let me know if it works for you - I hope it does! Benjamin
[Edited at 2004-04-28 08:56] ▲ Collapse | |
|
|
IanW (X) Local time: 13:01 German to English + ... TOPIC STARTER Hats off to Ben | Apr 28, 2004 |
Hi Benjamin, Excellent - it worked! Hopefully there won't be any problem importing it back into the online program. Do you think it's possible to write a macro to cover this process? I work in this format very often so I would be willing to pay hard cash (or used stamps) to anyone who can come up with a suitable macro. Many thanks once again Ian | | |
Ian Winick wrote: Hi Benjamin, Excellent - it worked! Great Hopefully there won't be any problem importing it back into the online program. If the program uses plain text format, there shouldn't be. Do you think it's possible to write a macro to cover this process? I work in this format very often so I would be willing to pay hard cash (or used stamps) to anyone who can come up with a suitable macro. See below. Sent you the macro via e-mail, too (will prolly yield an alert of your virus scanner, so I put it in an encrypted zip file) Many thanks once again You're welcome! Here it is: Code:
| Sub tectranslateProtectBrackets()
'
' tectranslateProtectBrackets Makro
' Makes text in square brackets uneditable by assigning tw4WinExternal style.
'
Selection.HomeKey Unit:=wdStory
Application.Run MacroName:="sAddTagStyles"
Stop
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Replacement.Style = ActiveDocument.Styles("tw4WinExternal")
.Text = " "
.Replacement.Text = "^&"
.Forward = True
.Format = True
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub |
|
[Edited at 2004-04-28 14:01] | | | Hynek Palatin Czech Republic Local time: 13:01 Member (2003) English to Czech + ...
You can record the macro by yourself. Just start recording (more details in MS Word help), repeat the process with a new (unchanged) file and stop recording. | | | Tw4WinInternal | Apr 28, 2004 |
Hello, Maybe it will works better for your translation, if you use tw4WinInternal. What kind of files (file type / Extension) you have ? Hans | |
|
|
IanW (X) Local time: 13:01 German to English + ... TOPIC STARTER
Thanks guys, Very much appreciated. Benjamin, the macro works perfectly. All the best Ian | | | Argh, this forum system | Apr 29, 2004 |
Ian Winick wrote: Thanks guys, Very much appreciated. Benjamin, the macro works perfectly. All the best Ian No problem! Anyone who wants to copy the macro from above should be aware, though, that the program code displayed is incorrect - the forum system interprets everything the users type in when writing their postings. That's why the backslashes have vanished and why there is a Smiley in the midst of it all. That should have been a quotation mark-closing parenthesis, by the way.
[Edited at 2004-04-29 08:41] | | | To report site rules violations or get help, contact a site moderator: You can also contact site staff by submitting a support request » Ignoring text in square brackets 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! » |
| 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 » |
|
| | | | X Sign in to your ProZ.com account... | | | | | |