Bug 1379116 - Localize hardcoded addon installation error string in about:debugging;r=ochameau
MozReview-Commit-ID: 1dnaoWrtaSS
--- 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