Skip to content

Commit

Permalink
Change Alt+C shortcut (#347)
Browse files Browse the repository at this point in the history
Since #342 we load consistency suggestions on editor opening, so Alt+C now loads all consistency suggestions from the current page instead.
  • Loading branch information
vlad-timotei authored Oct 7, 2021
1 parent 6b69426 commit f6973ff
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"gd_create_element": true,
"gd_curly_apostrophe_highlight": true,
"gd_current_locale_first": true,
"gd_do_consistency": true,
"gd_extension": true,
"gd_get_lang_consistency": true,
"gd_get_setting": true,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ PS: If you are using NoScript or Privacy Badger enable wordpress.org domain or e
| Dismiss all validation warnings | Ctrl+Shift+D |
| Force suggest or Force save translation | Ctrl+Shift+Enter |
| Fuzzy | Ctrl+Shift+F |
| Load consistency suggestions | Alt+C |
| Load all consistency suggestions | Alt+C |
| Open next string editor | Page Down |
| Open previous string editor | Page Up |
| Reject | Ctrl+Shift+R |
Expand Down
4 changes: 1 addition & 3 deletions js/glotdict-hotkey.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ function gd_hotkeys() {
return false;
} );
key( 'alt+c', () => {
if ( jQuery( '.editor:visible' ).length > 0 ) {
jQuery( '.editor:visible .gd_get_consistency' ).trigger( 'click' );
}
document.querySelectorAll( '.gd-consistency' ).forEach( ( el ) => { gd_do_consistency( el ); } );
return false;
} );
}
2 changes: 1 addition & 1 deletion js/glotdict-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function gd_generate_settings_panel() {
'Dismiss all validation warnings': 'Ctrl+Shift+D',
'Force suggest or Force save translation': 'Ctrl+Shift+Enter',
'Fuzzy': 'Ctrl+Shift+F',
'Load consistency suggestions': 'Alt+C',
'Load all consistency suggestions': 'Alt+C',
'Open next string editor': 'Page Down',
'Open previous string editor': 'Page Up',
'Reject': 'Ctrl+Shift+R',
Expand Down

0 comments on commit f6973ff

Please sign in to comment.