Bug 1500823 - Dialog displayed when closing multiple windows shows unreplaced %1$S placeholder. r=Gijs, a=RyanVM
authorFrancesco Lodolo (:flod) <flod@lodolo.net>
Mon, 22 Oct 2018 08:38:19 +0000
changeset 500818 f758524d2acdb8e4ead7a01148cffc0c07e19e40
parent 500817 950224b33640f01bd3882946127d947d7089ef2e
child 500819 c7d13f90ff314656131df828dc1c792b55cc379a
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs, RyanVM
bugs1500823
milestone64.0
Bug 1500823 - Dialog displayed when closing multiple windows shows unreplaced %1$S placeholder. r=Gijs, a=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D9361
browser/components/nsBrowserGlue.js
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1777,17 +1777,17 @@ BrowserGlue.prototype = {
       aCancelQuit.data =
         !win.gBrowser.warnAboutClosingTabs(pagecount, win.gBrowser.closingTabsEnum.ALL);
     } else {
       // More than 1 window. Compose our own message.
       let tabSubstring = gTabbrowserBundle.GetStringFromName("tabs.closeWarningMultipleWindowsTabSnippet");
       tabSubstring = PluralForm.get(pagecount, tabSubstring).replace(/#1/, pagecount);
       let windowString = gTabbrowserBundle.GetStringFromName("tabs.closeWarningMultipleWindows");
       windowString = PluralForm.get(windowcount, windowString).replace(/#1/, windowcount);
-      windowString = windowString.replace(/%(?:1$)?S/i, tabSubstring);
+      windowString = windowString.replace(/%(?:1\$)?S/i, tabSubstring);
       aCancelQuit.data =
         !win.gBrowser.warnAboutClosingTabs(pagecount, win.gBrowser.closingTabsEnum.ALL, windowString);
     }
   },
 
   _showUpdateNotification: function BG__showUpdateNotification() {
     Services.prefs.clearUserPref("app.update.postupdate");