Bug 1415733 - Migrate the "Search" section of Preferences to the new Localization API. r?flod,gijs draft
authorZibi Braniecki <zbraniecki@mozilla.com>
Mon, 12 Mar 2018 17:17:13 -0700
changeset 768164 750c610678a0ae00a4513e3d32d472650b4031bb
parent 768091 b5ab0effd07fb6065061980908db7ce3d734b710
child 768177 304af576705336bab9d4c6c00de0061c95e45f8f
push id102810
push userbmo:gandalf@aviary.pl
push dateThu, 15 Mar 2018 18:34:51 +0000
reviewersflod, gijs
bugs1415733
milestone61.0a1
Bug 1415733 - Migrate the "Search" section of Preferences to the new Localization API. r?flod,gijs MozReview-Commit-ID: ltXNOkdnOV
browser/components/preferences/in-content/preferences.xul
browser/components/preferences/in-content/search.js
browser/components/preferences/in-content/search.xul
browser/locales/en-US/browser/preferences/preferences.ftl
browser/locales/en-US/chrome/browser/engineManager.properties
browser/locales/en-US/chrome/browser/preferences/preferences.dtd
browser/locales/en-US/chrome/browser/preferences/search.dtd
browser/locales/jar.mn
python/l10n/fluent_migrations/bug_1415733_preferences_search.py
--- a/browser/components/preferences/in-content/preferences.xul
+++ b/browser/components/preferences/in-content/preferences.xul
@@ -32,17 +32,16 @@
 <!ENTITY % certManagerDTD SYSTEM "chrome://pippki/locale/certManager.dtd">
 <!ENTITY % deviceManangerDTD SYSTEM "chrome://pippki/locale/deviceManager.dtd">
 <!ENTITY % connectionDTD SYSTEM "chrome://browser/locale/preferences/connection.dtd">
 <!ENTITY % siteDataSettingsDTD SYSTEM
   "chrome://browser/locale/preferences/siteDataSettings.dtd" >
 <!ENTITY % clearSiteDataDTD SYSTEM
   "chrome://browser/locale/preferences/clearSiteData.dtd" >
 <!ENTITY % privacyDTD SYSTEM "chrome://browser/locale/preferences/privacy.dtd">
-<!ENTITY % searchDTD SYSTEM "chrome://browser/locale/preferences/search.dtd">
 <!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
 <!ENTITY % syncDTD SYSTEM "chrome://browser/locale/preferences/sync.dtd">
 <!ENTITY % securityDTD SYSTEM
   "chrome://browser/locale/preferences/security.dtd">
 <!ENTITY % containersDTD SYSTEM
   "chrome://browser/locale/preferences/containers.dtd">
 <!ENTITY % sanitizeDTD SYSTEM "chrome://browser/locale/sanitize.dtd">
 <!ENTITY % mainDTD SYSTEM "chrome://browser/locale/preferences/main.dtd">
@@ -63,17 +62,16 @@
 %passwordManagerDTD;
 %historyDTD;
 %certManagerDTD;
 %deviceManangerDTD;
 %connectionDTD;
 %siteDataSettingsDTD;
 %clearSiteDataDTD;
 %privacyDTD;
-%searchDTD;
 %syncBrandDTD;
 %syncDTD;
 %securityDTD;
 %containersDTD;
 %sanitizeDTD;
 %mainDTD;
 %aboutHomeDTD;
 %contentDTD;
--- a/browser/components/preferences/in-content/search.js
+++ b/browser/components/preferences/in-content/search.js
@@ -351,22 +351,26 @@ var gSearchPane = {
           eduplicate = true;
           dupName = engine.name;
           break;
         }
       }
 
       // Notify the user if they have chosen an existing engine/bookmark keyword
       if (eduplicate || bduplicate) {
-        let strings = document.getElementById("engineManagerBundle");
-        let dtitle = strings.getString("duplicateTitle");
-        let bmsg = strings.getString("duplicateBookmarkMsg");
-        let emsg = strings.getFormattedString("duplicateEngineMsg", [dupName]);
+        let msgids = [["search-keyword-warning-title"]];
+        if (eduplicate) {
+          msgids.push(["search-keyword-warning-engine", { name: dupName }]);
+        } else {
+          msgids.push(["search-keyword-warning-bookmark"]);
+        }
 
-        Services.prompt.alert(window, dtitle, eduplicate ? emsg : bmsg);
+        let [dtitle, msg] = await document.l10n.formatValues(msgids);
+
+        Services.prompt.alert(window, dtitle, msg);
         return false;
       }
     }
 
     gEngineView._engineStore.changeEngine(aEngine, "alias", keyword);
     gEngineView.invalidate();
     return true;
   },
--- a/browser/components/preferences/in-content/search.xul
+++ b/browser/components/preferences/in-content/search.xul
@@ -1,88 +1,82 @@
     <script type="application/javascript"
             src="chrome://browser/content/preferences/in-content/search.js"/>
 
-    <stringbundle id="engineManagerBundle" src="chrome://browser/locale/engineManager.properties"/>
-
     <hbox id="searchCategory"
           class="subcategory"
           hidden="true"
           data-category="paneSearch">
-      <label class="header-name" flex="1">&paneSearch.title;</label>
+      <label class="header-name" flex="1" data-l10n-id="pane-search-title" />
     </hbox>
 
     <groupbox id="searchbarGroup" data-category="paneSearch">
-      <caption><label id="searchbarLabel">&searchBar.label;</label></caption>
+      <caption><label id="searchbarLabel" data-l10n-id="search-bar-header" /></caption>
       <radiogroup id="searchBarVisibleGroup" aria-labelledby="searchbarLabel" preference="browser.search.widget.inNavBar">
-        <radio id="searchBarHiddenRadio" value="false" label="&searchBar.hidden.label;"/>
+        <radio id="searchBarHiddenRadio" value="false" data-l10n-id="search-bar-hidden"/>
         <image class="searchBarImage searchBarHiddenImage" role="presentation"/>
-        <radio id="searchBarShownRadio" value="true" label="&searchBar.shown.label;"/>
+        <radio id="searchBarShownRadio" value="true" data-l10n-id="search-bar-shown"/>
         <image class="searchBarImage searchBarShownImage" role="presentation"/>
       </radiogroup>
     </groupbox>
 
     <!-- Default Search Engine -->
     <groupbox id="defaultEngineGroup" data-category="paneSearch">
-      <caption><label>&defaultSearchEngine.label;</label></caption>
-      <description>&chooseYourDefaultSearchEngine2.label;</description>
+      <caption><label data-l10n-id="search-engine-default-header" /></caption>
+      <description data-l10n-id="search-engine-default-desc" />
 
       <hbox id="browserDefaultSearchExtensionContent" align="center" hidden="true">
         <description control="disableDefaultSearchExtension" flex="1"/>
       </hbox>
 
       <hbox>
         <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
         <hbox>
           <menulist id="defaultEngine">
             <menupopup/>
           </menulist>
         </hbox>
       </hbox>
 
       <checkbox id="suggestionsInSearchFieldsCheckbox"
-                label="&provideSearchSuggestions.label;"
-                accesskey="&provideSearchSuggestions.accesskey;"
+                data-l10n-id="search-suggestions-option"
                 preference="browser.search.suggest.enabled"/>
       <vbox class="indent">
-        <checkbox id="urlBarSuggestion" label="&showURLBarSuggestions2.label;"
-                  accesskey="&showURLBarSuggestions2.accesskey;"/>
+        <checkbox id="urlBarSuggestion" data-l10n-id="search-show-suggestions-url-bar-option" />
         <checkbox id="showSearchSuggestionsFirstCheckbox"
-                  label="&showSearchSuggestionsAboveHistory.label;"/>
+                  data-l10n-id="search-show-suggestions-above-history-option"/>
         <hbox id="urlBarSuggestionPermanentPBLabel"
               align="center" class="indent">
-          <label flex="1">&urlBarSuggestionsPermanentPB.label;</label>
+          <label flex="1" data-l10n-id="search-suggestions-cant-show" />
         </hbox>
       </vbox>
     </groupbox>
 
     <groupbox id="oneClickSearchProvidersGroup" data-category="paneSearch">
-      <caption><label>&oneClickSearchEngines.label;</label></caption>
-      <description>&chooseWhichOneToDisplay2.label;</description>
+      <caption><label data-l10n-id="search-one-click-header" /></caption>
+      <description data-l10n-id="search-one-click-desc" />
 
       <tree id="engineList" flex="1" rows="8" hidecolumnpicker="true" editable="true"
             seltype="single" allowunderflowscroll="true">
         <treechildren id="engineChildren" flex="1"/>
         <treecols>
           <treecol id="engineShown" type="checkbox" editable="true" sortable="false"/>
-          <treecol id="engineName" flex="4" label="&engineNameColumn.label;" sortable="false"/>
-          <treecol id="engineKeyword" flex="1" label="&engineKeywordColumn.label;" editable="true"
+          <treecol id="engineName" flex="4" data-l10n-id="search-choose-engine-column" sortable="false"/>
+          <treecol id="engineKeyword" flex="1" data-l10n-id="search-choose-keyword-column" editable="true"
                    sortable="false"/>
         </treecols>
       </tree>
 
       <hbox>
         <button id="restoreDefaultSearchEngines"
-                label="&restoreDefaultSearchEngines.label;"
-                accesskey="&restoreDefaultSearchEngines.accesskey;"
+                data-l10n-id="search-restore-default"
                 />
         <spacer flex="1"/>
         <button id="removeEngineButton"
                 class="searchEngineAction"
-                label="&removeEngine.label;"
-                accesskey="&removeEngine.accesskey;"
+                data-l10n-id="search-remove-engine"
                 disabled="true"
                 />
       </hbox>
       <hbox id="addEnginesBox" pack="start">
-        <label id="addEngines" class="text-link">&findMoreSearchEngines.label;</label>
+        <label id="addEngines" class="text-link" data-l10n-id="search-find-more-link"></label>
       </hbox>
     </groupbox>
--- a/browser/locales/en-US/browser/preferences/preferences.ftl
+++ b/browser/locales/en-US/browser/preferences/preferences.ftl
@@ -372,8 +372,64 @@ browsing-search-on-start-typing =
 
 network-proxy-title = Network Proxy
 
 network-proxy-connection-learn-more = Learn More
 
 network-proxy-connection-settings =
     .label = Settings…
     .accesskey = e
+
+## Search Section
+
+search-bar-header = Search Bar
+search-bar-hidden =
+    .label = Use the address bar for search and navigation
+search-bar-shown =
+    .label = Add search bar in toolbar
+
+search-engine-default-header = Default Search Engine
+search-engine-default-desc = Choose the default search engine to use in the address bar and search bar.
+
+search-suggestions-option =
+    .label = Provide search suggestions
+    .accesskey = s
+
+search-show-suggestions-url-bar-option =
+    .label = Show search suggestions in address bar results
+    .accesskey = l
+
+# This string describes what the user will observe when the system
+# prioritizes search suggestions over browsing history in the results
+# that extend down from the address bar. In the original English string,
+# "ahead" refers to location (appearing most proximate to), not time
+# (appearing before).
+search-show-suggestions-above-history-option =
+    .label = Show search suggestions ahead of browsing history in address bar results
+
+search-suggestions-cant-show = Search suggestions will not be shown in location bar results because you have configured { -brand-short-name } to never remember history.
+
+search-one-click-header = One-Click Search Engines
+
+search-one-click-desc = Choose the alternative search engines that appear below the address bar and search bar when you start to enter a keyword.
+
+search-choose-engine-column =
+    .label = Search Engine
+search-choose-keyword-column =
+    .label = Keyword
+
+search-restore-default =
+    .label = Restore Default Search Engines
+    .accesskey = D
+
+search-remove-engine =
+    .label = Remove
+    .accesskey = R
+
+search-find-more-link = Find more search engines
+
+# This warning is displayed when the chosen keyword is already in use
+# ('Duplicate' is an adjective)
+search-keyword-warning-title = Duplicate Keyword
+# Variables:
+#   $name (String) - Name of a search engine.
+search-keyword-warning-engine = You have chosen a keyword that is currently in use by “{ $name }”. Please select another.
+search-keyword-warning-bookmark = You have chosen a keyword that is currently in use by a bookmark. Please select another.
deleted file mode 100644
--- a/browser/locales/en-US/chrome/browser/engineManager.properties
+++ /dev/null
@@ -1,7 +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/.
-
-duplicateTitle=Duplicate Keyword
-duplicateEngineMsg=You have chosen a keyword that is currently in use by “%S”. Please select another.
-duplicateBookmarkMsg=You have chosen a keyword that is currently in use by a bookmark. Please select another.
--- a/browser/locales/en-US/chrome/browser/preferences/preferences.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/preferences.dtd
@@ -1,11 +1,10 @@
 <!-- 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  paneSearch.title              "Search">
 <!ENTITY  paneContainers.title          "Container Tabs">
 
 <!ENTITY  browserPrivacy.label          "Browser Privacy">
 
 <!-- LOCALIZATION NOTE (paneSync1.title): This should match syncBrand.fxAccount.label in ../syncBrand.dtd -->
 <!ENTITY  paneSync1.title          "Firefox Account">
deleted file mode 100644
--- a/browser/locales/en-US/chrome/browser/preferences/search.dtd
+++ /dev/null
@@ -1,41 +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 searchBar.label                       "Search Bar">
-
-<!ENTITY searchBar.hidden.label                "Use the address bar for search and navigation">
-<!ENTITY searchBar.shown.label                 "Add search bar in toolbar">
-
-<!-- LOCALIZATION NOTE (showSearchSuggestionsAboveHistory.label): This string
-     describes what the user will observe when the system prioritizes search
-     suggestions over browsing history in the results that extend down from the
-     address bar. In the original English string, "ahead" refers to location
-     (appearing most proximate to), not time (appearing before). -->
-<!ENTITY showSearchSuggestionsAboveHistory.label "Show search suggestions ahead of browsing history in address bar results">
-
-<!ENTITY defaultSearchEngine.label             "Default Search Engine">
-
-<!ENTITY chooseYourDefaultSearchEngine2.label   "Choose the default search engine to use in the address bar and search bar.">
-
-<!ENTITY provideSearchSuggestions.label        "Provide search suggestions">
-<!ENTITY provideSearchSuggestions.accesskey    "s">
-
-<!ENTITY showURLBarSuggestions2.label           "Show search suggestions in address bar results">
-<!ENTITY showURLBarSuggestions2.accesskey       "l">
-<!ENTITY urlBarSuggestionsPermanentPB.label    "Search suggestions will not be shown in location bar results because you have configured &brandShortName; to never remember history.">
-
-<!ENTITY oneClickSearchEngines.label           "One-Click Search Engines">
-
-<!ENTITY chooseWhichOneToDisplay2.label         "Choose the alternative search engines that appear below the address bar and search bar when you start to enter a keyword.">
-
-<!ENTITY engineNameColumn.label                "Search Engine">
-<!ENTITY engineKeywordColumn.label             "Keyword">
-
-<!ENTITY restoreDefaultSearchEngines.label     "Restore Default Search Engines">
-<!ENTITY restoreDefaultSearchEngines.accesskey "d">
-
-<!ENTITY removeEngine.label                    "Remove">
-<!ENTITY removeEngine.accesskey                "r">
-
-<!ENTITY findMoreSearchEngines.label           "Find more search engines">
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -33,17 +33,16 @@
     locale/browser/pageInfo.dtd                    (%chrome/browser/pageInfo.dtd)
     locale/browser/pageInfo.properties             (%chrome/browser/pageInfo.properties)
     locale/browser/quitDialog.properties           (%chrome/browser/quitDialog.properties)
     locale/browser/safeMode.dtd                    (%chrome/browser/safeMode.dtd)
     locale/browser/sanitize.dtd                    (%chrome/browser/sanitize.dtd)
     locale/browser/search.properties               (%chrome/browser/search.properties)
     locale/browser/siteData.properties             (%chrome/browser/siteData.properties)
     locale/browser/sitePermissions.properties      (%chrome/browser/sitePermissions.properties)
-    locale/browser/engineManager.properties        (%chrome/browser/engineManager.properties)
     locale/browser/setDesktopBackground.dtd        (%chrome/browser/setDesktopBackground.dtd)
     locale/browser/shellservice.properties         (%chrome/browser/shellservice.properties)
     locale/browser/tabbrowser.properties           (%chrome/browser/tabbrowser.properties)
     locale/browser/taskbar.properties              (%chrome/browser/taskbar.properties)
     locale/browser/translation.dtd                 (%chrome/browser/translation.dtd)
     locale/browser/translation.properties          (%chrome/browser/translation.properties)
     locale/browser/webrtcIndicator.properties      (%chrome/browser/webrtcIndicator.properties)
     locale/browser/downloads/downloads.dtd         (%chrome/browser/downloads/downloads.dtd)
@@ -73,17 +72,16 @@
     locale/browser/preferences/cookies.dtd            (%chrome/browser/preferences/cookies.dtd)
     locale/browser/preferences/fonts.dtd              (%chrome/browser/preferences/fonts.dtd)
     locale/browser/preferences/languages.dtd          (%chrome/browser/preferences/languages.dtd)
     locale/browser/preferences/main.dtd               (%chrome/browser/preferences/main.dtd)
     locale/browser/preferences/permissions.dtd        (%chrome/browser/preferences/permissions.dtd)
     locale/browser/preferences/preferences.dtd        (%chrome/browser/preferences/preferences.dtd)
     locale/browser/preferences/preferences.properties     (%chrome/browser/preferences/preferences.properties)
     locale/browser/preferences/privacy.dtd            (%chrome/browser/preferences/privacy.dtd)
-    locale/browser/preferences/search.dtd             (%chrome/browser/preferences/search.dtd)
     locale/browser/preferences/security.dtd           (%chrome/browser/preferences/security.dtd)
     locale/browser/preferences/selectBookmark.dtd     (%chrome/browser/preferences/selectBookmark.dtd)
     locale/browser/preferences/siteDataSettings.dtd     (%chrome/browser/preferences/siteDataSettings.dtd)
     locale/browser/preferences/sync.dtd               (%chrome/browser/preferences/sync.dtd)
     locale/browser/preferences/translation.dtd        (%chrome/browser/preferences/translation.dtd)
     locale/browser/syncBrand.dtd                (%chrome/browser/syncBrand.dtd)
     locale/browser/syncSetup.properties         (%chrome/browser/syncSetup.properties)
 #if BUILD_FASTER
new file mode 100644
--- /dev/null
+++ b/python/l10n/fluent_migrations/bug_1415733_preferences_search.py
@@ -0,0 +1,237 @@
+# 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
+
+
+def migrate(ctx):
+    """Bug 1415733 - Migrate the "Search" section of Preferences to the new Localization API, part {index}"""
+
+    ctx.add_transforms(
+        'browser/browser/preferences/preferences.ftl',
+        'browser/locales/en-US/browser/preferences/preferences.ftl',
+        [
+            FTL.Message(
+                id=FTL.Identifier('search-bar-header'),
+                value=COPY(
+                    'browser/chrome/browser/preferences/search.dtd',
+                    'searchBar.label'
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-bar-hidden'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('label'),
+                        COPY(
+                            'browser/chrome/browser/preferences/search.dtd',
+                            'searchBar.hidden.label'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-bar-shown'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('label'),
+                        COPY(
+                            'browser/chrome/browser/preferences/search.dtd',
+                            'searchBar.shown.label'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-engine-default-header'),
+                value=COPY(
+                    'browser/chrome/browser/preferences/search.dtd',
+                    'defaultSearchEngine.label'
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-engine-default-desc'),
+                value=COPY(
+                    'browser/chrome/browser/preferences/search.dtd',
+                    'chooseYourDefaultSearchEngine2.label'
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-suggestions-option'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('label'),
+                        COPY(
+                            'browser/chrome/browser/preferences/search.dtd',
+                            'provideSearchSuggestions.label'
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier('accesskey'),
+                        COPY(
+                            'browser/chrome/browser/preferences/search.dtd',
+                            'provideSearchSuggestions.accesskey'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-show-suggestions-url-bar-option'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('label'),
+                        COPY(
+                            'browser/chrome/browser/preferences/search.dtd',
+                            'showURLBarSuggestions2.label'
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier('accesskey'),
+                        COPY(
+                            'browser/chrome/browser/preferences/search.dtd',
+                            'showURLBarSuggestions2.accesskey'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-show-suggestions-above-history-option'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('label'),
+                        COPY(
+                            'browser/chrome/browser/preferences/search.dtd',
+                            'showSearchSuggestionsAboveHistory.label'
+                        )
+                    ),
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-suggestions-cant-show'),
+                value=REPLACE(
+                    'browser/chrome/browser/preferences/search.dtd',
+                    'urlBarSuggestionsPermanentPB.label',
+                    {
+                        '&brandShortName;': MESSAGE_REFERENCE(
+                            '-brand-short-name'
+                        )
+                    }
+                ),
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-one-click-header'),
+                value=COPY(
+                    'browser/chrome/browser/preferences/search.dtd',
+                    'oneClickSearchEngines.label'
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-one-click-desc'),
+                value=COPY(
+                    'browser/chrome/browser/preferences/search.dtd',
+                    'chooseWhichOneToDisplay2.label'
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-choose-engine-column'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('label'),
+                        COPY(
+                            'browser/chrome/browser/preferences/search.dtd',
+                            'engineNameColumn.label'
+                        )
+                    ),
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-choose-keyword-column'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('label'),
+                        COPY(
+                            'browser/chrome/browser/preferences/search.dtd',
+                            'engineKeywordColumn.label'
+                        )
+                    ),
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-restore-default'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('label'),
+                        COPY(
+                            'browser/chrome/browser/preferences/search.dtd',
+                            'restoreDefaultSearchEngines.label'
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier('accesskey'),
+                        COPY(
+                            'browser/chrome/browser/preferences/search.dtd',
+                            'restoreDefaultSearchEngines.accesskey'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-remove-engine'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('label'),
+                        COPY(
+                            'browser/chrome/browser/preferences/search.dtd',
+                            'removeEngine.label'
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier('accesskey'),
+                        COPY(
+                            'browser/chrome/browser/preferences/search.dtd',
+                            'removeEngine.accesskey'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-find-more-link'),
+                value=COPY(
+                    'browser/chrome/browser/preferences/search.dtd',
+                    'findMoreSearchEngines.label'
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-keyword-warning-title'),
+                value=COPY(
+                    'browser/chrome/browser/engineManager.properties',
+                    'duplicateTitle'
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-keyword-warning-engine'),
+                value=REPLACE(
+                    'browser/chrome/browser/engineManager.properties',
+                    'duplicateEngineMsg',
+                    {
+                        '%S': EXTERNAL_ARGUMENT(
+                            'name'
+                        )
+                    }
+                ),
+            ),
+            FTL.Message(
+                id=FTL.Identifier('search-keyword-warning-bookmark'),
+                value=COPY(
+                    'browser/chrome/browser/engineManager.properties',
+                    'duplicateBookmarkMsg'
+                )
+            ),
+        ]
+    )