optionsUI: make "Shortcuts" a button; unify translations

This commit is contained in:
tophf 2017-04-29 19:27:42 +03:00
parent 6d65d2a2b6
commit 0e1124b8bb
5 changed files with 18 additions and 20 deletions

View File

@ -389,14 +389,6 @@
"message": "Options", "message": "Options",
"description": "Go to Options UI" "description": "Go to Options UI"
}, },
"openOptionsShortcuts": {
"message": "Shortcuts",
"description": "Go to shortcut configuration"
},
"openShortcutsPopup": {
"message": "Shortcuts",
"description": "Go to shortcut configuration"
},
"optionsHeading": { "optionsHeading": {
"message": "Options", "message": "Options",
"description": "Heading for options section on manage page." "description": "Heading for options section on manage page."
@ -453,6 +445,13 @@
"message": "Remove section", "message": "Remove section",
"description": "Label for the button to remove a section" "description": "Label for the button to remove a section"
}, },
"shortcuts": {
"message": "Shortcuts",
"description": "Go to shortcut configuration"
},
"shortcutsNote": {
"message": "Define keyboard shortcuts"
},
"styleBadRegexp": { "styleBadRegexp": {
"message": "Regexp is invalid.", "message": "Regexp is invalid.",
"description": "Validation message for a bad regexp in a style" "description": "Validation message for a bad regexp in a style"
@ -696,9 +695,6 @@
"optionsOpenManager": { "optionsOpenManager": {
"message": "Manage styles" "message": "Manage styles"
}, },
"optionsOpenManagerNote": {
"message": "Define a keyboard shortcut"
},
"optionsCheckUpdate": { "optionsCheckUpdate": {
"message": "Check for and install all available updates" "message": "Check for and install all available updates"
}, },

View File

@ -195,7 +195,9 @@
</div> </div>
<p> <p>
<button id="manage-options-button" i18n-text="openOptionsManage"></button> <button id="manage-options-button" i18n-text="openOptionsManage"></button>
<button id="manage-shortcuts-button" class="chromium-only" i18n-text="openOptionsShortcuts"></button> <button id="manage-shortcuts-button" class="chromium-only"
i18n-text="shortcuts"
i18n-title="shortcutsNote"></button>
<a id="find-editor-styles" <a id="find-editor-styles"
href="https://userstyles.org/styles/browse/chrome-extension" href="https://userstyles.org/styles/browse/chrome-extension"
i18n-title="editorStylesButton" i18n-title="editorStylesButton"

View File

@ -76,13 +76,16 @@
<div class="block" id="actions"> <div class="block" id="actions">
<button data-cmd="reset" i18n-text="optionsResetButton" i18n-title="optionsReset"></button> <button data-cmd="reset" i18n-text="optionsResetButton" i18n-title="optionsReset"></button>
<button data-cmd="open-manage" i18n-text="optionsOpenManager"><sup class="chromium-only">3</sup></button> <button data-cmd="open-manage" i18n-text="optionsOpenManager"></button>
<div data-cmd="check-updates"> <div data-cmd="check-updates">
<button i18n-text="optionsCheck" i18n-title="optionsCheckUpdate"> <button i18n-text="optionsCheck" i18n-title="optionsCheckUpdate">
<span id="update-progress"></span> <span id="update-progress"></span>
</button> </button>
<div id="updates-installed" i18n-text="updatesCurrentlyInstalled"></div> <div id="updates-installed" i18n-text="updatesCurrentlyInstalled"></div>
</div> </div>
<a data-cmd="open-keyboard" class="chromium-only" href="chrome://extensions/configureCommands">
<button i18n-text="shortcuts" i18n-title="shortcutsNote"></button>
</a>
</div> </div>
</div> </div>
@ -93,11 +96,6 @@
<p i18n-text="optionsUpdateImportNote"></p> <p i18n-text="optionsUpdateImportNote"></p>
</li> </li>
<li i18n-text="optionsAdvancedExposeIframesNote"></li> <li i18n-text="optionsAdvancedExposeIframesNote"></li>
<li class="chromium-only">
<a data-cmd="open-keyboard"
i18n-text="optionsOpenManagerNote"
href="chrome://extensions/configureCommands"></a>
</li>
</ol> </ol>
</div> </div>

View File

@ -25,7 +25,7 @@ document.onclick = e => {
break; break;
case 'open-keyboard': case 'open-keyboard':
openURL({url: e.target.href}); openURL({url: target.closest('a').href});
e.preventDefault(); e.preventDefault();
break; break;

View File

@ -100,7 +100,9 @@
<div id="popup-options"> <div id="popup-options">
<button id="popup-manage-button" i18n-text="openManage" data-href="manage.html"></button> <button id="popup-manage-button" i18n-text="openManage" data-href="manage.html"></button>
<button id="popup-options-button" i18n-text="openOptionsPopup"></button> <button id="popup-options-button" i18n-text="openOptionsPopup"></button>
<button id="popup-shortcuts-button" class="chromium-only" i18n-text="openShortcutsPopup"></button> <button id="popup-shortcuts-button" class="chromium-only"
i18n-text="shortcuts"
i18n-title="shortcutsNote"></button>
</div> </div>
</div> </div>
</body> </body>