Automatically replace in MetaTexis the English question mark with the Greek one

spiros · 1 · 5133

spiros

  • Administrator
  • Hero Member
  • *****
    • Posts: 856540
    • Gender:Male
  • point d’amour
Automatically replace in MetaTexis the English question mark with the Greek one

MetaTexis has this amazing feature whereby one can run any macro when a translation unit is activated or when it closes. The following is an implementation to replace the English question mark in MetaTexis with the Greek question mark following a question to the developer.

1) Add the following Macro (in blue) to the macros in Normal.dot:
a) Press Alt+F8 in Word
b) Select Normal.dot in Macros in. Click on one of the existing macros.
c) Click Edit.
d) Paste the macro below an End Sub statement.
e) Close the window (it will be saved automatically).

 
Sub Greekquestionmark_En-El()
    If Selection.End <= Selection.Start Then
        Exit Sub
    End If
    With Selection.Find
        .ClearFormatting
        .Replacement.ClearFormatting
        .Text = "?"
        .Replacement.Text = ";"
        .Forward = True
        .Wrap = wdFindStop
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
        .Execute Replace:=wdReplaceAll
    End With
   
End Sub

 
2) In MetaTexis General Options tick the check box Run these command before closing a TU, and click the button Add.
 
3) In the dialog shown, select the option Macro and click the button Select.
 
4) In the dialog shown, search for the macro Greekquestionmark_En-El and select it.
 
5) Close all dialogs by clicking OK buttons.
 
Then the macro you added will be executed when you close a translation unit (TU). This saves you from changing the English question mark to a Greek one. If you are working on a Greek text and you want the opposite, namely convert Greek question mark to English one, then use this modified macro:

Sub Greekquestionmark_El-En()
    If Selection.End <= Selection.Start Then
        Exit Sub
    End If
    With Selection.Find
        .ClearFormatting
        .Replacement.ClearFormatting
        .Text = ";"
        .Replacement.Text = "?"
        .Forward = True
        .Wrap = wdFindStop
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
        .Execute Replace:=wdReplaceAll
    End With
   
End Sub


How can you do this in other CAT tools?

Trados

Pretranslate the document checking Segment unknown sentences. And then run find/replace. Only the target text will be replaced. The disadvantage with pretranslated text is that fuzzy matches will not be inserted automatically and you will have to use the Get translation button (or if you have Trados 7, Alt+Shift+Insert). See also Keyboard shortcut for Get Translation in Trados Workbench & TagEditor

Déjà Vu

Simply find/replace in target text once you pretranslated the document and replaced unknown target segments with source segments.
« Last Edit: 05 Mar, 2007, 16:56:04 by spiros »
Look up Multiple Greek, Ancient Greek and Latin dictionaries — Οὕτω τι βαθὺ καὶ μυστηριῶδες ἡ σιγὴ καὶ νηφάλιον, ἡ δὲ μέθη λάλον· ἄνουν γὰρ καὶ ὀλιγόφρον, διὰ τοῦτο καὶ πολύφωνον (Plutarch)


 

Search Tools