Merge lp:~adiroiban/launchpad/bug-359180-take-2 into lp:launchpad
Status: | Superseded | ||||||||
---|---|---|---|---|---|---|---|---|---|
Proposed branch: | lp:~adiroiban/launchpad/bug-359180-take-2 | ||||||||
Merge into: | lp:launchpad | ||||||||
Diff against target: |
802 lines (+446/-68) 11 files modified
lib/canonical/launchpad/javascript/translations/pofile.js (+306/-2) lib/canonical/launchpad/templates/batchnavigator-navigation-links.pt (+4/-0) lib/lp/translations/browser/pofile.py (+20/-2) lib/lp/translations/browser/tests/pofile-views.txt (+20/-2) lib/lp/translations/browser/translationmessage.py (+24/-0) lib/lp/translations/stories/standalone/xx-pofile-translate-newlines-check.txt (+2/-2) lib/lp/translations/stories/standalone/xx-pofile-translate.txt (+33/-5) lib/lp/translations/templates/currenttranslationmessage-translate-one.pt (+8/-11) lib/lp/translations/templates/pofile-translate.pt (+10/-43) lib/lp/translations/templates/translationmessage-translate.pt (+7/-0) lib/lp/translations/templates/translations-macros.pt (+12/-1) |
||||||||
To merge this branch: | bzr merge lp:~adiroiban/launchpad/bug-359180-take-2 | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Hummer (community) | code | Approve | |
Review via email: mp+17785@code.launchpad.net |
This proposal has been superseded by a proposal from 2010-02-25.
Commit message
Add keybindings on translating pofiles or translation messages.
Description of the change
= Bug 35180 =
Would be useful if the First - Previous - Next - Last link in the translation interface had a keyboard shortcut for fast accessing them. Don't need to be visible, but at least documented somewhere.
Maybe even the Save & Continue button.
== Proposed Fix ==
Add the following keybindings on +translate page for pofile and translaitonmessage
First field is autofocused.
Shift+Alt+b - Focus first translation field
Shift+Alt+a - First page
Shift+Alt+n - Next page
Shift+Alt+p - Previous page
Shift+Alt+l - Last page
Shift+Alt+s - Save and continue
Shift+Alt+Down - Next field
Shift+Alt+Up - Previous field
Shift+Alt+j - Next field
Shift+Alt+k - Previous field
Shift+Alt+C - Copy original text (both singular and plural)
Shift+Alt+0 - Mark current translation
Shift+Alt+NUMBER - Mark suggestion NUMBER
Shift+Alt+d - Dismiss all suggestions
Shift+Alt+r - Tick "Someone should review this translation"
== Pre-implementation notes ==
I talked with Danilo about keybindng implementation using comments for bug 35180
Previous MPs:
https:/
https:/
Part of this branch was already approved in previous MPs, but I have refactored most of those functions.
== Implementation notes ==
The legacy JS code from canonical/
Those functions from lp.js was rewritten using YUI3. Maybe we can no delete them from lp.js.
I have added a test for Bug #513625, since that bug was produces by some changes in this branch.
== Tests ==
I was not able to produce a reasonable windmill test since it is not trivial to find the current focused node or to see if a node is focused.
This requires adding onFocus and onBlur trigger for all DOM nodes.
./bin/test -t pofile-views
== Demo and QA ==
Log in as admin or as a person with rights on adding translations to a pofile.
Go to a pofile translate page:
https:/
The first field should have focus and you can start translating right away.
Adding a new translation should automatically select the radio button in front of it.
Try the keybindings described in the "Proposed fix" section.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files:
lib/canonical
== JSLint notices ==
No handlers could be found for logger "bzr"
jslint: No problem found in '/home/
jslint: 1 file to lint.
= Bug 359180 =
This is the follow up for the current commited branch for bug 359180 as it was discovered that Shift+Alt+up and Shift+Alt+Down are used by.
== Proposed fix ==
Use Shift+Alt+j and Shift+Alt+k for navigation.
Add fields in the translations_order only if the user can edit(add, change or suggest) the translation.
== Pre-implementation notes == /code.edge. launchpad. net/~adiroiban/ launchpad/ bug-359180/ +merge/ 16422
Notes can be found on the previous MP:
https:/
== Implementation details ==
There was a small refactorization for getting translations_order and autofocus_html_id.
== Tests ==
I was not able to produce a reasonable windmill test since it is not trivial to find the current focused node or to see if a node is focused.
This requires adding onFocus and onBlur trigger for all DOM nodes.
The test for the view is here:
./bin/test -t pofile-views
== Demo and Q/A == /code.edge. launchpad. net/~adiroiban/ launchpad/ bug-359180/ +merge/ 16422
Demo and Q/A can be found on the previous MP
https:/
Instead of UP and DOWN, use j and k
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: /launchpad/ javascript/ translations/ pofile. js
lib/canonical
== JSLint notices == adi/launchpad/ lp-branches/bug-359180-take-2/ lib/canonical/ launchpad/ javascript/ translations/ pofile. js'.
No handlers could be found for logger "bzr"
jslint: No problem found in '/home/
jslint: 1 file to lint.