gh-14805: Fix blank labels in keyboard shortcuts page (gh-14807)

Co-authored-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
This commit is contained in:
Ashvin Jangid
2026-08-01 03:07:23 +05:30
committed by GitHub
parent 1d05184a2a
commit ccbd934482
3 changed files with 27 additions and 3 deletions

View File

@@ -283,7 +283,8 @@ zen-page-info-shortcut = View Page Info
zen-find-shortcut = Find on Page
zen-search-find-again-shortcut = Find Again
zen-search-find-again-shortcut-prev = Find Previous
zen-search-find-again-shortcut-2 = Find Again (Alt)
zen-search-find-again-shortcut-alt = Find Again (Alt)
zen-search-find-again-shortcut-prev-alt = Find Previous (Alt)
zen-bookmark-this-page-shortcut = Bookmark This Page
zen-bookmark-show-library-shortcut = Show Bookmarks Library
zen-key-stop = Stop Loading

View File

@@ -803,6 +803,7 @@ const zenMissingKeyboardShortcutL10n = {
key_inspectorMac: "zen-key-inspector-mac",
key_findSelection: "zen-key-find-selection",
key_findPrevious2: "zen-search-find-again-shortcut-prev-alt",
// Devtools
key_toggleToolbox: "zen-devtools-toggle-shortcut",
@@ -826,6 +827,9 @@ var zenIgnoreKeyboardShortcutIDs = [
"key_exitFullScreen_old",
"key_exitFullScreen_compat",
"key_duplicateTab",
"key_addTabSplitView",
"key_separateTabSplitView",
"viewOpenTabsSidebarKb",
];
var zenIgnoreKeyboardShortcutL10n = [

View File

@@ -85,9 +85,10 @@ const defaultKeyboardGroups = {
"zen-search-focus-shortcut",
"zen-search-focus-shortcut-alt",
"zen-find-shortcut",
"zen-search-find-again-shortcut-2",
"zen-search-find-again-shortcut",
"zen-search-find-again-shortcut-alt",
"zen-search-find-again-shortcut-prev",
"zen-search-find-again-shortcut-prev-alt",
],
pageOperations: [
"zen-text-action-copy-url-markdown-shortcut",
@@ -893,7 +894,7 @@ class nsZenKeyboardShortcutsLoader {
}
class nsZenKeyboardShortcutsVersioner {
static LATEST_KBS_VERSION = 19;
static LATEST_KBS_VERSION = 20;
constructor() {}
@@ -1301,6 +1302,24 @@ class nsZenKeyboardShortcutsVersioner {
}
}
if (version < 20) {
// Migrate from version 19 to 20.
// - Disable "key_addTabSplitView" and "key_separateTabSplitView"
// since we already had "cmd_zenNewEmptySplit" and "cmd_zenSplitViewUnsplit" before Firefox 153.
// - Disable firefox's "viewOpenTabsSidebarKb" as it depends on firefox's native sidebar feature
const shouldBeDisabledShortcuts = [
"key_addTabSplitView",
"key_separateTabSplitView",
"viewOpenTabsSidebarKb",
];
for (let shortcut of data) {
if (shouldBeDisabledShortcuts.includes(shortcut.getID())) {
shortcut.shouldBeEmpty = true;
shortcut.setDisabled(true);
}
}
}
return data;
}
}