Bug 1366252 - Include the URL of the support page in the error message of the no-results-found view of about:preferences search. draft
authorEvan Tseng <evan@tseng.io>
Mon, 22 May 2017 15:26:16 +0800
changeset 585632 350900050b5b3bccde717d540e44b1feba475930
parent 585631 66c73b65bf2d02c59f361b89135dc56553c3e4eb
child 630759 5c9cbaa5bae0281cc622959bd5a9a8cdf186fcf5
push id61152
push userbmo:evan@tseng.io
push dateSat, 27 May 2017 12:21:00 +0000
bugs1366252
milestone55.0a1
Bug 1366252 - Include the URL of the support page in the error message of the no-results-found view of about:preferences search. 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)