Bug 1364837 - Add localization strings for blackbox context menus r=jlast,flod
authorDavid Walsh <dwalsh@mozilla.com>
Thu, 15 Aug 2019 05:09:49 +0000
changeset 488225 708aa306509aaad62407cb40da2e343ebdc73dab
parent 488224 a055218ae4e272e918c1126082744be928bfb721
child 488226 adba66fff09bc3d77f7f9d865b78095888ba626b
push id36437
push userncsoregi@mozilla.com
push dateThu, 15 Aug 2019 19:33:18 +0000
treeherdermozilla-central@44aac6fc3352 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlast, flod
bugs1364837
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1364837 - Add localization strings for blackbox context menus r=jlast,flod Differential Revision: https://phabricator.services.mozilla.com/D41042
devtools/client/debugger/src/components/Editor/Tab.js
devtools/client/debugger/src/components/Editor/menus/editor.js
devtools/client/debugger/src/components/PrimaryPanes/SourcesTreeItem.js
devtools/client/debugger/src/components/SecondaryPanes/Frames/FrameMenu.js
devtools/client/debugger/src/utils/tabs.js
devtools/client/locales/en-US/debugger.properties
--- a/devtools/client/debugger/src/components/Editor/Tab.js
+++ b/devtools/client/debugger/src/components/Editor/Tab.js
@@ -139,18 +139,18 @@ class Tab extends PureComponent<Props> {
           disabled: !selectedSource.url,
           click: () => showSource(cx, tab),
         },
       },
       {
         item: {
           ...tabMenuItems.toggleBlackBox,
           label: source.isBlackBoxed
-            ? L10N.getStr("sourceFooter.unblackbox")
-            : L10N.getStr("sourceFooter.blackbox"),
+            ? L10N.getStr("blackboxContextItem.unblackbox")
+            : L10N.getStr("blackboxContextItem.blackbox"),
           disabled: !shouldBlackbox(source),
           click: () => toggleBlackBox(cx, source),
         },
       },
       {
         item: {
           ...tabMenuItems.prettyPrint,
           click: () => togglePrettyPrint(cx, tab),
--- a/devtools/client/debugger/src/components/Editor/menus/editor.js
+++ b/devtools/client/debugger/src/components/Editor/menus/editor.js
@@ -118,19 +118,21 @@ const showSourceMenuItem = (
 
 const blackBoxMenuItem = (
   cx: Context,
   selectedSource: Source,
   editorActions: EditorItemActions
 ) => ({
   id: "node-menu-blackbox",
   label: selectedSource.isBlackBoxed
-    ? L10N.getStr("sourceFooter.unblackbox")
-    : L10N.getStr("sourceFooter.blackbox"),
-  accesskey: L10N.getStr("sourceFooter.blackbox.accesskey"),
+    ? L10N.getStr("blackboxContextItem.unblackbox")
+    : L10N.getStr("blackboxContextItem.blackbox"),
+  accesskey: selectedSource.isBlackBoxed
+    ? L10N.getStr("blackboxContextItem.unblackbox.accesskey")
+    : L10N.getStr("blackboxContextItem.blackbox.accesskey"),
   disabled: !shouldBlackbox(selectedSource),
   click: () => editorActions.toggleBlackBox(cx, selectedSource),
 });
 
 const watchExpressionItem = (
   cx: ThreadContext,
   selectedSource: Source,
   selectionText: string,
--- a/devtools/client/debugger/src/components/PrimaryPanes/SourcesTreeItem.js
+++ b/devtools/client/debugger/src/components/PrimaryPanes/SourcesTreeItem.js
@@ -123,19 +123,21 @@ class SourceTreeItem extends Component<P
           click: () => copyToTheClipboard(contents.url),
         };
 
         const { cx, source } = this.props;
         if (source) {
           const blackBoxMenuItem = {
             id: "node-menu-blackbox",
             label: source.isBlackBoxed
-              ? L10N.getStr("sourceFooter.unblackbox")
-              : L10N.getStr("sourceFooter.blackbox"),
-            accesskey: L10N.getStr("sourceFooter.blackbox.accesskey"),
+              ? L10N.getStr("blackboxContextItem.unblackbox")
+              : L10N.getStr("blackboxContextItem.blackbox"),
+            accesskey: source.isBlackBoxed
+              ? L10N.getStr("blackboxContextItem.unblackbox.accesskey")
+              : L10N.getStr("blackboxContextItem.blackbox.accesskey"),
             disabled: !shouldBlackbox(source),
             click: () => this.props.toggleBlackBox(cx, source),
           };
           const downloadFileItem = {
             id: "node-menu-download-file",
             label: L10N.getStr("downloadFile.label"),
             accesskey: L10N.getStr("downloadFile.accesskey"),
             disabled: false,
--- a/devtools/client/debugger/src/components/SecondaryPanes/Frames/FrameMenu.js
+++ b/devtools/client/debugger/src/components/SecondaryPanes/Frames/FrameMenu.js
@@ -3,18 +3,18 @@
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
 // @flow
 import { showMenu } from "devtools-contextmenu";
 import { copyToTheClipboard } from "../../../utils/clipboard";
 import type { ContextMenuItem, Frame } from "../../../types";
 import { kebabCase } from "lodash";
 
-const blackboxString = "sourceFooter.blackbox";
-const unblackboxString = "sourceFooter.unblackbox";
+const blackboxString = "blackboxContextItem.blackbox";
+const unblackboxString = "blackboxContextItem.unblackbox";
 
 function formatMenuElement(
   labelString: string,
   click: Function,
   disabled: boolean = false
 ): ContextMenuItem {
   const label = L10N.getStr(labelString);
   const accesskey = L10N.getStr(`${labelString}.accesskey`);
--- a/devtools/client/debugger/src/utils/tabs.js
+++ b/devtools/client/debugger/src/utils/tabs.js
@@ -92,18 +92,18 @@ export function getTabMenuItems() {
     copySourceUri2: {
       id: "node-menu-copy-source-url",
       label: L10N.getStr("copySourceUri2"),
       accesskey: L10N.getStr("copySourceUri2.accesskey"),
       disabled: false,
     },
     toggleBlackBox: {
       id: "node-menu-blackbox",
-      label: L10N.getStr("sourceFooter.blackbox"),
-      accesskey: L10N.getStr("sourceFooter.blackbox.accesskey"),
+      label: L10N.getStr("blackboxContextItem.blackbox"),
+      accesskey: L10N.getStr("blackboxContextItem.blackbox.accesskey"),
       disabled: false,
     },
     prettyPrint: {
       id: "node-menu-pretty-print",
       label: L10N.getStr("sourceTabs.prettyPrint"),
       accesskey: L10N.getStr("sourceTabs.prettyPrint.accesskey"),
       disabled: false,
     },
--- a/devtools/client/locales/en-US/debugger.properties
+++ b/devtools/client/locales/en-US/debugger.properties
@@ -498,22 +498,31 @@ sourceTabs.revealInTree.accesskey=r
 # LOCALIZATION NOTE (sourceTabs.prettyPrint): Editor source tab context menu item
 # for pretty printing the source.
 sourceTabs.prettyPrint=Pretty print source
 sourceTabs.prettyPrint.accesskey=p
 
 # LOCALIZATION NOTE (sourceFooter.blackbox): Tooltip text associated
 # with the blackbox button
 sourceFooter.blackbox=Blackbox source
-sourceFooter.blackbox.accesskey=B
 
 # LOCALIZATION NOTE (sourceFooter.unblackbox): Tooltip text associated
 # with the blackbox button
 sourceFooter.unblackbox=Unblackbox source
 
+# LOCALIZATION NOTE (blackboxContextItem.blackbox): Text associated
+# with the blackbox context menu item
+blackboxContextItem.blackbox=Blackbox source
+blackboxContextItem.blackbox.accesskey=B
+
+# LOCALIZATION NOTE (blackboxContextItem.unblackbox): Text associated
+# with the unblackbox context menu item
+blackboxContextItem.unblackbox=Unblackbox source
+blackboxContextItem.unblackbox.accesskey=U
+
 # LOCALIZATION NOTE (sourceFooter.mappedSource): Text associated
 # with a mapped source. %S is replaced by the source map origin.
 sourceFooter.mappedSource=(From %S)
 
 # LOCALIZATION NOTE (sourceFooter.mappedSourceTooltip): Tooltip text associated
 # with a mapped source. %S is replaced by the source map origin.
 sourceFooter.mappedSourceTooltip=(Source mapped from %S)