[l10n] Add key modifiers to shortcut values
We add all of our keyboard shortcuts to the locales file for translating so that cmd+p in another language could be a more appropriate shortcut.
We currently just have the key to be translated, but we should include modifiers like cmd or shift as well.
e.g.
- old
symbolSearch.search.key=O - new
symbolSearch.search.key=CmdOrCtrl+O
Patch
diff --git a/assets/panel/debugger.properties b/assets/panel/debugger.properties
index 4a00602..c6fcf05 100644
--- a/assets/panel/debugger.properties
+++ b/assets/panel/debugger.properties
@@ -531,7 +531,7 @@ functionSearchSeparatorLabel=←
symbolSearch.search.functionsPlaceholder=Search functions…
symbolSearch.search.variablesPlaceholder=Search variables…
symbolSearch.search.classesPlaceholder=Search classes…
-symbolSearch.search.key=O
+symbolSearch.search.key=CmdOrCtrl+O
symbolSearch.searchModifier.regex=Regex
symbolSearch.searchModifier.caseSensitive=Case sensitive
symbolSearch.searchModifier.wholeWord=Whole word
diff --git a/src/components/ProjectSearch.js b/src/components/ProjectSearch.js
index 66bd3fe..d4f8bcd 100644
--- a/src/components/ProjectSearch.js
+++ b/src/components/ProjectSearch.js
@@ -55,7 +55,7 @@ class ProjectSearch extends Component {
L10N.getStr("sources.search.key"),
L10N.getStr("symbolSearch.search.key")
];
- searchKeys.forEach(key => shortcuts.off(`CmdOrCtrl+${key}`, this.toggle));
+ searchKeys.forEach(key => shortcuts.off(searchKeys, this.toggle));
shortcuts.off("Escape", this.onEscape);
}
Finding all of the keys to be replaced
- go to the properties file and search for
\\.key= - do a project search and find all of the occurrences
Do the changes have to be made for the 4 keys, "sourceSearch.search.key", "sources.search.key", "sourceSearch.search.again.key" & "symbolSearch.search.key" ?
I believe so On Sat, Apr 29, 2017 at 9:37 PM Sharath Narayan [email protected] wrote:
Do the changes have to be made for the 4 keys, "sourceSearch.search.key", "sources.search.key", "sourceSearch.search.again.key" & "symbolSearch.search.key" ?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/devtools-html/debugger.html/issues/2667#issuecomment-298186633, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPiYqBFDDg0Iiy663afZII8TG9YCwwPks5r04NlgaJpZM4M_PaB .
Thanks @jasonLaster! I will work on it.

For the searchAgainKey, two combinations are used. One with 'shift' and one without 'shift'. How should this be handled in the debugger.properties? Should I create a new key for handling 'shift' (something like sourceSearch.shift.search.again.key)?
@sharathnarayanph good question. I'd make a new key - sourceSearch.search.againPrev.key