Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit 272fbae

Browse files
authored
Remove re-used accesskeys (#3009)
1 parent 1e12b2e commit 272fbae

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

assets/panel/debugger.properties

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,17 @@ editor.jumpToMappedLocation1=Jump to %S location
316316
# context menu to disable framework grouping.
317317
framework.disableGrouping=Disable Framework Grouping
318318

319+
# LOCALIZATION NOTE (framework.disableGrouping.accesskey): Access key to toggle
320+
# framework grouping from the context menu.
321+
framework.disableGrouping.accesskey=u
322+
319323
# LOCALIZATION NOTE (framework.enableGrouping): This is the text that appears in the
320324
# context menu to enable framework grouping.
321325
framework.enableGrouping=Enable Framework Grouping
322326

323-
# LOCALIZATION NOTE (framework.accesskey): Access key to toggle framework grouping from
324-
# the context menu.
325-
framework.accesskey=u
327+
# LOCALIZATION NOTE (framework.enableGrouping.accesskey): Access key to toggle
328+
# framework grouping from the context menu.
329+
framework.enableGrouping.accesskey=u
326330

327331
# LOCALIZATION NOTE (generated): Source Map term for a server source location
328332
generated=generated
@@ -398,6 +402,10 @@ sourceFooter.blackbox=Blackbox Source
398402
# with the blackbox button
399403
sourceFooter.unblackbox=Unblackbox Source
400404

405+
# LOCALIZATION NOTE (sourceFooter.unblackbox.accesskey): Access key to blackbox
406+
# an associated source
407+
sourceFooter.unblackbox.accesskey=b
408+
401409
# LOCALIZATION NOTE (sourceFooter.blackbox.accesskey): Access key to blackbox
402410
# an associated source
403411
sourceFooter.blackbox.accesskey=b

src/components/SecondaryPanes/Frames/FrameMenu.js

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@ import kebabCase from "lodash.kebabcase";
77

88
const blackboxString = "sourceFooter.blackbox";
99
const unblackboxString = "sourceFooter.unblackbox";
10-
const blackboxKeyString = "sourceFooter.blackbox.accesskey";
1110

1211
function formatMenuElement(
1312
labelString: string,
14-
accesskeyString: string,
1513
click: Function,
1614
disabled: boolean = false
1715
): ContextMenuItem {
1816
const label = L10N.getStr(labelString);
19-
const accesskey = L10N.getStr(accesskeyString);
17+
const accesskey = L10N.getStr(`${labelString}.accesskey`);
2018
const id = `node-menu-${kebabCase(label)}`;
2119
return {
2220
id,
@@ -28,15 +26,11 @@ function formatMenuElement(
2826
}
2927

3028
function copySourceElement(url) {
31-
return formatMenuElement("copySourceUrl", "copySourceUrl.accesskey", () =>
32-
copyToTheClipboard(url)
33-
);
29+
return formatMenuElement("copySourceUrl", () => copyToTheClipboard(url));
3430
}
3531

3632
function copyStackTraceElement(copyStackTrace) {
37-
return formatMenuElement("copyStackTrace", "copyStackTrace.accesskey", () =>
38-
copyStackTrace()
39-
);
33+
return formatMenuElement("copyStackTrace", () => copyStackTrace());
4034
}
4135

4236
function toggleFrameworkGroupingElement(
@@ -47,19 +41,15 @@ function toggleFrameworkGroupingElement(
4741
? "framework.disableGrouping"
4842
: "framework.enableGrouping";
4943

50-
return formatMenuElement(actionType, "framework.accesskey", () =>
51-
toggleFrameworkGrouping()
52-
);
44+
return formatMenuElement(actionType, () => toggleFrameworkGrouping());
5345
}
5446

5547
function blackBoxSource(source, toggleBlackBox) {
5648
const toggleBlackBoxString = source.isBlackBoxed
5749
? unblackboxString
5850
: blackboxString;
5951

60-
return formatMenuElement(toggleBlackBoxString, blackboxKeyString, () =>
61-
toggleBlackBox(source)
62-
);
52+
return formatMenuElement(toggleBlackBoxString, () => toggleBlackBox(source));
6353
}
6454

6555
export default function FrameMenu(

0 commit comments

Comments
 (0)