Bug 1500823 - Dialog displayed when closing multiple windows shows unreplaced %1$S placeholder r=Gijs
authorFrancesco Lodolo (:flod) <flod@lodolo.net>
Mon, 22 Oct 2018 08:38:19 +0000
changeset 490664 6a8240b5c2871326cdbfa442741528bf213f7311
parent 490663 9a3a43e8743da65561b9ba4aa1f47777b6a61528
child 490665 5d7093d30ed3cb97eb09034826bfb64f4f080e0a
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersGijs
bugs1500823
milestone64.0a1
Bug 1500823 - Dialog displayed when closing multiple windows shows unreplaced %1$S placeholder r=Gijs 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");