Bug 1103190 - land Flare strings in Firefox 36, r=felipe.
authorFlorian Quèze <florian@queze.net>
Thu, 27 Nov 2014 12:24:53 +0100
changeset 242171 474e1bda6a0f9c824a498d9a5060bb33377fad43
parent 242170 69c30325e867be4b9fdb6d1de6d7484dfd0a4afe
child 242172 c9350d69c4bc92066a8c51e7b0f0ae6a658c94b2
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs1103190
milestone36.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 1103190 - land Flare strings in Firefox 36, r=felipe.
browser/base/content/urlbarBindings.xml
browser/components/preferences/in-content/preferences.xul
browser/components/preferences/in-content/search.xul
browser/components/preferences/preferences.xul
browser/components/preferences/search.xul
browser/components/search/content/search.xml
browser/locales/en-US/chrome/browser/browser.dtd
browser/locales/en-US/chrome/browser/preferences/preferences.dtd
browser/locales/en-US/chrome/browser/preferences/search.dtd
browser/locales/en-US/chrome/browser/search.properties
browser/locales/jar.mn
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -968,29 +968,29 @@
         <xul:treecols anonid="treecols">
           <xul:treecol id="treecolAutoCompleteValue" class="autocomplete-treecol" flex="1" overflow="true"/>
         </xul:treecols>
         <xul:treechildren class="autocomplete-treebody"/>
       </xul:tree>
       <xul:hbox anonid="search-panel-one-offs-header"
                 class="search-panel-header search-panel-current-input"
                 xbl:inherits="hidden=showonlysettings">
-        <xul:label anonid="searchbar-oneoffheader-before" value="Search for "/>
+        <xul:label anonid="searchbar-oneoffheader-before" value="&searchFor.label;"/>
         <xul:label anonid="searchbar-oneoffheader-searchtext" flex="1" crop="end" class="search-panel-input-value"/>
-        <xul:label anonid="searchbar-oneoffheader-after" flex="10000" value=" with:"/>
+        <xul:label anonid="searchbar-oneoffheader-after" flex="10000" value="&searchWith.label;"/>
       </xul:hbox>
       <xul:description anonid="search-panel-one-offs"
                        class="search-panel-one-offs"
                        xbl:inherits="hidden=showonlysettings"/>
       <xul:vbox anonid="add-engines"/>
       <xul:button anonid="search-settings"
                   xbl:inherits="showonlysettings"
                   oncommand="openPreferences('paneSearch')"
                   class="search-setting-button search-panel-header"
-                  label="Change Search Settings"/>
+                  label="&changeSearchSettings.button;"/>
     </content>
     <handlers>
       <handler event="popupshowing"><![CDATA[
         // First handle deciding if we are showing the reduced version of the
         // popup containing only the preferences button. We do this if the
         // glass icon has been clicked if the text field is empty.
         let searchbar = document.getElementById("searchbar");
         let tree = document.getAnonymousElementByAttribute(this, "anonid",
@@ -1015,18 +1015,23 @@
           uri = uri.spec;
           this.setAttribute("src", PlacesUtils.getImageURLForResolution(window, uri));
         }
         else {
           // If the default has just been changed to a provider without icon,
           // avoid showing the icon of the previous default provider.
           this.removeAttribute("src");
         }
+
+        const kBundleURI = "chrome://browser/locale/search.properties";
+        let bundle = Services.strings.createBundle(kBundleURI);
+        let headerText = bundle.formatStringFromName("searchHeader",
+                                                     [currentEngine.name], 1);
         document.getAnonymousElementByAttribute(this, "anonid", "searchbar-engine-name")
-                .setAttribute("value", currentEngine.name + " Search");
+                .setAttribute("value", headerText);
 
         // Update the 'Search for <keywords> with:" header.
         let headerSearchText =
           document.getAnonymousElementByAttribute(this, "anonid",
                                                   "searchbar-oneoffheader-searchtext");
         let textbox = searchbar.textbox;
         let self = this;
         let keyPressHandler = function() {
--- a/browser/components/preferences/in-content/preferences.xul
+++ b/browser/components/preferences/in-content/preferences.xul
@@ -18,16 +18,17 @@
 
 <!DOCTYPE page [
 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
 <!ENTITY % globalPreferencesDTD SYSTEM "chrome://global/locale/preferences.dtd">
 <!ENTITY % preferencesDTD SYSTEM
   "chrome://browser/locale/preferences/preferences.dtd">
 <!ENTITY % privacyDTD SYSTEM "chrome://browser/locale/preferences/privacy.dtd">
 <!ENTITY % tabsDTD SYSTEM "chrome://browser/locale/preferences/tabs.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 % sanitizeDTD SYSTEM "chrome://browser/locale/sanitize.dtd">
 <!ENTITY % mainDTD SYSTEM "chrome://browser/locale/preferences/main.dtd">
 <!ENTITY % aboutHomeDTD SYSTEM "chrome://browser/locale/aboutHome.dtd">
 <!ENTITY % contentDTD SYSTEM "chrome://browser/locale/preferences/content.dtd">
@@ -35,16 +36,17 @@
   "chrome://browser/locale/preferences/applications.dtd">
 <!ENTITY % advancedDTD SYSTEM
   "chrome://browser/locale/preferences/advanced.dtd">
 %brandDTD;
 %globalPreferencesDTD;
 %preferencesDTD;
 %privacyDTD;
 %tabsDTD;
+%searchDTD;
 %syncBrandDTD;
 %syncDTD;
 %securityDTD;
 %sanitizeDTD;
 %mainDTD;
 %aboutHomeDTD;
 %contentDTD;
 %applicationsDTD;
@@ -96,20 +98,20 @@
         <image class="category-icon"/>
         <label class="category-name" flex="1">&paneGeneral.title;</label>
       </richlistitem>
 
       <richlistitem id="category-search"
                     class="category"
                     value="paneSearch"
                     helpTopic="prefs-main"
-                    tooltiptext="Search"
+                    tooltiptext="&paneSearch.title;"
                     align="center">
         <image class="category-icon"/>
-        <label class="category-name" flex="1">Search</label>
+        <label class="category-name" flex="1">&paneSearch.title;</label>
       </richlistitem>
 
       <richlistitem id="category-content"
                     class="category"
                     value="paneContent"
                     helpTopic="prefs-content"
                     tooltiptext="&paneContent.title;"
                     align="center">
--- a/browser/components/preferences/in-content/search.xul
+++ b/browser/components/preferences/in-content/search.xul
@@ -10,39 +10,38 @@
                   name="browser.search.hiddenOneOffs"
                   type="string"/>
 
     </preferences>
 
     <script type="application/javascript"
             src="chrome://browser/content/preferences/in-content/search.js"/>
 
-<hbox id="header-search"
-      class="header"
-      hidden="true"
-      data-category="paneSearch">
-  <label class="header-name">Search</label>
-</hbox>
-
+    <hbox id="header-search"
+          class="header"
+          hidden="true"
+          data-category="paneSearch">
+      <label class="header-name">&paneSearch.title;</label>
+    </hbox>
 
     <!-- Default Search Engine -->
     <groupbox id="defaultEngineGroup" align="start" data-category="paneSearch">
-      <caption label="Default Search Engine"/>
-      <label>Choose your default search engine. &brandShortName; uses it in the location bar, search bar, and start pages.</label>
+      <caption label="&defaultSearchEngine.label;"/>
+      <label>&chooseYourDefaultSearchEngine.label;</label>
       <menulist id="defaultEngine" oncommand="gSearchPane.setDefaultEngine();">
         <menupopup/>
       </menulist>
       <checkbox id="suggestionsInSearchFieldsCheckbox"
-                label="Provide search suggestions"
-                accesskey="s"
+                label="&provideSearchSuggestions.label;"
+                accesskey="&provideSearchSuggestions.accesskey;"
                 preference="browser.search.suggest.enabled"/>
     </groupbox>
 
     <groupbox id="oneClickSearchProvidersGroup" data-category="paneSearch">
-      <caption label="One-click search engines"/>
-      <label>The search bar lets you search alternate engines directly. Choose which ones to display.</label>
+      <caption label="&oneClickSearchEngines.label;"/>
+      <label>&chooseWhichOneToDisplay.label;</label>
 
       <richlistbox id="oneClickProvidersList"/>
       <hbox pack="end">
-        <label id="addEngines" class="text-link" value="Add more search providers…"
+        <label id="addEngines" class="text-link" value="&addMoreSearchEngines.label;"
                onclick="if (event.button == 0) { Services.wm.getMostRecentWindow('navigator:browser').BrowserSearch.loadAddEngines(); }"/>
       </hbox>
     </groupbox>
--- a/browser/components/preferences/preferences.xul
+++ b/browser/components/preferences/preferences.xul
@@ -62,17 +62,17 @@
     <stringbundle id="bundleBrand" src="chrome://branding/locale/brand.properties"/>
     <stringbundle id="bundlePreferences"
                   src="chrome://browser/locale/preferences/preferences.properties"/>
 
     <prefpane id="paneMain" label="&paneGeneral.title;"
               src="chrome://browser/content/preferences/main.xul"/>
     <prefpane id="paneTabs" label="&paneTabs.title;"
               src="chrome://browser/content/preferences/tabs.xul"/>
-    <prefpane id="paneSearch" label="Search"
+    <prefpane id="paneSearch" label="&paneSearch.title;"
               src="chrome://browser/content/preferences/search.xul"/>
     <prefpane id="paneContent" label="&paneContent.title;"
               src="chrome://browser/content/preferences/content.xul"/>
     <prefpane id="paneApplications" label="&paneApplications.title;"
               src="chrome://browser/content/preferences/applications.xul"/>
     <prefpane id="panePrivacy" label="&panePrivacy.title;"
               src="chrome://browser/content/preferences/privacy.xul"/>
     <prefpane id="paneSecurity" label="&paneSecurity.title;"
--- a/browser/components/preferences/search.xul
+++ b/browser/components/preferences/search.xul
@@ -1,17 +1,19 @@
 <?xml version="1.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/. -->
 
 <!DOCTYPE overlay [
-<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
-%brandDTD;
+  <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
+  <!ENTITY % searchDTD SYSTEM "chrome://browser/locale/preferences/search.dtd">
+  %brandDTD;
+  %searchDTD;
 ]>
 
 <overlay id="SearchPaneOverlay"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
          xmlns:html="http://www.w3.org/1999/xhtml">
 
   <prefpane id="paneSearch" helpTopic="prefs-search"
             onpaneload="gSearchPane.init();">
@@ -29,33 +31,33 @@
                   type="string"/>
 
     </preferences>
 
     <script type="application/javascript" src="chrome://browser/content/preferences/search.js"/>
 
     <!-- Default Search Engine -->
     <groupbox id="defaultEngineGroup" align="start">
-      <caption label="Default Search Engine"/>
-      <label>Choose your default search engine. &brandShortName; uses it in the location bar, search bar, and start pages.</label>
+      <caption label="&defaultSearchEngine.label;"/>
+      <label>&chooseYourDefaultSearchEngine.label;</label>
       <menulist id="defaultEngine" oncommand="gSearchPane.setDefaultEngine();">
         <menupopup/>
       </menulist>
       <checkbox id="suggestionsInSearchFieldsCheckbox"
-                label="Provide search suggestions"
-                accesskey="s"
+                label="&provideSearchSuggestions.label;"
+                accesskey="&provideSearchSuggestions.accesskey;"
                 preference="browser.search.suggest.enabled"/>
     </groupbox>
 
     <groupbox id="oneClickSearchProvidersGroup">
-      <caption label="One-click search engines"/>
-      <label>The search bar lets you search alternate engines directly. Choose which ones to display.</label>
+      <caption label="&oneClickSearchEngines.label;"/>
+      <label>&chooseWhichOneToDisplay.label;</label>
 
       <richlistbox id="oneClickProvidersList"/>
       <hbox pack="end" style="margin-bottom: 1em">
-        <label id="addEngines" class="text-link" value="Add more search providers…"
+        <label id="addEngines" class="text-link" value="&addMoreSearchEngines.label;"
                onclick="if (event.button == 0) { Services.wm.getMostRecentWindow('navigator:browser').BrowserSearch.loadAddEngines(); }"/>
       </hbox>
     </groupbox>
 
   </prefpane>
 
 </overlay>
--- a/browser/components/search/content/search.xml
+++ b/browser/components/search/content/search.xml
@@ -313,17 +313,17 @@
         <body><![CDATA[
           var uri = this.currentEngine.iconURI;
           this.setIcon(this, uri ? uri.spec : "");
 
           var name = this.currentEngine.name;
           var text = this._stringBundle.getFormattedString("searchtip", [name]);
 
           if (Services.prefs.getBoolPref("browser.search.showOneOffButtons"))
-            this._textbox.placeholder = "Search";
+            this._textbox.placeholder = this._stringBundle.getString("searchPlaceholder");
           else
             this._textbox.placeholder = name;
 
           this._textbox.label = text;
           this._textbox.tooltipText = text;
         ]]></body>
       </method>
 
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -410,16 +410,23 @@ These should match what Safari and other
   is a fundamental keybinding and we are maintaining a XP binding so that it is easy
   for people to switch to Linux.
 
  -->
 <!ENTITY searchFocus.commandkey       "k">
 <!ENTITY searchFocus.commandkey2      "e">
 <!ENTITY searchFocusUnix.commandkey   "j">
 
+<!-- LOCALIZATION NOTE (searchFor.label, searchWith.label):
+     These two strings are used to build the header above the list of one-click
+     search providers:  "Search for <used typed keywords> with:" -->
+<!ENTITY searchFor.label              "Search for ">
+<!ENTITY searchWith.label             " with:">
+<!ENTITY changeSearchSettings.button  "Change Search Settings">
+
 <!ENTITY tabView.commandkey           "e">
 
 <!ENTITY openLinkCmdInTab.label       "Open Link in New Tab">
 <!ENTITY openLinkCmdInTab.accesskey   "T">
 <!ENTITY openLinkCmd.label            "Open Link in New Window">
 <!ENTITY openLinkCmd.accesskey        "W">
 <!ENTITY openLinkInPrivateWindowCmd.label "Open Link in New Private Window">
 <!ENTITY openLinkInPrivateWindowCmd.accesskey "P">
--- a/browser/locales/en-US/chrome/browser/preferences/preferences.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/preferences.dtd
@@ -10,16 +10,17 @@
 <!-- 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;">
 
 <!ENTITY  paneGeneral.title       "General">
 <!ENTITY  paneTabs.title          "Tabs">
+<!ENTITY  paneSearch.title        "Search">
 <!ENTITY  paneContent.title       "Content">
 <!ENTITY  paneApplications.title  "Applications">
 <!ENTITY  panePrivacy.title       "Privacy">
 <!ENTITY  paneSecurity.title      "Security">
 <!ENTITY  paneAdvanced.title      "Advanced">
 
 <!-- LOCALIZATION NOTE (paneSync.title): This should match syncBrand.shortName.label in ../syncBrand.dtd -->
 <!ENTITY  paneSync.title          "Sync">
new file mode 100644
--- /dev/null
+++ b/browser/locales/en-US/chrome/browser/preferences/search.dtd
@@ -0,0 +1,17 @@
+<!-- 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 defaultSearchEngine.label             "Default Search Engine">
+
+<!ENTITY chooseYourDefaultSearchEngine.label   "Choose your default search engine. &brandShortName; uses it in the location bar, search bar, and start page.">
+
+<!ENTITY provideSearchSuggestions.label        "Provide search suggestions">
+<!ENTITY provideSearchSuggestions.accesskey    "s">
+
+
+<!ENTITY oneClickSearchEngines.label           "One-click search engines">
+
+<!ENTITY chooseWhichOneToDisplay.label         "The search bar lets you search alternate engines directly. Choose which ones to display.">
+
+<!ENTITY addMoreSearchEngines.label            "Add more search engines…">
--- a/browser/locales/en-US/chrome/browser/search.properties
+++ b/browser/locales/en-US/chrome/browser/search.properties
@@ -1,14 +1,23 @@
 # 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/.
 
 searchtip=Search using %S
 
+# LOCALIZATION NOTE (searchPlaceholder): this is shown in the searchbox when
+# the user hasn't typed anything yet.
+searchPlaceholder=Search
+
+# LOCALIZATION NOTE (searchHeader): this is displayed at the top of the panel
+# showing search suggestions.
+# %S is replaced with the name of the current default search engine.
+searchHeader=%S Search
+
 # LOCALIZATION NOTE (cmd_pasteAndSearch): "Search" is a verb, this is the
 # search bar equivalent to the url bar's "Paste & Go"
 cmd_pasteAndSearch=Paste & Search
 
 cmd_clearHistory=Clear Search History
 cmd_clearHistory_accesskey=H
 
 cmd_showSuggestions=Show Suggestions
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -126,16 +126,17 @@
     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/security.dtd           (%chrome/browser/preferences/security.dtd)
 #ifdef MOZ_SERVICES_SYNC
     locale/browser/preferences/sync.dtd               (%chrome/browser/preferences/sync.dtd)
 #endif
     locale/browser/preferences/tabs.dtd               (%chrome/browser/preferences/tabs.dtd)
+    locale/browser/preferences/search.dtd             (%chrome/browser/preferences/search.dtd)
     locale/browser/preferences/translation.dtd        (%chrome/browser/preferences/translation.dtd)
 #ifdef MOZ_SERVICES_SYNC
     locale/browser/syncBrand.dtd                (%chrome/browser/syncBrand.dtd)
     locale/browser/syncSetup.dtd                (%chrome/browser/syncSetup.dtd)
     locale/browser/syncSetup.properties         (%chrome/browser/syncSetup.properties)
     locale/browser/syncGenericChange.properties         (%chrome/browser/syncGenericChange.properties)
     locale/browser/syncKey.dtd                  (%chrome/browser/syncKey.dtd)
     locale/browser/syncQuota.dtd                (%chrome/browser/syncQuota.dtd)