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

Parents
  • 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
  • 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/.

  • 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
Reply
  • 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
Children
No Data