Bug 1525615: Add 'title' attribute to '<a>' of title of DebugTargetPane. r=jdescottes,ladybenko
☠☠ backed out by 894e76afd6ba ☠ ☠
authorDaisuke Akatsuka <dakatsuka@mozilla.com>
Tue, 26 Feb 2019 11:12:56 +0000
changeset 518945 c6f3144fb731c869d3ec6f300d1aec0c96eee4d4
parent 518944 54455c6ac7cac2fad4d50d3c0b28e3dc2cb2ff3b
child 518946 894e76afd6ba9ab4a56f871bf30bb686db02d891
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes, ladybenko
bugs1525615
milestone67.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 1525615: Add 'title' attribute to '<a>' of title of DebugTargetPane. r=jdescottes,ladybenko Depends on D20296 Differential Revision: https://phabricator.services.mozilla.com/D20765
devtools/client/aboutdebugging-new/src/components/debugtarget/DebugTargetPane.js
devtools/client/aboutdebugging-new/tmp-locale/en-US/aboutdebugging.notftl
--- a/devtools/client/aboutdebugging-new/src/components/debugtarget/DebugTargetPane.js
+++ b/devtools/client/aboutdebugging-new/src/components/debugtarget/DebugTargetPane.js
@@ -3,31 +3,35 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const { createFactory, PureComponent } = require("devtools/client/shared/vendor/react");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 
+const FluentReact = require("devtools/client/shared/vendor/fluent-react");
+
 const DebugTargetList = createFactory(require("./DebugTargetList"));
 
 const Actions = require("../../actions/index");
 const Types = require("../../types/index");
 
 /**
  * This component provides list for debug target and name area.
  */
 class DebugTargetPane extends PureComponent {
   static get propTypes() {
     return {
       actionComponent: PropTypes.any.isRequired,
       collapsibilityKey: PropTypes.string.isRequired,
       detailComponent: PropTypes.any.isRequired,
       dispatch: PropTypes.func.isRequired,
+      // Provided by wrapping the component with FluentReact.withLocalization.
+      getString: PropTypes.func.isRequired,
       icon: PropTypes.string.isRequired,
       isCollapsed: PropTypes.bool.isRequired,
       name: PropTypes.string.isRequired,
       targets: PropTypes.arrayOf(Types.debugTarget).isRequired,
     };
   }
 
   toggleCollapsibility() {
@@ -35,30 +39,34 @@ class DebugTargetPane extends PureCompon
     dispatch(Actions.updateDebugTargetCollapsibility(collapsibilityKey, !isCollapsed));
   }
 
   render() {
     const {
       actionComponent,
       detailComponent,
       dispatch,
+      getString,
       icon,
       isCollapsed,
       name,
       targets,
     } = this.props;
 
+    const title = getString("about-debugging-collapse-expand-debug-targets");
+
     return dom.section(
       {
         className: "js-debug-target-pane",
       },
       dom.a(
         {
           className: "undecorated-link debug-target-pane__title " +
-            "js-debug-target-pane-title",
+                     "js-debug-target-pane-title",
+          title,
           onClick: e => this.toggleCollapsibility(),
         },
         dom.h2(
           { className: "main-subheading debug-target-pane__heading" },
           dom.img(
             {
               className: "main-subheading__icon",
               src: icon,
@@ -80,9 +88,9 @@ class DebugTargetPane extends PureCompon
         dispatch,
         isCollapsed,
         targets,
       }),
     );
   }
 }
 
-module.exports = DebugTargetPane;
+module.exports = FluentReact.withLocalization(DebugTargetPane);
--- a/devtools/client/aboutdebugging-new/tmp-locale/en-US/aboutdebugging.notftl
+++ b/devtools/client/aboutdebugging-new/tmp-locale/en-US/aboutdebugging.notftl
@@ -301,8 +301,13 @@ about-debugging-page-title = { -applicat
 # Title of a modal dialog displayed on remote runtime pages after clicking on the Profile Runtime button.
 about-debugging-profiler-dialog-title = Performance Profiler
 
 # Label of a checkbox displayed in the runtime page for "This Firefox".
 # This checkbox will toggle preferences that enable local addon debugging.
 # The "Learn more" link points to MDN.
 # https://developer.mozilla.org/docs/Tools/about:debugging#Enabling_add-on_debugging
 about-debugging-extension-debug-setting-label = Enable extension debugging <a>Learn more</a>
+
+# Clicking on the header of a debug target category will expand or collapse the debug
+# target items in the category. This text is used as ’title’ attribute of the header,
+# to describe this feature.
+about-debugging-collapse-expand-debug-targets = Collapse / expand