Bug 1507301 - Migrate about:sessionrestore and about:welcomeback to use Fluent for localization r=Gijs,flod,zbraniecki
authorQinghao_Jack_Song <songqing@msu.edu>
Mon, 19 Nov 2018 22:01:58 +0000
changeset 503618 dd005e464db2485688c6016388bd00861d31778a
parent 503617 a6969ea95a4a1d7efa02df583a4344ec71f968f1
child 503619 4b0deb3957f02c95d16af56590fc1a2e36318ffd
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs, flod, zbraniecki
bugs1507301
milestone65.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 1507301 - Migrate about:sessionrestore and about:welcomeback to use Fluent for localization r=Gijs,flod,zbraniecki Differential Revision: https://phabricator.services.mozilla.com/D11994
browser/components/migration/content/aboutWelcomeBack.xhtml
browser/components/sessionstore/content/aboutSessionRestore.js
browser/components/sessionstore/content/aboutSessionRestore.xhtml
browser/locales/en-US/browser/aboutSessionRestore.ftl
browser/locales/en-US/chrome/browser/aboutSessionRestore.dtd
browser/locales/jar.mn
python/l10n/fluent_migrations/bug_1507301_aboutSessionRestore.py
--- a/browser/components/migration/content/aboutWelcomeBack.xhtml
+++ b/browser/components/migration/content/aboutWelcomeBack.xhtml
@@ -2,81 +2,74 @@
 <!--
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 -->
 <!DOCTYPE html [
   <!ENTITY % htmlDTD PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
   %htmlDTD;
-  <!ENTITY % netErrorDTD SYSTEM "chrome://global/locale/netError.dtd">
-  %netErrorDTD;
-  <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
-  %globalDTD;
-  <!ENTITY % restorepageDTD SYSTEM "chrome://browser/locale/aboutSessionRestore.dtd">
-  %restorepageDTD;
 ]>
 
 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
   <head>
-    <title>&welcomeback2.tabtitle;</title>
+    <title data-l10n-id="welcome-back-tab-title"></title>
     <link rel="stylesheet" href="chrome://global/skin/in-content/info-pages.css" type="text/css" media="all"/>
     <link rel="stylesheet" href="chrome://browser/skin/aboutWelcomeBack.css" type="text/css" media="all"/>
     <link rel="icon" type="image/png" href="chrome://browser/skin/info.svg"/>
-
+    <link rel="localization" href="browser/aboutSessionRestore.ftl"/>
+    <link rel="localization" href="branding/brand.ftl"/>
     <script type="application/javascript" src="chrome://browser/content/aboutSessionRestore.js"/>
   </head>
 
-  <body dir="&locale.dir;">
+  <body>
 
     <div class="container">
 
       <div class="title">
-        <h1 class="title-text">&welcomeback2.pageTitle;</h1>
+        <h1 class="title-text" data-l10n-id="welcome-back-page-title"></h1>
       </div>
 
       <div class="description">
 
-        <p>&welcomeback2.pageInfo1;</p>
+        <p data-l10n-id="welcome-back-page-info"></p>
         <!-- Note a href in the anchor below is added by JS -->
-        <p>&welcomeback2.beforelink.pageInfo2;<a id="linkMoreTroubleshooting" target="_blank">&welcomeback2.link.pageInfo2;</a>&welcomeback2.afterlink.pageInfo2;</p>
+        <p data-l10n-id="welcome-back-page-info-link"><a id="linkMoreTroubleshooting" target="_blank" data-l10n-name="link-more"></a></p>
 
         <div>
           <div class="radioRestoreContainer">
             <input class="radioRestoreButton" id="radioRestoreAll" type="radio"
                    name="restore" checked="checked"/>
-            <label class="radioRestoreLabel" for="radioRestoreAll">&welcomeback2.restoreAll.label;</label>
+            <label class="radioRestoreLabel" for="radioRestoreAll" data-l10n-id="welcome-back-restore-all-label"></label>
           </div>
 
           <div class="radioRestoreContainer">
             <input class="radioRestoreButton" id="radioRestoreChoose" type="radio"
                    name="restore"/>
-            <label class="radioRestoreLabel" for="radioRestoreChoose">&welcomeback2.restoreSome.label;</label>
+            <label class="radioRestoreLabel" for="radioRestoreChoose" data-l10n-id="welcome-back-restore-some-label"></label>
           </div>
         </div>
       </div>
 
       <div class="tree-container">
         <xul:tree id="tabList" flex="1" seltype="single" hidecolumnpicker="true"
-                  onclick="onListClick(event);" onkeydown="onListKeyDown(event);"
-                  _window_label="&restorepage.windowLabel;">
+                  onclick="onListClick(event);" onkeydown="onListKeyDown(event);">
           <xul:treecols>
-            <xul:treecol cycler="true" id="restore" type="checkbox" label="&restorepage.restoreHeader;"/>
+            <xul:treecol cycler="true" id="restore" type="checkbox" data-l10n-id="restore-page-restore-header"/>
             <xul:splitter class="tree-splitter"/>
-            <xul:treecol primary="true" id="title" label="&restorepage.listHeader;" flex="1"/>
+            <xul:treecol primary="true" id="title" data-l10n-id="restore-page-list-header" flex="1"/>
           </xul:treecols>
           <xul:treechildren flex="1"/>
         </xul:tree>
       </div>
 
       <div class="button-container">
         <xul:button class="primary"
                     id="errorTryAgain"
-                    label="&welcomeback2.restoreButton;"
-                    accesskey="&welcomeback2.restoreButton.access;"
+                    data-l10n-id="welcome-back-restore-button"
                     oncommand="restoreSession();"/>
       </div>
 
       <input type="text" id="sessionData" style="display: none;"/>
 
     </div>
   </body>
 </html>
--- a/browser/components/sessionstore/content/aboutSessionRestore.js
+++ b/browser/components/sessionstore/content/aboutSessionRestore.js
@@ -64,29 +64,32 @@ window.onload = function() {
   document.getElementById("errorTryAgain").focus();
 };
 
 function isTreeViewVisible() {
   let tabList = document.querySelector(".tree-container");
   return tabList.hasAttribute("available");
 }
 
-function initTreeView() {
+async function initTreeView() {
   // If we aren't visible we initialize as we are made visible (and it's OK
   // to initialize multiple times)
   if (!isTreeViewVisible()) {
     return;
   }
   var tabList = document.getElementById("tabList");
-  var winLabel = tabList.getAttribute("_window_label");
-
+  let l10nIds = [];
+  for (let labelIndex = 0; labelIndex < gStateObject.windows.length; labelIndex++) {
+      l10nIds.push({id: "restore-page-window-label", args: { windowNumber: (labelIndex + 1)}});
+  }
+  let winLabels = await document.l10n.formatValues(l10nIds);
   gTreeData = [];
   gStateObject.windows.forEach(function(aWinData, aIx) {
     var winState = {
-      label: winLabel.replace("%S", (aIx + 1)),
+      label: winLabels[aIx],
       open: true,
       checked: true,
       ix: aIx,
     };
     winState.tabs = aWinData.tabs.map(function(aTabData) {
       var entry = aTabData.entries[aTabData.index - 1] || { url: "about:blank" };
       var iconURL = aTabData.image || null;
       // don't initiate a connection just to fetch a favicon (see bug 462863)
--- a/browser/components/sessionstore/content/aboutSessionRestore.xhtml
+++ b/browser/components/sessionstore/content/aboutSessionRestore.xhtml
@@ -2,89 +2,75 @@
 <!--
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 -->
 <!DOCTYPE html [
   <!ENTITY % htmlDTD PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
   %htmlDTD;
-  <!ENTITY % netErrorDTD SYSTEM "chrome://global/locale/netError.dtd">
-  %netErrorDTD;
-  <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
-  %globalDTD;
-  <!ENTITY % restorepageDTD SYSTEM "chrome://browser/locale/aboutSessionRestore.dtd">
-  %restorepageDTD;
 ]>
 
 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
   <head>
-    <title>&restorepage.tabtitle;</title>
+    <title data-l10n-id="restore-page-tab-title"></title>
     <link rel="stylesheet" href="chrome://global/skin/in-content/info-pages.css" type="text/css" media="all"/>
     <link rel="stylesheet" href="chrome://browser/skin/aboutSessionRestore.css" type="text/css" media="all"/>
     <link rel="icon" href="chrome://global/skin/icons/warning.svg"/>
-
+    <link rel="localization" href="browser/aboutSessionRestore.ftl"/>
+    <link rel="localization" href="branding/brand.ftl"/>
     <script type="application/javascript" src="chrome://browser/content/aboutSessionRestore.js"/>
   </head>
 
-  <body dir="&locale.dir;" class="illustrated">
+  <body class="illustrated">
 
     <div class="container restore-chosen">
       <div class="description-wrapper">
         <div class="title">
-          <h1 class="title-text">&restorepage.errorTitle2;</h1>
+          <h1 class="title-text" data-l10n-id="restore-page-error-title"></h1>
         </div>
         <div class="description">
-          <p>&restorepage.problemDesc2;</p>
+          <p data-l10n-id="restore-page-problem-desc"></p>
 
           <div id="errorLongDesc">
-            <p>&restorepage.tryThis2;</p>
+            <p data-l10n-id="restore-page-try-this"></p>
           </div>
         </div>
         <button id="tabsToggle" class="show-tabs">
-          <span id="showTabs">
-            &restorepage.showTabs;
-          </span>
-          <span id="hideTabs">
-            &restorepage.hideTabs;
-          </span>
+          <span id="showTabs" data-l10n-id="restore-page-show-tabs"></span>
+          <span id="hideTabs" data-l10n-id="restore-page-hide-tabs"></span>
         </button>
       </div>
       <div class="tree-container" available="true">
         <xul:tree id="tabList" seltype="single" hidecolumnpicker="true"
-              onclick="onListClick(event);" onkeydown="onListKeyDown(event);"
-              _window_label="&restorepage.windowLabel;">
+              onclick="onListClick(event);" onkeydown="onListKeyDown(event);">
           <xul:treecols>
-            <xul:treecol cycler="true" id="restore" type="checkbox" label="&restorepage.restoreHeader;"/>
+            <xul:treecol cycler="true" id="restore" type="checkbox" data-l10n-id="restore-page-restore-header"/>
             <xul:splitter class="tree-splitter"/>
-            <xul:treecol primary="true" id="title" label="&restorepage.listHeader;" flex="1"/>
+            <xul:treecol primary="true" id="title" data-l10n-id="restore-page-list-header" flex="1"/>
           </xul:treecols>
           <xul:treechildren flex="1"/>
         </xul:tree>
       </div>
       <div class="button-container">
 #ifdef XP_UNIX
         <xul:button id="errorCancel"
-                label="&restorepage.closeButton2;"
-                accesskey="&restorepage.close.access2;"
+                data-l10n-id="restore-page-close-button"
                 oncommand="startNewSession();"/>
         <xul:button class="primary"
                 id="errorTryAgain"
-                label="&restorepage.tryagainButton2;"
-                accesskey="&restorepage.restore.access2;"
+                data-l10n-id="restore-page-try-again-button"
                 oncommand="restoreSession();"/>
 #else
         <xul:button class="primary"
                 id="errorTryAgain"
-                label="&restorepage.tryagainButton2;"
-                accesskey="&restorepage.restore.access2;"
+                data-l10n-id="restore-page-try-again-button"
                 oncommand="restoreSession();"/>
         <xul:button id="errorCancel"
-                label="&restorepage.closeButton2;"
-                accesskey="&restorepage.close.access2;"
+                data-l10n-id="restore-page-close-button"
                 oncommand="startNewSession();"/>
 #endif
       </div>
       <!-- holds the session data for when the tab is closed -->
       <input type="text" id="sessionData" style="display: none;"/>
     </div>
 
   </body>
new file mode 100644
--- /dev/null
+++ b/browser/locales/en-US/browser/aboutSessionRestore.ftl
@@ -0,0 +1,50 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+restore-page-tab-title = Restore Session
+
+# The title is intended to be apologetic and disarming, expressing dismay
+# and regret that we are unable to restore the session for the user
+restore-page-error-title = Sorry. We’re having trouble getting your pages back.
+restore-page-problem-desc = We are having trouble restoring your last browsing session. Select Restore Session to try again.
+restore-page-try-this = Still not able to restore your session? Sometimes a tab is causing the issue. View previous tabs, remove the checkmark from the tabs you don’t need to recover, and then restore.
+
+restore-page-hide-tabs = Hide Previous Tabs
+restore-page-show-tabs = View Previous Tabs
+
+# When tabs are distributed across multiple windows, this message is used as a
+# header above the group of tabs for each window.
+#
+# Variables:
+#    $windowNumber: Progressive number associated to each window
+restore-page-window-label = Window { $windowNumber }
+
+restore-page-restore-header =
+    .label = Restore
+
+restore-page-list-header =
+    .label = Windows and Tabs
+
+restore-page-try-again-button =
+    .label = Restore Session
+    .accesskey = R
+
+restore-page-close-button =
+    .label = Start New Session
+    .accesskey = N
+
+## The following strings are used in about:welcomeback
+welcome-back-tab-title = Success!
+welcome-back-page-title = Success!
+welcome-back-page-info = { -brand-short-name } is ready to go.
+
+welcome-back-restore-button =
+    .label = Let’s go!
+    .accesskey = L
+
+welcome-back-restore-all-label = Restore all windows & tabs
+welcome-back-restore-some-label = Restore only the ones you want
+
+welcome-back-page-info-link = Your add-ons and customizations have been removed and your browser settings have been restored to their defaults. If this didn’t fix your issue, <a data-l10n-name="link-more">learn more about what you can do.</a>
+
deleted file mode 100644
--- a/browser/locales/en-US/chrome/browser/aboutSessionRestore.dtd
+++ /dev/null
@@ -1,52 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!ENTITY restorepage.tabtitle       "Restore Session">
-
-<!-- LOCALIZATION NOTE: The title is intended to be apologetic and disarming, expressing dismay
-     and regret that we are unable to restore the session for the user -->
-<!ENTITY restorepage.errorTitle2    "Sorry. We’re having trouble getting your pages back.">
-<!ENTITY restorepage.problemDesc2   "We are having trouble restoring your last browsing session. Select Restore Session to try again.">
-<!ENTITY restorepage.tryThis2       "Still not able to restore your session? Sometimes a tab is causing the issue. View previous tabs, remove the checkmark from the tabs you don’t need to recover, and then restore.">
-
-<!ENTITY restorepage.hideTabs       "Hide Previous Tabs">
-<!ENTITY restorepage.showTabs       "View Previous Tabs">
-
-<!ENTITY restorepage.tryagainButton2 "Restore Session">
-<!ENTITY restorepage.restore.access2 "R">
-<!ENTITY restorepage.closeButton2    "Start New Session">
-<!ENTITY restorepage.close.access2   "N">
-
-<!ENTITY restorepage.restoreHeader  "Restore">
-<!ENTITY restorepage.listHeader     "Windows and Tabs">
-<!-- LOCALIZATION NOTE: &#37;S will be replaced with a number. -->
-<!ENTITY restorepage.windowLabel    "Window &#37;S">
-
-
-<!-- LOCALIZATION NOTE: The following 'welcomeback2' strings are for about:welcomeback,
-     not for about:sessionstore -->
-
-<!ENTITY welcomeback2.restoreButton  "Let’s go!">
-<!ENTITY welcomeback2.restoreButton.access "L">
-
-<!ENTITY welcomeback2.tabtitle      "Success!">
-
-<!ENTITY welcomeback2.pageTitle     "Success!">
-<!ENTITY welcomeback2.pageInfo1     "&brandShortName; is ready to go.">
-
-<!ENTITY welcomeback2.restoreAll.label  "Restore all windows &amp; tabs">
-<!ENTITY welcomeback2.restoreSome.label "Restore only the ones you want">
-
-
-<!-- LOCALIZATION NOTE (welcomeback2.beforelink.pageInfo2,
-welcomeback2.afterlink.pageInfo2): these two string are used respectively
-before and after the the "learn more" link (welcomeback2.link.pageInfo2).
-Localizers can use one of them, or both, to better adapt this sentence to
-their language.
--->
-<!ENTITY welcomeback2.beforelink.pageInfo2  "Your add-ons and customizations have been removed and your browser settings have been restored to their defaults. If this didn’t fix your issue, ">
-<!ENTITY welcomeback2.afterlink.pageInfo2   "">
-
-<!ENTITY welcomeback2.link.pageInfo2        "learn more about what you can do.">
-
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -13,17 +13,16 @@
 @AB_CD@.jar:
 % locale browser @AB_CD@ %locale/browser/
 # bookmarks.html is produced by LOCALIZED_GENERATED_FILES.
     locale/browser/bookmarks.html                  (bookmarks.html)
     locale/browser/aboutPrivateBrowsing.dtd        (%chrome/browser/aboutPrivateBrowsing.dtd)
     locale/browser/aboutRobots.dtd                 (%chrome/browser/aboutRobots.dtd)
     locale/browser/accounts.properties             (%chrome/browser/accounts.properties)
     locale/browser/aboutSearchReset.dtd            (%chrome/browser/aboutSearchReset.dtd)
-    locale/browser/aboutSessionRestore.dtd         (%chrome/browser/aboutSessionRestore.dtd)
     locale/browser/aboutTabCrashed.dtd             (%chrome/browser/aboutTabCrashed.dtd)
     locale/browser/browser.dtd                     (%chrome/browser/browser.dtd)
     locale/browser/baseMenuOverlay.dtd             (%chrome/browser/baseMenuOverlay.dtd)
     locale/browser/browser.properties              (%chrome/browser/browser.properties)
     locale/browser/customizableui/customizableWidgets.properties (%chrome/browser/customizableui/customizableWidgets.properties)
     locale/browser/lightweightThemes.properties    (%chrome/browser/lightweightThemes.properties)
     locale/browser/uiDensity.properties            (%chrome/browser/uiDensity.properties)
     locale/browser/pageInfo.dtd                    (%chrome/browser/pageInfo.dtd)
new file mode 100644
--- /dev/null
+++ b/python/l10n/fluent_migrations/bug_1507301_aboutSessionRestore.py
@@ -0,0 +1,103 @@
+# coding=utf8
+
+# Any copyright is dedicated to the Public Domain.
+# http://creativecommons.org/publicdomain/zero/1.0/
+
+from __future__ import absolute_import
+import fluent.syntax.ast as FTL
+from fluent.migrate.helpers import transforms_from
+from fluent.migrate import COPY
+from fluent.migrate import CONCAT
+from fluent.migrate import REPLACE
+from fluent.migrate.helpers import TERM_REFERENCE
+from fluent.migrate.helpers import VARIABLE_REFERENCE
+
+def migrate(ctx):
+    """Bug 1507301 - Migrate about:sessionrestore and about:welcomeback to use Fluent for localization, part {index}."""
+
+    ctx.add_transforms(
+        "browser/browser/aboutSessionRestore.ftl",
+        "browser/browser/aboutSessionRestore.ftl",
+        transforms_from(
+"""
+restore-page-tab-title = { COPY("browser/chrome/browser/aboutSessionRestore.dtd", "restorepage.tabtitle") }
+restore-page-error-title = { COPY("browser/chrome/browser/aboutSessionRestore.dtd", "restorepage.errorTitle2") }
+restore-page-problem-desc = { COPY("browser/chrome/browser/aboutSessionRestore.dtd", "restorepage.problemDesc2") }
+restore-page-try-this = { COPY("browser/chrome/browser/aboutSessionRestore.dtd", "restorepage.tryThis2") }
+restore-page-hide-tabs = { COPY("browser/chrome/browser/aboutSessionRestore.dtd", "restorepage.hideTabs") }
+restore-page-show-tabs = { COPY("browser/chrome/browser/aboutSessionRestore.dtd", "restorepage.showTabs") }
+
+restore-page-restore-header =
+    .label = { COPY("browser/chrome/browser/aboutSessionRestore.dtd", "restorepage.restoreHeader") }
+restore-page-list-header =
+    .label = { COPY("browser/chrome/browser/aboutSessionRestore.dtd", "restorepage.listHeader") }
+
+restore-page-try-again-button =
+    .label = { COPY("browser/chrome/browser/aboutSessionRestore.dtd", "restorepage.tryagainButton2") }
+    .accesskey = { COPY("browser/chrome/browser/aboutSessionRestore.dtd", "restorepage.restore.access2") }
+
+restore-page-close-button =
+    .label = { COPY("browser/chrome/browser/aboutSessionRestore.dtd", "restorepage.closeButton2") }
+    .accesskey = { COPY("browser/chrome/browser/aboutSessionRestore.dtd", "restorepage.close.access2") }
+
+welcome-back-tab-title = { COPY("browser/chrome/browser/aboutSessionRestore.dtd", "welcomeback2.tabtitle") }
+welcome-back-page-title = { COPY("browser/chrome/browser/aboutSessionRestore.dtd", "welcomeback2.pageTitle") }
+
+welcome-back-restore-button =
+    .label = { COPY("browser/chrome/browser/aboutSessionRestore.dtd", "welcomeback2.restoreButton") }
+    .accesskey = { COPY("browser/chrome/browser/aboutSessionRestore.dtd", "welcomeback2.restoreButton.access") }
+
+welcome-back-restore-all-label = { COPY("browser/chrome/browser/aboutSessionRestore.dtd", "welcomeback2.restoreAll.label") }
+welcome-back-restore-some-label = { COPY("browser/chrome/browser/aboutSessionRestore.dtd", "welcomeback2.restoreSome.label") }
+""")
+)
+
+
+    ctx.add_transforms(
+        "browser/browser/aboutSessionRestore.ftl",
+        "browser/browser/aboutSessionRestore.ftl",
+        [
+        FTL.Message(
+            id=FTL.Identifier("welcome-back-page-info"),
+            value=REPLACE(
+                "browser/chrome/browser/aboutSessionRestore.dtd",
+                "welcomeback2.pageInfo1",
+                {
+                    "&brandShortName;": TERM_REFERENCE("-brand-short-name")
+                },
+            )
+        ),
+
+        FTL.Message(
+            id=FTL.Identifier("welcome-back-page-info-link"),
+            value=CONCAT(
+                COPY(
+                    "browser/chrome/browser/aboutSessionRestore.dtd",
+                    "welcomeback2.beforelink.pageInfo2"
+                ),
+                FTL.TextElement('<a data-l10n-name="link-more">'),
+                COPY(
+                    "browser/chrome/browser/aboutSessionRestore.dtd",
+                    "welcomeback2.link.pageInfo2"
+                ),
+                FTL.TextElement('</a>'),
+                COPY(
+                    "browser/chrome/browser/aboutSessionRestore.dtd",
+                    "welcomeback2.afterlink.pageInfo2"
+                ),
+            )
+        ),
+
+        FTL.Message(
+            id=FTL.Identifier("restore-page-window-label"),
+            value=REPLACE(
+                "browser/chrome/browser/aboutSessionRestore.dtd",
+                "restorepage.windowLabel",
+                {
+                    "%S": VARIABLE_REFERENCE("windowNumber"),
+                },
+            )
+        )
+    ]
+)
+