Removing AT statuses as you work

This one has always been a hot topic and I've been fairly opinionated on this in the past, but today there are so many published ways to do this I thought I'd share a simple way of automating the removal of the AT status as you work:

;------------------------------------------------------------------------------
; Clear AT statuses in SDL Trados Studio.
;------------------------------------------------------------------------------
^+f::
Send ^a^c!{Ins}^a^v
Return

The script is simple enough, you just press Ctrl+Shift+f and the AT status from a machine translation magically disappears so the active segment appears to be a new translation for you to post-edit.  The script just automates the selection of the target, copy the target to the clipboard, overwrite the target with the source which clears the AT status, select the target again and paste back the original machine translation.

Parents
  • Note that if you use the setting to automatically insert the MT result into the target segment
    (Options --> Editor --> Automation, "Apply automated translation when no TM match is found"),
    after running this macro the "previous source" is still recorded as MT in the sdlxliff file.

    One option might be to use "Undo" before saving.
    Here is the macro I tried, which seems to work.
    I found that a pause was necessary after undo, otherwise Trados crashes, and you have to end the process via Task Manager.
    (because the error message keeps coming back when you click on OK).
    You can replace "F2" with the hotkey you would like to use to run the macro:

    ;------------------------------------------------------------------------------
    ; Remove AT sign, with Undo
    ;------------------------------------------------------------------------------
    F2::
    Send ^a^c^z
    Sleep 500
    Send ^v
    Return

    Another method is to simply move the mouse up, copy the text, and insert it.
    For this method, you turn off the setting to automatically insert the MT result into the target segment.
    First you have to find out the coordinates of the place you want to click in the results window.
    To find the position of the cursor, x and y coordinates, you can run Autohotkey's own utility "AU3_Spy.exe",
    which is in the installation folder.
    This macro uses "Relative" coordinates so they still work when the Trados panel is moved slightly.
    Place the cursor somewhere in the centre of the line in the results panel at the top,
    then read off the coordinates in their utility. In my case the coordinates were "871, 273".

    ;------------------------------------------------------------------------------
    ; Copy MT text down, with automatic insertion turned off
    ;------------------------------------------------------------------------------
    F2::
    CoordMode,Mouse,Relative
    SetDefaultMouseSpeed, 0 ; set to fastest mouse movement
    MouseMove, A_CaretX, A_CaretY ; move cursor to text insertion point, caret
    MouseGetPos, xpos, ypos ; record coordinates of where cursor is, at xpos, ypos
    Click 871, 273 ; clicks at these x, y coordinates, set to relative by coordmode
    Send ^a^c ; select all, copy
    MouseMove, xpos, ypos ; move the cursor back to original position
    Click ; and click in the target segment again
    Send ^v ; paste
    Return

    These macros are not fully tested so first test them on a copy,
    and use at your own risk, every configuration is different.

Reply
  • Note that if you use the setting to automatically insert the MT result into the target segment
    (Options --> Editor --> Automation, "Apply automated translation when no TM match is found"),
    after running this macro the "previous source" is still recorded as MT in the sdlxliff file.

    One option might be to use "Undo" before saving.
    Here is the macro I tried, which seems to work.
    I found that a pause was necessary after undo, otherwise Trados crashes, and you have to end the process via Task Manager.
    (because the error message keeps coming back when you click on OK).
    You can replace "F2" with the hotkey you would like to use to run the macro:

    ;------------------------------------------------------------------------------
    ; Remove AT sign, with Undo
    ;------------------------------------------------------------------------------
    F2::
    Send ^a^c^z
    Sleep 500
    Send ^v
    Return

    Another method is to simply move the mouse up, copy the text, and insert it.
    For this method, you turn off the setting to automatically insert the MT result into the target segment.
    First you have to find out the coordinates of the place you want to click in the results window.
    To find the position of the cursor, x and y coordinates, you can run Autohotkey's own utility "AU3_Spy.exe",
    which is in the installation folder.
    This macro uses "Relative" coordinates so they still work when the Trados panel is moved slightly.
    Place the cursor somewhere in the centre of the line in the results panel at the top,
    then read off the coordinates in their utility. In my case the coordinates were "871, 273".

    ;------------------------------------------------------------------------------
    ; Copy MT text down, with automatic insertion turned off
    ;------------------------------------------------------------------------------
    F2::
    CoordMode,Mouse,Relative
    SetDefaultMouseSpeed, 0 ; set to fastest mouse movement
    MouseMove, A_CaretX, A_CaretY ; move cursor to text insertion point, caret
    MouseGetPos, xpos, ypos ; record coordinates of where cursor is, at xpos, ypos
    Click 871, 273 ; clicks at these x, y coordinates, set to relative by coordmode
    Send ^a^c ; select all, copy
    MouseMove, xpos, ypos ; move the cursor back to original position
    Click ; and click in the target segment again
    Send ^v ; paste
    Return

    These macros are not fully tested so first test them on a copy,
    and use at your own risk, every configuration is different.

Children
No Data