Ignoring text in square brackets
Thread poster: IanW (X)

IanW (X)
Local time: 22:58
German to English
+ ...
Apr 28, 2004

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


 

Sylvain Leray  Identity Verified
Local time: 22:58
Member (2003)
German to French
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: 22:58
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


 

tectranslate ITS GmbH
Local time: 22:58
German
+ ...
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-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]


 

IanW (X)
Local time: 22:58
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


 

tectranslate ITS GmbH
Local time: 22:58
German
+ ...
Macro Apr 28, 2004

Ian Winick wrote:

Hi Benjamin,

Excellent - it worked!

Greaticon_smile.gif
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  Identity Verified
    Czech Republic
    Local time: 22:58
    English to Czech
    + ...
    Macro Apr 28, 2004

    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.

     

    RWSTranslation
    Germany
    Local time: 22:58
    Member (2007)
    German to English
    + ...
    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: 22:58
    German to English
    + ...
    TOPIC STARTER
    Thanks guys Apr 29, 2004

    Thanks guys,

    Very much appreciated. Benjamin, the macro works perfectly.

    All the best


    Ian


     

    tectranslate ITS GmbH
    Local time: 22:58
    German
    + ...
    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!icon_smile.gif

    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.icon_frown.gif

    [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

    Advanced search







    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 »
    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