Bug 1496632 - Copy warning about legacy extension incompatibility; r=jorgk DONTBUILD
authorGeoff Lankow <geoff@darktrojan.net>
Fri, 19 Oct 2018 21:59:41 +1300
changeset 33423 52e953facdcf2f57945f27550603d8b0cb72d796
parent 33422 0399b6a574c66a074e65205d8b325d7b2bffd386
child 33424 c7b5816c507193e924cbf75b26d25d062579b865
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersjorgk
bugs1496632
Bug 1496632 - Copy warning about legacy extension incompatibility; r=jorgk DONTBUILD
mail/base/modules/ExtensionsUI.jsm
mail/locales/en-US/chrome/messenger/addons.properties
--- a/mail/base/modules/ExtensionsUI.jsm
+++ b/mail/base/modules/ExtensionsUI.jsm
@@ -455,17 +455,22 @@ var gXPInstallObserver = {
 
           if (!host) {
             host = (install.sourceURI instanceof Ci.nsIStandardURL) &&
                    install.sourceURI.host;
           }
 
           let error = (host || install.error == 0) ? "addonInstallError" : "addonLocalInstallError";
           let args;
-          if (install.error < 0) {
+
+          // Temporarily replace the usual warning message with this more-likely one.
+          if (install.error == AddonManager.ERROR_CORRUPT_FILE) {
+            error += "Legacy";
+            args = [brandShortName, Services.appinfo.version];
+          } else if (install.error != 0) {
             error += install.error;
             args = [brandShortName, install.name];
           } else if (install.addon.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED) {
             error += "Blocklisted";
             args = [install.name];
           } else {
             error += "Incompatible";
             args = [brandShortName, Services.appinfo.version, install.name];
--- a/mail/locales/en-US/chrome/messenger/addons.properties
+++ b/mail/locales/en-US/chrome/messenger/addons.properties
@@ -64,19 +64,21 @@ addonInstallError-3=The add-on downloade
 addonInstallError-4=%2$S could not be installed because %1$S cannot modify the needed file.
 addonInstallError-5=%1$S has prevented this site from installing an unverified add-on.
 addonLocalInstallError-1=This add-on could not be installed because of a filesystem error.
 addonLocalInstallError-2=This add-on could not be installed because it does not match the add-on %1$S expected.
 addonLocalInstallError-3=This add-on could not be installed because it appears to be corrupt.
 addonLocalInstallError-4=%2$S could not be installed because %1$S cannot modify the needed file.
 addonLocalInstallError-5=This add-on could not be installed because it has not been verified.
 
-# LOCALIZATION NOTE (addonInstallErrorIncompatible):
+# LOCALIZATION NOTE (addonInstallErrorIncompatible, addonInstallErrorLegacy, addonLocalInstallErrorLegacy):
 # %1$S is the application name, %2$S is the application version, %3$S is the add-on name
 addonInstallErrorIncompatible=%3$S could not be installed because it is not compatible with %1$S %2$S.
+addonInstallErrorLegacy=The add-on could not be installed because it is not compatible with %1$S %2$S.
+addonLocalInstallErrorLegacy=This add-on could not be installed because it is not compatible with %1$S %2$S.
 
 # LOCALIZATION NOTE (addonInstallErrorBlocklisted): %S is add-on name
 addonInstallErrorBlocklisted=%S could not be installed because it has a high risk of causing stability or security problems.
 
 # LOCALIZATION NOTE (webextPerms.header)
 # This string is used as a header in the webextension permissions dialog,
 # %S is replaced with the localized name of the extension being installed.
 # See https://bug1308309.bmoattachments.org/attachment.cgi?id=8814612