Tuesday, January 10, 2017

Autopropagating Segment Status in Review Mode in SDL Trados Studio

Aug. 2017 Update: This issue has been resolved in Studio 2017 SR1.

The problem: When in Review mode in Studio, segment status for repetitions is not propagated when Track Changes is on and no edits are made to the segment.



The workaround: An AutoHotkey script that disables track changes right before confirming the segment, then enables track changes again after the segment has been confirmed.



Until a change is made to Studio to allow segment status to propagate in all instances, the following workaround can be used to achieve the desired effect.

Step 1: AutoHotkey should be installed (if needed, you can download it here)

Step 2: Download my Review Macro AutoHotkey script, and load it by double-clicking on the file.

Script breakdown

$^Enter::  ;This is the hotkey (Ctrl+Enter, adapt if your Confirm and Move to Next Segment shortcut is different)
Sleep 300  ;a short delay before the script execution starts, for better reliability
Send, ^!{F10}  ;Toggle track changes off
Send, ^{Enter} ;Confirm segment (Ctrl+Enter, adapt if your Confirm and Move to Next Segment shortcut is different)
Send, ^!{F10} ;Toggle track changes on
Send, {Esc}
Return

#s::  ;Hotkey toggle to suspend/resume the macro (Windows Key+S)
Suspend
if (A_IsSuspended)
MsgBox, Review Macro suspended
else
MsgBox, Review Macro active
Return

Explanation
Once the script is loaded, to use it you would simply confirm your segments as you usually do (assuming that you use Ctrl+Enter as your shortcut; if not, adapt the script as needed). When the Confirm and Move to Next Unconfirmed Segment shortcut is used, the script will toggle Track Changes off, confirm the segment, then toggle Track Changes back on. What this means is that segment status will be correctly propagated, as Track Changes will be disabled right before confirming the segment, regardless of whether changes were made or not.

Warning notes:
1. If the script is loaded while in translation mode, there may be some undesired effects when the shortcut is used, as track changes is toggled on and off every time a segment is confirmed. Due to this, it's best to only load the script when in review mode and unload it once the review is done. To learn how to load and unload AutoHotkey scripts, watch the short video below.



2. For the script to work, track changes needs to be on before starting the review, otherwise, the first thing the script will do is enable track changes, which defeats the purpose of the script.

3. A limitation of the script is that if a change is made to a segment that had been previously confirmed and contained tracked changes, when confirming the segment again, the new edits won't propagate to repeated segments and won't be committed to the TM because Track Changes is off prior to confirming the segment. An error message will be displayed saying that reviewed content cannot be edited when review mode is off. To solve this, the script can be suspended while the segment in question is confirmed, then activated again by using the Windows Key+S shortcut as a toggle.

I hope you will find this useful!

Note: Edited 01-11-2017 to add warning #3 and update the script accordingly.

6 comments:

  1. Excellent article Nora... really clever use of autohotkey to solve a problem affecting many users working with tracked changes for review. Great work and thank you for sharing it!!

    ReplyDelete
  2. But why not just set Studio options right? Options > Editor > Auto-propagation > General. Check all three:
    - "Enable auto-propagation" (preferably at 100%),
    - "Auto-propagate exact matches to confirmed segments" and
    - "Confirm segment after auto-propagating an exact match".
    Works every time.

    ReplyDelete
    Replies
    1. Hi Wasaty,

      The reason is that while propagation works as expected in Translation mode with those options, the issue for which this workaround was designed is the propagation of segments under the following conditions:

      1. Review mode
      2. Repetitions
      3. Track Changes on
      4. No edits made to the segment

      When all of the above conditions are met, Studio doesn't propagate the segment status of unchanged repetitions, as shown in the first video above. Implementing this little script changes that behavior to make things easier for the editor, who otherwise would have to either manually confirm (and possibly re-read) every repeated segment that needs no edits, or remember to manually enable/disable track changes in every segment as needed.

      Here's a link to a post by a colleague in the SDL Community that led me to write this post:

      https://community.sdl.com/solutions/language/translationproductivity/f/90/t/9977

      Delete
    2. OK, thanks for the clarification. The crucial part is "no edits made to the segment".

      Delete
  3. Awesome and interesting article. Great things you've always shared with us. Thanks. Just continue composing this kind of post. whatsapp status

    ReplyDelete