Script for changing segment status

Inspired by Paul's recent blog post, I've just tried for over an hour to create a script to change the segment status. Specifically, I want to be able to assign the status "Translation Approved" and "Translation Rejected" via keyboard shortcuts while I'm in "Translation" mode in the Editor.

I consulted the AHK documentation and watched a couple of tutorials and found that what I'm trying to do should be easy enough - just two mouse clicks, first on "Change Segment Status", then on the respective status. Figuring out the absolute cursor positions on my screen was also easy using "Active Window Info".

So the script below is supposed to assign "Translation Approved" in the maximized Editor window on a 27'' screen when I press Ctrl + Win key + q. But unfortunately, it doesn't. It clicks on "Change Segment Status", but then it stops without clicking on the status. Can anybody see or guess what I've done wrong here?

Thanks in advance!

Eva

;Studio 2017: Change Segment Status > Translation Approved (find absolute mouse cursor position using "Active Window Info" in AHK's program folder)
^#q::click 1346 108
click 1346 218
ExitApp

Parents
  • Hi Eva,

    I'm learning as you are, so had a go despite there being an app for this.  I thought I could use the alt keys in the script for this.  So, Alt+h+u+t gets me the translated status for example.  But I can't get the use of multiple keys to work correctly and always end up with the Alt keys activated in the ribbon and the letters ut in my segment.  In fact I've tested this so many times now I can remember the different Alt key shortcuts for them all and this works really well ;-)

    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

  • LOL, that is totally crazy. I never knew this, although I'm a mouse-hater and a keyboard-afficionado. I guess I never bothered with it because I always got where I wanted with regular shortcuts. But I don't really understand the point behind it. Why allow/support this but not regular keyboard shortcuts? I strikes me as a lot more complicated!
  • Personally, I don't really need this to work on multiple segments, I need it segment-by-segment during the translation process, that's why at the moment the AHK script is my preferred option because it also allows jumping to the next segment like Ctrl+Enter does while translating.
  • Unknown said:
    Personally, I don't really need this to work on multiple segments, I need it segment-by-segment during the translation process, that's why at the moment the AHK script is my preferred option because it also allows jumping to the next segment like Ctrl+Enter does while translating.
     

    I think the fact that you can add actions to the script and that it can be applied to multiple segments makes the script very valuable. I would agree with Paul and Raphaël that using the ribbon shortcuts would make the script more reliable and transferrable than using screen coordinates, as application size and even monitor placement could affect the operation of the script. For example, I keep my scripts in a Dropbox folder and then use them both on my main computer which has large monitors and on my portable computer, which has a small screen.

    Just out of curiosity, can I ask why you do this during the translation process? Do you change the status of every segment as you work or only some segments? I'm just curious about the possible scenarios.

    And then, finally, so glad to hear you're enthusiastic about AHK, I think the more people join the forum and contribute to it, the easier it will be for all of use to keep learning for our specific use cases.

  • I normally translate English > German. However, for a very special client I have recently started working German > English, because I specialize in the subject matter. The subject is quality management, and because QM heavily relies on ISO standards, it is full of terminology and quotes (which, however, are not obvious to somebody who is not familiar with the subject).
    Even seemingly simple stuff like "section" or "implement" is terminology in the strictest sense of the word.

    Since as a non-native speaker of English, my grammar leaves a lot to be desired, I need a native speaker to proofread my work. That native speaker is welcome to edit the hell out of everything I have actually translated, but a lot of what turns up in my "translations" are in fact more or less direct quotes from the QM standards, which must not be touched (although they very often have linguistic shortcomings that my editors would like to eliminate).

    Therefore, I use different statuses to indicate to the proofreaders the degree to which changes are allowed.

    "Translation Rejected" means "I did it, feel free to improve the text as much as you can."
    "Translated" means "edit with care, because there is some terminology and jargon there, but also some questionable grammar on my part."
    "Translation Approved" means "keep off, it's a full quote, even if you don't like it."
  • Thank you for constantly helping out less accomplished users, Nora! You have already given me plenty of extremely valuable tips. I really appreciate it!

  • Unknown said:
    Thank you for constantly helping out less accomplished users, Nora! You have already given me plenty of extremely valuable tips. I really appreciate it!

    Seconded!!

    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:
    Therefore, I use different statuses to indicate to the proofreaders the degree to which changes are allowed.

    "Translation Rejected" means "I did it, feel free to improve the text as much as you can."
    "Translated" means "edit with care, because there is some terminology and jargon there, but also some questionable grammar on my part."
    "Translation Approved" means "keep off, it's a full quote, even if you don't like it."

    That's really interesting Eva, I wonder how many other people work in this way.  Coming back to your problem, perhaps you have a good solution now by using AHK to enhance the app.  Shortcuts in the app for the statuses you want and then the move to next segment addition afterwards.  Maybe you could have one shortcut to do this but bring up a choice of the three options you need via AHK that you can quickly select?

    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:

     

    Coming back to your problem, perhaps you have a good solution now by using AHK to enhance the app.  Shortcuts in the app for the statuses you want and then the move to next segment addition afterwards.
     

    You can do this by using a tilde, for example, assuming I have Ctrl+Y set up in the app as the shortcut for Change status to Translation Approved:

    ~^y::
    Send {down}
    return

    Using the tilde in the hotkey will send the original functionality of the hotkey and then do whatever else is in the script.

  • I don't really expect anyone else to work this way because it is very inefficient, but neither the client nor I could find somebody with the required subject matter expertise AND the correct language combination. So the idea is that while I'm doing those translations, at the same time, I train the native speaking proofreaders to eventually do the translations. That way they can develop a feeling for how little is actually translated and how much is taken from standards and guidline documents. But that really is a very special situation which is not necessarily representative for other clients.

    I'm pretty happy with my solution now, although I haven't reality tested yet. Of course, Nora is totally right with everything she said about generalizing the script for other users and different hardware, but personally, I don't need that.

    I think only one shortcut with a choice would be possible, but actually involve more pressing of buttons. However, I'm very much waiting for and looking forward to the "highlight color" function I requested on the ideas page and that Daniel Brockmann said is in the making. It will be very helpful, also for other clients, to be able to highlight words and phrases in different colors while translating.

    For example:
    Blue - I was just guessing here, a software engineer has to look up that command for me in the translated GUI
    Green - can a marketing person please figure out which of three different spellings for that function you want?
    Red - I think there is a mistake in the source text, that's why I didn't translate what it said there. I guess it's okay in the target, but you should let the author know so he can fix it.

    etc.
Reply
  • I don't really expect anyone else to work this way because it is very inefficient, but neither the client nor I could find somebody with the required subject matter expertise AND the correct language combination. So the idea is that while I'm doing those translations, at the same time, I train the native speaking proofreaders to eventually do the translations. That way they can develop a feeling for how little is actually translated and how much is taken from standards and guidline documents. But that really is a very special situation which is not necessarily representative for other clients.

    I'm pretty happy with my solution now, although I haven't reality tested yet. Of course, Nora is totally right with everything she said about generalizing the script for other users and different hardware, but personally, I don't need that.

    I think only one shortcut with a choice would be possible, but actually involve more pressing of buttons. However, I'm very much waiting for and looking forward to the "highlight color" function I requested on the ideas page and that Daniel Brockmann said is in the making. It will be very helpful, also for other clients, to be able to highlight words and phrases in different colors while translating.

    For example:
    Blue - I was just guessing here, a software engineer has to look up that command for me in the translated GUI
    Green - can a marketing person please figure out which of three different spellings for that function you want?
    Red - I think there is a mistake in the source text, that's why I didn't translate what it said there. I guess it's okay in the target, but you should let the author know so he can fix it.

    etc.
Children
No Data