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 442296 6a8240b5c2871326cdbfa442741528bf213f7311
parent 442295 9a3a43e8743da65561b9ba4aa1f47777b6a61528
child 442297 5d7093d30ed3cb97eb09034826bfb64f4f080e0a
push id34904
push userarchaeopteryx@coole-files.de
push dateMon, 22 Oct 2018 17:25:25 +0000
treeherdermozilla-central@af3fd0a2c2e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1500823
milestone64.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 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");