Bug 1366252 - Include the URL of the support page in the error message of the no-results-found view of about:preferences search. r=jaws,mconley
authorEvan Tseng <evan@tseng.io>
Mon, 22 May 2017 15:26:16 +0800
changeset 361070 5e392beb6a34208b2090b7221ad4549020e29f90
parent 361069 bdfb2b27f13e444abb7b99c069a5330e9d12efdb
child 361071 84e9dbe2e9e39b9ed17eee883b206c61515abd6a
push id43600
push userphilringnalda@gmail.com
push dateMon, 29 May 2017 03:51:14 +0000
treeherderautoland@5e392beb6a34 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, mconley
bugs1366252
milestone55.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 1366252 - Include the URL of the support page in the error message of the no-results-found view of about:preferences search. r=jaws,mconley MozReview-Commit-ID: 8WkMtMhN74B
browser/base/content/test/static/browser_misused_characters_in_strings.js
browser/components/preferences/in-content/findInPage.js
browser/locales/en-US/chrome/browser/preferences/preferences.properties
--- a/browser/base/content/test/static/browser_misused_characters_in_strings.js
+++ b/browser/base/content/test/static/browser_misused_characters_in_strings.js
@@ -101,17 +101,17 @@ let gWhitelist = [{
     key: "tos",
     type: "double-quote"
   }, {
     file: "aboutNetworking.dtd",
     key: "aboutNetworking.logTutorial",
     type: "single-quote"
   }, {
     file: "preferences.properties",
-    key: "searchResults.needHelp",
+    key: "searchResults.needHelp2",
     type: "double-quote"
   }
 ];
 
 /**
  * Check if an error should be ignored due to matching one of the whitelist
  * objects defined in gWhitelist.
  *
--- a/browser/components/preferences/in-content/findInPage.js
+++ b/browser/components/preferences/in-content/findInPage.js
@@ -238,19 +238,20 @@ var gSearchResultsPane = {
         let noResultsEl = document.querySelector(".no-results-message");
         noResultsEl.hidden = false;
 
         let strings = this.strings;
 
         document.getElementById("sorry-message").textContent = AppConstants.platform == "win" ?
           strings.getFormattedString("searchResults.sorryMessageWin", [query]) :
           strings.getFormattedString("searchResults.sorryMessageUnix", [query]);
+        let helpUrl = Services.urlFormatter.formatURLPref("app.support.baseURL") + "preferences";
         let brandName = document.getElementById("bundleBrand").getString("brandShortName");
         document.getElementById("need-help").innerHTML =
-          strings.getFormattedString("searchResults.needHelp", [brandName]);
+          strings.getFormattedString("searchResults.needHelp2", [helpUrl, brandName]);
       } else {
         // Creating tooltips for all the instances found
         for (let node of this.listSearchTooltips) {
           this.createSearchTooltip(node, query);
         }
       }
     } else {
       this.searchResultsCategory.hidden = true;
--- a/browser/locales/en-US/chrome/browser/preferences/preferences.properties
+++ b/browser/locales/en-US/chrome/browser/preferences/preferences.properties
@@ -255,12 +255,12 @@ removeContainerMsg=If you remove this Co
 removeContainerOkButton=Remove this Container
 removeContainerButton2=Don’t remove this Container
 
 # Search Results Pane
 # LOCALIZATION NOTE %S will be replaced by the word being searched
 searchResults.sorryMessageWin=Sorry! There are no results in Options for “%S”.
 searchResults.sorryMessageUnix=Sorry! There are no results in Preferences for “%S”.
 # LOCALIZATION NOTE %S gets replaced with the browser name
-searchResults.needHelp=Need help? Visit <html:a id="need-help-link">%S Support</html:a>
+searchResults.needHelp2=Need help? Visit <html:a id="need-help-link" target="_blank" href="%S">%S Support</html:a>
 
 # LOCALIZATION NOTE %S is the default value of the `dom.ipc.processCount` pref.
 defaultContentProcessCount=%S (default)