Commit c577b2d7 authored by Michal Čihař's avatar Michal Čihař

Add keyboard shortcut to submit and unmark fuzzy

Issue #787
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent a1c73cb6
......@@ -83,6 +83,8 @@ While translating you can use following keyboard shortcuts:
Navigates to next translation in current search.
:kbd:`Alt+Enter` or :kbd:`Ctrl+Enter`
Saves current translation.
:kbd:`Ctrl+Shift+Enter`
Umarks translation as fuzzy and submits it.
Translation context
+++++++++++++++++++
......
......@@ -61,8 +61,11 @@
<div class="panel-heading"><span class="pull-right flip">
<i class="fa fa-keyboard-o html-tooltip" data-toggle="tooltip" data-placement="bottom"
data-title="{% trans "Keyboard shortcuts available:"%}<br />{% trans "Ctrl+Enter - Save" %}<br />{% trans "Alt+PageUp/PageDown/Home/End - Translation units navigation"%}"
></i>
data-title="{% trans "Keyboard shortcuts available:"%}<br />
{% trans "Ctrl+Enter - Save" %}<br />
{% trans "Ctrl+Shift+Enter - Unmark fuzzy and save" %}<br />
{% trans "Alt+PageUp/PageDown/Home/End - Translation units navigation"%}
"></i>
</span><h4 class="panel-title">{% trans "Translate" %}</h4></div>
<div class="panel-body">
{% csrf_token %}
......
......@@ -511,6 +511,7 @@ $(function () {
Mousetrap.bindGlobal('alt+pagedown', function(e) {window.location = $('#button-next').attr('href'); return false;});
Mousetrap.bindGlobal('alt+pageup', function(e) {window.location = $('#button-prev').attr('href'); return false;});
Mousetrap.bindGlobal('alt+home', function(e) {window.location = $('#button-first').attr('href'); return false;});
Mousetrap.bindGlobal('ctrl+shift+enter', function(e) {$('input[name="fuzzy"]').prop('checked', false); return submitForm(e);});
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment