Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement "Pretranslate", "Copy", "Reset", "Search", "Raw", "Unit #" keyboard shortcuts #5100

Open
iafan opened this issue Aug 18, 2016 · 7 comments

Comments

@iafan
Copy link
Contributor

iafan commented Aug 18, 2016

(See #3136 as a global issue on implementing shortcuts).

Let's implement the following shortcuts (these require minimal programming, so I though it would be easier to fix them all at once):

  1. "Pretranslate using MT", mapped to esc enter
  2. "Reset to current translation", mapped to esc backspace
  3. "Toggle Raw mode", mapped to mod mod.
  4. "Search" alternative shortcut: mod + `` (in addition to already existing mod+shift+s`
  5. "Go to unit #", mapped to mod+0 (note that this one was there before, but no longer currently works due to some regression)

Edit: it seems that "Go to unit #" was originally mapped to ctrl+shift+n, which is now used internally by browsers, while the input control title said "Ctrl+Shift+U"; also, "Ctrl+Shift+U" seems to be used in Ubuntu for internal purposes, so remapping this function to mod+0.

@julen
Copy link
Contributor

julen commented Aug 19, 2016

"Pretranslate using MT", mapped to esc enter

As noted previous times, there can be multiple MT providers for a source language available at a single time.

"Reset to current translation", mapped to esc backspace

Which problem is this solving and how common it is? I feel like one can simply ignore any changes or undo them rather than trying to remember another shortcut, which needs no extra memory from users.

so remapping this function to mod+0

mod+0 is used in browsers for resetting the zoom; I'd say this is rather more used than Ubuntu's whatever internal purpose you are referring to.

@iafan
Copy link
Contributor Author

iafan commented Aug 19, 2016

As noted previous times, there can be multiple MT providers for a source language available at a single time.

Yes, I know. I also suspect this to be a rare case, and I believe that people won't use multiple MT even if the admin would provide several options. So for now I'd say that we need to use the first one. Some time ago in another discussion thread I suggested using a drop-down for MT providers, which I believe is the proper way to handle this. One selects their preferred provider, then clicks the button or uses the shortcut to pretranslate text.

Which problem is this solving and how common it is?

I would add this for completeness: in the future I'd like to add the way to go through the history (timeline) to revert to some previous translations, so there needs to be a way to reset this without having to do reloads or going one unit down, cancelling the popup, then going one unit up.

I personally sometimes translate something, then change my mind, then translate again. It's easier to press this shortcut than to make edits on top of existing ones.

mod+0 is used in browsers for resetting the zoom;

Yep, my bad. Time to have some sleep, I guess. mod+shift+0 is better.

@iafan
Copy link
Contributor Author

iafan commented Aug 19, 2016

Ubuntu's whatever internal purpose you are referring to.

For curious minds, Ubuntu uses this to start IME input.

@julen
Copy link
Contributor

julen commented Aug 19, 2016

As noted previous times, there can be multiple MT providers for a source language available at a single time.

Yes, I know. I also suspect this to be a rare case, and I believe that people won't use multiple MT even if the admin would provide several options.

I don't believe it's that uncommon. Having Google and Bing enabled already exposes this situation for many major locales, as well as many other minor ones. It's the case on MLO for example. I know people would usually decide on one and stick to that (personally I don't use the feature even if available), and I agree with your other suggestion to have a preferred one and simplify the situation with respect to shortcuts.

I would add this for completeness: in the future I'd like to add the way to go through the history (timeline) to revert to some previous translations, so there needs to be a way to reset this without having to do reloads or going one unit down, cancelling the popup, then going one unit up.

Maybe I misunderstood but opening the timeline, clicking on a previous unit and submitting doesn't require reloads or cancelling popups.

I personally sometimes translate something, then change my mind, then translate again. It's easier to press this shortcut than to make edits on top of existing ones.

I'm not sure I follow here. Are you referring to undoing the last submission action for, say unit uid = N, when you are in unit uid != N?

@iafan
Copy link
Contributor Author

iafan commented Aug 19, 2016

opening the timeline, clicking on a previous unit and submitting doesn't require reloads or cancelling popups

But it requires using the mouse.

Are you referring to undoing the last submission action for, say unit uid = N, when you are in unit uid != N?

No, I'm referring to resetting unsubmitted changes and going back to the current translation (as if I reloaded the unit).

@julen
Copy link
Contributor

julen commented Aug 19, 2016

opening the timeline, clicking on a previous unit and submitting doesn't require reloads or cancelling popups

But it requires using the mouse.

Unless I'm failing to grasp the point, I don't see relevance between this and resetting to current translation. Honestly, I don't believe there's anything wrong with mod+z —it's universally known—, and throughout all years that I've been using Pootle as a localizer such a need to revert to the initial state has been perfectly covered by it.

@iafan
Copy link
Contributor Author

iafan commented Aug 19, 2016

I don't believe there's anything wrong with mod+z

Nothing wrong per se. Undo has potentially multiple steps, while I'd like to have just one.

The esc backspace shortcut doesn't seem to interfere with anything, is trivial to implement, and I believe will have more tangible justification to everyone else, not just me, as we implement the abovementioned way to pick translations from timeline, and with implementing esc space and esc enter (to e.g. quickly compare existing and MT translation). We can postpone implementing it till all other stuff happens.

@phlax phlax added this to the 2.8.x milestone Aug 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants