Bug 1424682 - Migrate the chrome of Preferences to the new Localization API. draft
authorZibi Braniecki <zbraniecki@mozilla.com>
Mon, 18 Dec 2017 23:19:13 -0800
changeset 751526 2f1a4252c066
parent 751524 31d3ab8b658f
child 751529 371fdcbccc93
push id98001
push userbmo:gandalf@aviary.pl
push dateTue, 06 Feb 2018 15:48:43 +0000
bugs1424682
milestone60.0a1
Bug 1424682 - Migrate the chrome of Preferences to the new Localization API. MozReview-Commit-ID: ALnFUmnJMDB
browser/components/preferences/in-content/main.js
browser/components/preferences/in-content/preferences.js
browser/components/preferences/in-content/preferences.xul
browser/components/preferences/in-content/privacy.js
browser/locales/en-US/browser/preferences/preferences.ftl
browser/locales/en-US/chrome/browser/preferences/preferences.dtd
browser/locales/en-US/chrome/browser/preferences/preferences.properties
python/l10n/fluent_migrations/bug_1424682_preferences_chrome.py
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -656,17 +656,17 @@ var gMainPane = {
 
     const link = document.getElementById("browserContainersLearnMore");
     link.href = Services.urlFormatter.formatURLPref("app.support.baseURL") + "containers";
 
     document.getElementById("browserContainersbox").hidden = false;
     this.readBrowserContainersCheckbox();
   },
 
-  separateProfileModeChange() {
+  async separateProfileModeChange() {
     if (AppConstants.MOZ_DEV_EDITION) {
       function quitApp() {
         Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestartNotSameProfile);
       }
       function revertCheckbox(error) {
         separateProfileModeCheckbox.checked = !separateProfileModeCheckbox.checked;
         if (error) {
           Cu.reportError("Failed to toggle separate profile mode: " + error);
@@ -679,17 +679,17 @@ var gMainPane = {
         if (separateProfileModeCheckbox.checked) {
           OS.File.remove(ignoreSeparateProfile).then(onSuccess, revertCheckbox);
         } else {
           OS.File.writeAtomic(ignoreSeparateProfile, new Uint8Array()).then(onSuccess, revertCheckbox);
         }
       }
 
       let separateProfileModeCheckbox = document.getElementById("separateProfileMode");
-      let button_index = confirmRestartPrompt(separateProfileModeCheckbox.checked,
+      let button_index = await confirmRestartPrompt(separateProfileModeCheckbox.checked,
         0, false, true);
       switch (button_index) {
         case CONFIRM_RESTART_PROMPT_CANCEL:
           revertCheckbox();
           return;
         case CONFIRM_RESTART_PROMPT_RESTART_NOW:
           const Cc = Components.classes, Ci = Components.interfaces;
           let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"]
--- a/browser/components/preferences/in-content/preferences.js
+++ b/browser/components/preferences/in-content/preferences.js
@@ -329,50 +329,51 @@ function internalPrefCategoryNameToFrien
 // and "restart later" buttons and returns the index of the button chosen.
 // We can choose not to display the "restart later", or "revert" buttons,
 // altough the later still lets us revert by using the escape key.
 //
 // The constants are useful to interpret the return value of the function.
 const CONFIRM_RESTART_PROMPT_RESTART_NOW = 0;
 const CONFIRM_RESTART_PROMPT_CANCEL = 1;
 const CONFIRM_RESTART_PROMPT_RESTART_LATER = 2;
-function confirmRestartPrompt(aRestartToEnable, aDefaultButtonIndex,
-                              aWantRevertAsCancelButton,
-                              aWantRestartLaterButton) {
-  let brandName = document.getElementById("bundleBrand").getString("brandShortName");
-  let bundle = document.getElementById("bundlePreferences");
-  let msg = bundle.getFormattedString(aRestartToEnable ?
-                                      "featureEnableRequiresRestart" :
-                                      "featureDisableRequiresRestart",
-                                      [brandName]);
-  let title = bundle.getFormattedString("shouldRestartTitle", [brandName]);
+async function confirmRestartPrompt(aRestartToEnable, aDefaultButtonIndex,
+                                    aWantRevertAsCancelButton,
+                                    aWantRestartLaterButton) {
+  let [
+    msg, title, restartButtonText, noRestartButtonText, restartLaterButtonText
+  ] = await document.l10n.formatValues([
+    [aRestartToEnable ?
+      "feature-enable-requires-restart" : "feature-disable-requires-restart"],
+    ["should-restart-title"],
+    ["should-restart-ok"],
+    ["revert-no-restart-button"],
+    ["restart-later"],
+  ]);
 
   // Set up the first (index 0) button:
-  let button0Text = bundle.getFormattedString("okToRestartButton", [brandName]);
   let buttonFlags = (Services.prompt.BUTTON_POS_0 *
                      Services.prompt.BUTTON_TITLE_IS_STRING);
 
 
   // Set up the second (index 1) button:
-  let button1Text = null;
   if (aWantRevertAsCancelButton) {
-    button1Text = bundle.getString("revertNoRestartButton");
     buttonFlags += (Services.prompt.BUTTON_POS_1 *
                     Services.prompt.BUTTON_TITLE_IS_STRING);
   } else {
+    noRestartButtonText = null;
     buttonFlags += (Services.prompt.BUTTON_POS_1 *
                     Services.prompt.BUTTON_TITLE_CANCEL);
   }
 
   // Set up the third (index 2) button:
-  let button2Text = null;
   if (aWantRestartLaterButton) {
-    button2Text = bundle.getString("restartLater");
     buttonFlags += (Services.prompt.BUTTON_POS_2 *
                     Services.prompt.BUTTON_TITLE_IS_STRING);
+  } else {
+    restartLaterButtonText = null;
   }
 
   switch (aDefaultButtonIndex) {
     case 0:
       buttonFlags += Services.prompt.BUTTON_POS_0_DEFAULT;
       break;
     case 1:
       buttonFlags += Services.prompt.BUTTON_POS_1_DEFAULT;
@@ -380,18 +381,18 @@ function confirmRestartPrompt(aRestartTo
     case 2:
       buttonFlags += Services.prompt.BUTTON_POS_2_DEFAULT;
       break;
     default:
       break;
   }
 
   let buttonIndex = Services.prompt.confirmEx(window, title, msg, buttonFlags,
-                                              button0Text, button1Text, button2Text,
-                                              null, {});
+                                              restartButtonText, noRestartButtonText,
+                                              restartLaterButtonText, null, {});
 
   // If we have the second confirmation dialog for restart, see if the user
   // cancels out at that point.
   if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) {
     let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"]
                        .createInstance(Ci.nsISupportsPRBool);
     Services.obs.notifyObservers(cancelQuit, "quit-application-requested",
                                   "restart");
--- a/browser/components/preferences/in-content/preferences.xul
+++ b/browser/components/preferences/in-content/preferences.xul
@@ -84,22 +84,20 @@
 
 #ifdef XP_WIN
 #define USE_WIN_TITLE_STYLE
 #endif
 
 <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
       xmlns:html="http://www.w3.org/1999/xhtml"
       disablefastfind="true"
-#ifdef USE_WIN_TITLE_STYLE
-      title="&prefWindow.titleWin;">
-#else
-      title="&prefWindow.title;">
-#endif
+      data-l10n-id="pref-page"
+      data-l10n-attrs="title">
 
+  <link rel="localization" href="branding/brand.ftl"/>
   <link rel="localization" href="browser/preferences/main.ftl"/>
   <link rel="localization" href="browser/preferences/preferences.ftl"/>
   <script type="text/javascript" src="chrome://global/content/l10n.js"></script>
 
   <html:link rel="shortcut icon"
               href="chrome://browser/skin/settings.svg"/>
 
   <script type="application/javascript"
@@ -132,78 +130,87 @@
 
     <vbox class="navigation">
       <!-- category list -->
       <richlistbox id="categories">
         <richlistitem id="category-general"
                       class="category"
                       value="paneGeneral"
                       helpTopic="prefs-main"
-                      tooltiptext="&paneGeneral.title;"
+                      data-l10n-id="category-general"
+                      data-l10n-attrs="tooltiptext"
                       align="center">
           <image class="category-icon"/>
-          <label class="category-name" flex="1">&paneGeneral.title;</label>
+          <label class="category-name" flex="1" data-l10n-id="pane-general-title"></label>
         </richlistitem>
 
         <richlistitem id="category-search"
                       class="category"
                       value="paneSearch"
                       helpTopic="prefs-search"
-                      tooltiptext="&paneSearch.title;"
+                      data-l10n-id="category-search"
+                      data-l10n-attrs="tooltiptext"
                       align="center">
           <image class="category-icon"/>
-          <label class="category-name" flex="1">&paneSearch.title;</label>
+          <label class="category-name" flex="1" data-l10n-id="pane-search-title"></label>
         </richlistitem>
 
         <richlistitem id="category-containers"
                       class="category"
                       value="paneContainers"
                       helpTopic="prefs-containers"
                       hidden="true"/>
 
         <richlistitem id="category-privacy"
                       class="category"
                       value="panePrivacy"
                       helpTopic="prefs-privacy"
-                      tooltiptext="&panePrivacySecurity.title;"
+                      data-l10n-id="category-privacy"
+                      data-l10n-attrs="tooltiptext"
                       align="center">
           <image class="category-icon"/>
-          <label class="category-name" flex="1">&panePrivacySecurity.title;</label>
+          <label class="category-name" flex="1" data-l10n-id="pane-privacy-title"></label>
         </richlistitem>
 
         <richlistitem id="category-sync"
                       class="category"
                       value="paneSync"
                       helpTopic="prefs-weave"
-                      tooltiptext="&paneSync1.title;"
+                      data-l10n-id="category-sync"
+                      data-l10n-attrs="tooltiptext"
                       align="center">
           <image class="category-icon"/>
-          <label class="category-name" flex="1">&paneSync1.title;</label>
+          <label class="category-name" flex="1" data-l10n-id="pane-sync-title"></label>
         </richlistitem>
       </richlistbox>
 
       <spacer flex="1"/>
 
       <hbox class="help-button" pack="center">
         <label class="text-link">
           <hbox align="center">
-            <image class="help-icon"/><label class="help-label" flex="1">&helpButton2.label;</label>
+            <image class="help-icon"/>
+              <label class="help-label" flex="1" data-l10n-id="help-button-label"></label>
           </hbox>
         </label>
       </hbox>
     </vbox>
 
     <keyset>
-      <key key="&focusSearch1.key;" modifiers="accel" id="focusSearch1" oncommand="gSearchResultsPane.searchInput.focus();"/>
+      <key data-l10n-id="focus-search" modifiers="accel" id="focusSearch1" oncommand="gSearchResultsPane.searchInput.focus();"/>
     </keyset>
 
     <vbox class="main-content" flex="1" align="start">
       <vbox class="pane-container">
         <hbox class="search-container" pack="end">
-          <textbox type="search" id="searchInput" style="width: &searchField.width;" hidden="true" clickSelectsAll="true"/>
+          <textbox
+            type="search" id="searchInput"
+            data-l10n-id="search-field"
+            data-l10n-attrs="style"
+            hidden="true" clickSelectsAll="true"/>
         </hbox>
         <vbox id="mainPrefPane" class="prefpane prefwindow">
 #include searchResults.xul
 #include main.xul
 #include search.xul
 #include privacy.xul
 #include containers.xul
 #include sync.xul
@@ -217,17 +224,17 @@
     <groupbox class="dialogBox"
               orient="vertical"
               pack="end"
               role="dialog"
               aria-labelledby="dialogTitle">
       <caption flex="1" align="center">
         <label class="dialogTitle" flex="1"></label>
         <button class="dialogClose close-icon"
-                aria-label="&preferencesCloseButton.label;"/>
+                data-l10n-id="close-button"/>
       </caption>
       <browser class="dialogFrame"
                autoscroll="false"
                disablehistory="true"/>
     </groupbox>
   </vbox>
   </stack>
 </page>
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/in-content/privacy.js
@@ -719,17 +719,17 @@ var gPrivacyPane = {
     let mode = document.getElementById("historyMode");
     let autoStart = document.getElementById("privateBrowsingAutoStart");
     this._lastMode = mode.selectedIndex;
     this._lastCheckState = autoStart.hasAttribute("checked");
   },
 
   _lastMode: null,
   _lastCheckState: null,
-  updateAutostart() {
+  async updateAutostart() {
     let mode = document.getElementById("historyMode");
     let autoStart = document.getElementById("privateBrowsingAutoStart");
     let pref = Preferences.get("browser.privatebrowsing.autostart");
     if ((mode.value == "custom" && this._lastCheckState == autoStart.checked) ||
       (mode.value == "remember" && !this._lastCheckState) ||
       (mode.value == "dontremember" && this._lastCheckState)) {
       // These are all no-op changes, so we don't need to prompt.
       this._lastMode = mode.selectedIndex;
@@ -737,17 +737,17 @@ var gPrivacyPane = {
       return;
     }
 
     if (!this._shouldPromptForRestart) {
       // We're performing a revert. Just let it happen.
       return;
     }
 
-    let buttonIndex = confirmRestartPrompt(autoStart.checked, 1,
+    let buttonIndex = await confirmRestartPrompt(autoStart.checked, 1,
       true, false);
     if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) {
       pref.value = autoStart.hasAttribute("checked");
       Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
       return;
     }
 
     this._shouldPromptForRestart = false;
@@ -1623,18 +1623,18 @@ var gPrivacyPane = {
 
   _initA11yString() {
     let a11yLearnMoreLink =
       Services.urlFormatter.formatURLPref("accessibility.support.url");
     document.getElementById("a11yLearnMoreLink")
       .setAttribute("href", a11yLearnMoreLink);
   },
 
-  updateA11yPrefs(checked) {
-    let buttonIndex = confirmRestartPrompt(checked, 0, true, false);
+  async updateA11yPrefs(checked) {
+    let buttonIndex = await confirmRestartPrompt(checked, 0, true, false);
     if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) {
       Services.prefs.setIntPref("accessibility.force_disabled", checked ? 1 : 0);
       Services.telemetry.scalarSet("preferences.prevent_accessibility_services", true);
       Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
     }
 
     // Revert the checkbox in case we didn't quit
     document.getElementById("a11yPrivacyCheckbox").checked = !checked;
--- a/browser/locales/en-US/browser/preferences/preferences.ftl
+++ b/browser/locales/en-US/browser/preferences/preferences.ftl
@@ -1,10 +1,59 @@
-// 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/.
+# 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/.
 
 do-not-track-description = Send websites a “Do Not Track” signal that you don’t want to be tracked
 do-not-track-learn-more = Learn more
-do-not-track-option-default
+do-not-track-option-default =
     .label = Only when using Tracking Protection
-do-not-track-option-always
+do-not-track-option-always =
     .label = Always
+
+pref-page =
+    .title = { PLATFORM() ->
+            [windows] Options
+           *[other] Preferences
+        }
+
+# This is used to determine the width of the search field in about:preferences,
+# in order to make the entire placeholder string visible
+#
+# Notice: The value of the `.style` attribute is a CSS string, and the `min-width`
+# is the name of the CSS property. It is intended only to adjust the element's width.
+# Do not translate.
+search-field =
+    .style = min-width: 15.4em
+
+pane-general-title = General
+category-general =
+    .tooltiptext = { pane-general-title }
+
+pane-search-title = Search
+category-search =
+    .tooltiptext = { pane-search-title }
+
+pane-privacy-title = Privacy & Security
+category-privacy =
+    .tooltiptext = { pane-privacy-title }
+
+# The word "account" can be translated, do not translate or transliterate "Firefox".
+pane-sync-title = Firefox Account
+category-sync =
+    .tooltiptext = { pane-sync-title }
+
+help-button-label = { -brand-short-name } Support
+
+focus-search =
+    .key = f
+
+close-button =
+    .aria-label = Close
+
+## Browser Restart Dialog
+
+feature-enable-requires-restart = { -brand-short-name } must restart to enable this feature.
+feature-disable-requires-restart = { -brand-short-name } must restart to disable this feature.
+should-restart-title = Restart { -brand-short-name }
+should-restart-ok = Restart { -brand-short-name } now
+revert-no-restart-button = Revert
+restart-later = Restart Later
--- a/browser/locales/en-US/chrome/browser/preferences/preferences.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/preferences.dtd
@@ -1,36 +1,15 @@
 <!-- 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  prefWindow.titleWin     "Options">
-<!ENTITY  prefWindow.title        "Preferences">
-<!-- LOCALIZATION NOTE (prefWindow.titleGNOME): This is not used for in-content preferences -->
-<!ENTITY  prefWindow.titleGNOME   "&brandShortName; Preferences">
-<!-- When making changes to prefWindow.styleWin test both Windows Classic and
-     Luna since widget heights are different based on the OS theme -->
-<!ENTITY  prefWinMinSize.styleWin2      "width: 42em; min-height: 37.5em;">
-<!ENTITY  prefWinMinSize.styleMac       "width: 47em; min-height: 40em;">
-<!ENTITY  prefWinMinSize.styleGNOME     "width: 45.5em; min-height: 40.5em;">
-
-<!-- LOCALIZATION NOTE: (searchField.width): This is used to determine the width
-     of the search field in about:preferences, in order to make entire placeholder
-     string visible -->
-<!ENTITY  searchField.width             "15.4em">
-
 <!ENTITY  paneSearchResults.title       "Search Results">
 <!ENTITY  paneGeneral.title             "General">
 <!ENTITY  paneSearch.title              "Search">
-<!ENTITY  paneFilesApplications.title   "Files &amp; Applications">
-<!ENTITY  panePrivacySecurity.title     "Privacy &amp; Security">
 <!ENTITY  paneContainers.title          "Container Tabs">
-<!ENTITY  paneUpdates.title             "Updates">
 
 <!ENTITY  languageAndAppearance.label   "Language and Appearance">
 <!ENTITY  filesAndApplications.label    "Files and Applications">
 <!ENTITY  browserPrivacy.label          "Browser Privacy">
 
 <!-- LOCALIZATION NOTE (paneSync1.title): This should match syncBrand.fxAccount.label in ../syncBrand.dtd -->
 <!ENTITY  paneSync1.title          "Firefox Account">
-
-<!ENTITY  helpButton2.label        "&brandShortName; Support">
--- a/browser/locales/en-US/chrome/browser/preferences/preferences.properties
+++ b/browser/locales/en-US/chrome/browser/preferences/preferences.properties
@@ -219,26 +219,16 @@ spaceAlert.over5GB.message=%S is running
 # - On Windows Preferences is called Options
 # - %S = brandShortName
 spaceAlert.over5GB.messageWin=%S is running out of disk space. Website contents may not display properly. You can clear stored site data in Options > Advanced > Site Data.
 spaceAlert.under5GB.okButton.label=OK, Got it
 spaceAlert.under5GB.okButton.accesskey=K
 # LOCALIZATION NOTE (spaceAlert.under5GB.message): %S = brandShortName
 spaceAlert.under5GB.message=%S is running out of disk space. Website contents may not display properly. Visit “Learn More” to optimize your disk usage for better browsing experience.
 
-# LOCALIZATION NOTE (featureEnableRequiresRestart, featureDisableRequiresRestart, restartTitle): %S = brandShortName
-featureEnableRequiresRestart=%S must restart to enable this feature.
-featureDisableRequiresRestart=%S must restart to disable this feature.
-shouldRestartTitle=Restart %S
-okToRestartButton=Restart %S now
-revertNoRestartButton=Revert
-
-restartNow=Restart Now
-restartLater=Restart Later
-
 disableContainersAlertTitle=Close All Container Tabs?
 
 # LOCALIZATION NOTE (disableContainersMsg): Semi-colon list of plural forms.
 # See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
 # #S is the number of container tabs
 disableContainersMsg=If you disable Container Tabs now, #S container tab will be closed. Are you sure you want to disable Container Tabs?;If you disable Container Tabs now, #S container tabs will be closed. Are you sure you want to disable Container Tabs?
 
 # LOCALIZATION NOTE (disableContainersOkButton): Semi-colon list of plural forms.
new file mode 100644
--- /dev/null
+++ b/python/l10n/fluent_migrations/bug_1424682_preferences_chrome.py
@@ -0,0 +1,233 @@
+# 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 MESSAGE_REFERENCE, EXTERNAL_ARGUMENT
+from fluent.migrate.transforms import REPLACE
+from fluent.migrate import COPY, CONCAT
+
+
+def migrate(ctx):
+    """Bug 1424682 - Migrate the chrome of Preferences to Fluent, part {index}."""
+
+    ctx.add_transforms(
+        'browser/browser/preferences/preferences.ftl',
+        'browser/locales/en-US/browser/preferences/preferences.ftl',
+        [
+            FTL.Message(
+                id=FTL.Identifier('pref-page'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('title'),
+                        FTL.Pattern(
+                            elements=[
+                                FTL.Placeable(
+                                    expression=FTL.SelectExpression(
+                                        expression=FTL.CallExpression(
+                                            callee=FTL.Identifier('PLATFORM')
+                                        ),
+                                        variants=[
+                                            FTL.Variant(
+                                                key=FTL.VariantName('windows'),
+                                                default=False,
+                                                value=COPY(
+                                                    'browser/chrome/browser/preferences/preferences.dtd',
+                                                    'prefWindow.titleWin'
+                                                )
+                                            ),
+                                            FTL.Variant(
+                                                key=FTL.VariantName('other'),
+                                                default=True,
+                                                value=COPY(
+                                                    'browser/chrome/browser/preferences/preferences.dtd',
+                                                    'prefWindow.title'
+                                                )
+                                            )
+                                        ]
+                                    )
+                                )
+                            ]
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-field'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('style'),
+                        CONCAT(
+                            FTL.TextElement('min-width: '),
+                            COPY(
+                                'browser/chrome/browser/preferences/preferences.dtd',
+                                'searchField.width'
+                            )
+                        ),
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('pane-general-title'),
+                value=COPY(
+                    'browser/chrome/browser/preferences/preferences.dtd',
+                    'paneGeneral.title'
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier('category-general'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('tooltiptext'),
+                        CONCAT(
+                            MESSAGE_REFERENCE('pane-general-title')
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('pane-search-title'),
+                value=COPY(
+                    'browser/chrome/browser/preferences/preferences.dtd',
+                    'paneSearch.title'
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier('category-search'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('tooltiptext'),
+                        CONCAT(
+                            MESSAGE_REFERENCE('pane-search-title')
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('pane-privacy-title'),
+                value=COPY(
+                    'browser/chrome/browser/preferences/preferences.dtd',
+                    'panePrivacySecurity.title'
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier('category-privacy'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('tooltiptext'),
+                        CONCAT(
+                            MESSAGE_REFERENCE('pane-privacy-title')
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('pane-sync-title'),
+                value=COPY(
+                    'browser/chrome/browser/preferences/preferences.dtd',
+                    'paneSync1.title'
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier('category-sync'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('tooltiptext'),
+                        CONCAT(
+                            MESSAGE_REFERENCE('pane-sync-title')
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('help-button-label'),
+                value=REPLACE(
+                    'browser/chrome/browser/preferences/preferences.dtd',
+                    'helpButton2.label',
+                    {
+                        '&brandShortName;' : MESSAGE_REFERENCE('-brand-short-name')
+                    }
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier('focus-search'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('key'),
+                        COPY(
+                            'toolkit/chrome/passwordmgr/passwordManager.dtd',
+                            'focusSearch1.key'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('close-button'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('aria-label'),
+                        COPY(
+                            'toolkit/chrome/global/preferences.dtd',
+                            'preferencesCloseButton.label'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('feature-enable-requires-restart'),
+                value=REPLACE(
+                    'browser/chrome/browser/preferences/preferences.properties',
+                    'featureEnableRequiresRestart',
+                    {
+                        '%S' : MESSAGE_REFERENCE('-brand-short-name')
+                    }
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier('feature-disable-requires-restart'),
+                value=REPLACE(
+                    'browser/chrome/browser/preferences/preferences.properties',
+                    'featureDisableRequiresRestart',
+                    {
+                        '%S' : MESSAGE_REFERENCE('-brand-short-name')
+                    }
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier('should-restart-title'),
+                value=REPLACE(
+                    'browser/chrome/browser/preferences/preferences.properties',
+                    'shouldRestartTitle',
+                    {
+                        '%S' : MESSAGE_REFERENCE('-brand-short-name')
+                    }
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier('should-restart-ok'),
+                value=REPLACE(
+                    'browser/chrome/browser/preferences/preferences.properties',
+                    'okToRestartButton',
+                    {
+                        '%S' : MESSAGE_REFERENCE('-brand-short-name')
+                    }
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier('revert-no-restart-button'),
+                value=COPY(
+                    'browser/chrome/browser/preferences/preferences.properties',
+                    'revertNoRestartButton',
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier('restart-later'),
+                value=COPY(
+                    'browser/chrome/browser/preferences/preferences.properties',
+                    'restartLater',
+                )
+            ),
+        ]
+    )