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.

Paul Filkin | RWS Group

________________________
Design your own training!

You've done the courses and still need to go a little further, or still not clear? 
Tell us what you need in our Community Solutions Hub

  • Thank you Paul! I use something slightly different for the same purpose:

    Rwin:: ; removes AT from segment status after post-editing and confirms the segment
    Send ^a
    Send ^c
    Send !{Delete}
    Send {Up}
    Send {Down}
    Send ^v
    Sleep 100
    Send !q ; (alt+Q is my custom shortcut to confirm the segment)
    Return

    I like your idea of overwriting target with source instead of having to move the cursor up and down to clear the AT status, so I'll modify my script with that.

  • For some reason I can't get "copy source to target" to work reliably with this script, so I reverted to "clear segment" but got rid of the up and down arrows to move out of the segment and back into it (I can't remember now why I had added that, but if it comes back to me I'll report back).

    Here's another variation of the script that combines inserting the translation result (when AT is not populated automatically into the segment) and removing the AT status. This script doesn't confirm the segment, so it will just insert the translation result, remove the AT status and leave it ready for post-editing.

    This script passes through the usual function of Ctrl+1, and it just adds the extra functionality to the shortcut.

    ~^1:: ;Inserts translation result and removes AT status
    Send ^a
    Send ^c
    Send !{Delete}
    Send ^v
    Return

    The script can be modified to do the same for Ctrl+2, Ctrl+3, etc.
  • Hi Paul,

    Is it possible to clear the AT statuses for all strings in one go? Or can we change a convenient shorcut key instead of ctrl+shift+f? Thanks.


    Regards,
    Ivan
  • Hello Ivan,

    Of course you can change the shortcut key. The relevant part is this:

    ^+f

    ^ = Ctrl
    + = Shift
    f = f

    You can find a list of all the hotkey commands here:

    autohotkey.com/.../Hotkeys.htm

    On changing them all... anything is possible I guess. Sounds as though you've got some reading to do ;-)

    autohotkey.com/.../Tutorial.htm

    Regards

    Paul

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • Unknown said:
    Hi Paul,

    Is it possible to clear the AT statuses for all strings in one go? Or can we change a convenient shorcut key instead of ctrl+shift+f? Thanks.


    Regards,
    Ivan
     

    Hi Ivan,

    To remove all AT statuses in one go, I would suggest using the SDLXLIFF Anonymizer app, a couple of clicks and you're done. Here's the link: http://appstore.sdl.com/app/sdlxliff-anonymizer/580/.

  • Thanks Paul. I will definitely read the tutorials.
  • Hi Nora,

    That's cool. I just tried. It works. Many thanks.

    Ivan
  • I also have a script that I use when Pretranslation doesn’t fill up all the segments...
    Basically, all you have to do is filter all the empty segments first (Review > Not translated) and run this script.
    It will automatically apply the translation from the TM/MT, while keeping the match status (for fuzzies, 100% and CM matches) and removing the AT status, by checking the color of the box showing up in the translation results. Therefore, you have to adjust the coordinates of this box in the script, depending on your own setup...
    I also use a 30 seconds timer to make sure the script doesn’t remain stuck in case no translation is found... And it will hit Enter, as it also happens that an error message shows up from time to time, so it will clear the message in order to resume the process.

    I also have an extra couple of lines (that I removed here) that will stop the script once the last row is reached, but this needs some adjustment.


    #IfWinNotActive ahk_class ConsoleWindowClass

    ;press on Win+F2 to run the macro
    #F2::

    Loop, 500000
    {
    if (BoolTimer=0) ; timer stopped
    {
    SetTimer, Alert1, 30000 ; activate 30 seconds timer - not to be stuck in one segment if no results shows up
    BoolTimer=1 ; timer boolean activated
    }

    WinActivate, SDL Trados Studio ; activate Studio
    PixelGetColor, color, 734, 252 ; Check the color of this point in the ACTIVE WINDOW. You have to update the coordinates depending on your setup. I make sure to spot the top left corner of the "color box" showing the fuzzy/100%/CM/AT match showing on the left of the translation, in the Translation Results window.
    if (color="0xBA7E00") ; Case of AT
    {
    WinActivate, SDL Trados Studio ; activate Studio
    Send !{Del} ; delete target segment (Alt+Del)
    clipboard = ; empty clipboard
    Send,^t ; insert TM translation (Ctr+T)
    Send {enter} ; press Enter (in case of an error message, not to remain stuck; won’t do any harm otherwise)
    Send,^a ; select all segment (Ctrl+A)
    Send,^a ; select all segment (Ctrl+A) - don’t ask why, sometimes it bugs if this is not here twice
    Send,^c ; copy target segment (Ctrl+C)
    Send !{Del} ; delete target segment (Alt+Del)
    Send,^v ; paste clipboard in target segment (Ctrl+V)
    clipboard = ; empty clipboard.
    Send,^{Down} ; goes to next segment (Ctrl+down arrow)
    SetTimer, Alert1, off ; stop timer
    BoolTimer=0 ; timer boolean stopped
    }
    else
    {
    if (color="0x00A211") ; case of 100%/CM match
    {
    WinActivate, SDL Trados Studio ; activate Studio
    clipboard = ; empty clipboard.
    Send {enter} ; press Enter (in case of an error message, not to remain stuck; won’t do any harm otherwise)
    Send,^{Down} ; goes to next segment (Ctrl+down arrow)
    SetTimer, Alert1, off ; stop timer
    BoolTimer=0 ; timer boolean stopped
    }
    else
    {
    if (color!="0xFFFFFF") ; case of fuzzy translation
    {
    WinActivate, SDL Trados Studio ; activate Studio
    Send !{Del} ; delete target segment
    clipboard = ; empty clipboard.
    Send,^t ; insert TM translation (Ctr+T)
    clipboard = ; empty clipboard.
    Send {enter} ; press Enter (in case of an error message, not to remain stuck; won’t do any harm otherwise)
    Send,^{Up} ; goes to next segment (Ctrl+down arrow)
    SetTimer, Alert1, off ; stop timer
    BoolTimer=0 ; timer boolean stopped
    }
    else ; case of no translation showing up
    {
    Send {enter} ; press Enter (in case of an error message, not to remain stuck; won’t do any harm otherwise)
    ;THIS LAST PART DOESN’T ALWAYS WORK, so I just put it in comments
    ;Send,^{Down} ; goes to next segment (Ctrl+down arrow)
    SetTimer, Alert1, off ; stop timer
    BoolTimer=0 ; timer boolean stopped
    }
    }
    }
    }

    Alert1: ; Timer is expired, no translation has been found in the TM/MT
    SetTimer, Alert1, off ; stop timer
    BoolTimer=0 ; timer boolean stopped
    WinActivate, SDL Trados Studio ; activate Studio
    Send {enter} ; press Enter (in case of an error message, not to remain stuck; won’t do any harm otherwise)
    Send !{Del} ; delete target segment
    Send,^s ; save
    Send,^{Down} ; goes to next segment (Ctrl+down arrow)

    #IfWinNotActive
  • Quoting:

    ~^1:: ;Inserts translation result and removes AT status
    Send ^a
    Send ^c
    Send !{Delete}
    Send ^v
    Return

     

    Hm, this changes the status from unedited to edited AT for me but does not remove AT. This is how I normally manually remove AT scores (delete = empty target segment). Does your 1 assume the top row numbers or number pad? I already have customized ctrl + number pad (x) as a shortcut for entering translation results. As for moving out and back into the target: Studio sometimes has an issue with keeping focus in the cleared target segment, in which case you have to manually do that. Maybe that's why you added it?