Bug 1379116 - Localize hardcoded addon installation error string in about:debugging;r=ochameau draft
authorJulian Descottes <jdescottes@mozilla.com>
Tue, 17 Apr 2018 11:49:02 +0200
changeset 783620 831989c17ad1041af3e1f9be0b7b10a0805a31cc
parent 782432 7ff499dfcd51cf4a95ebf0db506b415bf7bb27c3
push id106738
push userjdescottes@mozilla.com
push dateTue, 17 Apr 2018 14:26:33 +0000
reviewersochameau
bugs1379116
milestone61.0a1
Bug 1379116 - Localize hardcoded addon installation error string in about:debugging;r=ochameau MozReview-Commit-ID: 1dnaoWrtaSS
devtools/client/aboutdebugging/components/addons/InstallError.js
devtools/client/locales/en-US/aboutdebugging.properties
--- a/devtools/client/aboutdebugging/components/addons/InstallError.js
+++ b/devtools/client/aboutdebugging/components/addons/InstallError.js
@@ -21,17 +21,17 @@ class AddonsInstallError extends Compone
       retryInstall: PropTypes.func,
     };
   }
 
   render() {
     if (!this.props.error) {
       return null;
     }
-    let text = `There was an error during installation: ${this.props.error}`;
+    let text = Strings.formatStringFromName("addonInstallError", [this.props.error], 1);
     return dom.div(
       { className: "addons-install-error" },
       dom.span(
         {},
         dom.div({ className: "warning" }),
         dom.span({}, text),
       ),
       dom.button(
--- a/devtools/client/locales/en-US/aboutdebugging.properties
+++ b/devtools/client/locales/en-US/aboutdebugging.properties
@@ -53,16 +53,21 @@ addonDebugging.tooltip = Turning this on
 # (https://developer.mozilla.org/docs/Tools/about:debugging#Enabling_add-on_debugging)
 addonDebugging.learnMore = Learn more
 
 # LOCALIZATION NOTE (loadTemporaryAddon):
 # This string is displayed as a label of a button that allows the user to
 # load additional add-ons.
 loadTemporaryAddon = Load Temporary Add-on
 
+# LOCALIZATION NOTE (addonInstallError):
+# This string is displayed when an error occurs while installing an addon.
+# %S will be replaced with the error message.
+addonInstallError = There was an error during installation: %S
+
 # LOCALIZATION NOTE (retryTemporaryInstall):
 # This string is displayed as a label of a button that allows the user to
 # retry a failed installation of a temporary add-on.
 retryTemporaryInstall = Retry
 
 # LOCALIZATION NOTE (extensions):
 # This string is displayed as a header above the list of loaded add-ons.
 extensions = Extensions