Bug 1379116 - Localize hardcoded addon installation error string in about:debugging;r=ochameau
authorJulian Descottes <jdescottes@mozilla.com>
Tue, 17 Apr 2018 11:49:02 +0200
changeset 414051 4816cf388e2620e7c4c71b7882adfa9d1198e643
parent 414050 a6bd62970a9fb094f223d99fbdf3dac25ec2f42d
child 414052 94f0b582e4a6758b8b01b3dd23c7423b6d49c496
push id33857
push userncsoregi@mozilla.com
push dateTue, 17 Apr 2018 21:54:38 +0000
treeherdermozilla-central@1a1223d74b7b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1379116
milestone61.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 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