Bug 1520957 - [release 119] Fix 7628 - Localize the XHR breakpoint list item labels (#7679). r=dwalsh
☠☠ backed out by 27034f1841e9 ☠ ☠
authorDavid Walsh <davidwalsh83@gmail.com>
Fri, 18 Jan 2019 09:37:01 -0500
changeset 511646 3a73b16bc4e12d5aa462094b2bf0ae2bb48491ad
parent 511645 7f05dbce0192f31647bea0c9c10618e983b80331
child 511647 27034f1841e934c7a463fdb2d5f6ff3875d22bd5
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdwalsh
bugs1520957
milestone66.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 1520957 - [release 119] Fix 7628 - Localize the XHR breakpoint list item labels (#7679). r=dwalsh
devtools/client/debugger/new/src/actions/breakpoints/index.js
devtools/client/debugger/new/src/utils/breakpoint/index.js
devtools/client/locales/en-US/debugger.properties
--- a/devtools/client/debugger/new/src/actions/breakpoints/index.js
+++ b/devtools/client/debugger/new/src/actions/breakpoints/index.js
@@ -475,17 +475,17 @@ export function updateXHRBreakpoint(
   return ({ dispatch, getState, client }: ThunkArgs) => {
     const xhrBreakpoints = getXHRBreakpoints(getState());
     const breakpoint = xhrBreakpoints[index];
 
     const updatedBreakpoint = {
       ...breakpoint,
       path,
       method,
-      text: `URL contains "${path}"`
+      text: L10N.getFormatStr("xhrBreakpoints.item.label", path)
     };
 
     return dispatch({
       type: "UPDATE_XHR_BREAKPOINT",
       breakpoint: updatedBreakpoint,
       index,
       [PROMISE]: Promise.all([
         client.removeXHRBreakpoint(breakpoint.path, breakpoint.method),
--- a/devtools/client/debugger/new/src/utils/breakpoint/index.js
+++ b/devtools/client/debugger/new/src/utils/breakpoint/index.js
@@ -161,17 +161,17 @@ export function createXHRBreakpoint(
   method: string,
   overrides?: Object = {}
 ) {
   const properties = {
     path,
     method,
     disabled: false,
     loading: false,
-    text: `URL contains "${path}"`
+    text: L10N.getFormatStr("xhrBreakpoints.item.label", path)
   };
 
   return { ...properties, ...overrides };
 }
 
 function createPendingLocation(location: PendingLocation) {
   const { sourceUrl, line, column } = location;
   return { sourceUrl, line, column };
--- a/devtools/client/locales/en-US/debugger.properties
+++ b/devtools/client/locales/en-US/debugger.properties
@@ -563,16 +563,19 @@ expressions.accesskey=e
 expressions.key=CmdOrCtrl+Shift+E
 expressions.remove.tooltip=Remove watch expression
 
 # LOCALIZATION NOTE (xhrBreakpoints.header): The pause on any XHR breakpoints headings
 xhrBreakpoints.header=XHR Breakpoints
 xhrBreakpoints.placeholder=Break when URL contains
 xhrBreakpoints.label=Add XHR breakpoint
 
+# LOCALIZATION NOTE (xhrBreakpoints.item.label): message displayed when reaching a breakpoint for XHR requests. %S is replaced by the path provided as condition for the breakpoint.
+xhrBreakpoints.item.label=URL contains ā€œ%Sā€
+
 # LOCALIZATION NOTE (pauseOnAnyXHR): The pause on any XHR checkbox description
 # when the debugger will pause on any XHR requests.
 pauseOnAnyXHR=Pause on any URL
 
 # LOCALIZATION NOTE (sourceTabs.closeTab): Editor source tab context menu item
 # for closing the selected tab below the mouse.
 sourceTabs.closeTab=Close tab
 sourceTabs.closeTab.accesskey=c