Bug 1638822 - Bug 1638822 - convert openpgp strings to Fluent - jsm files. r=mkmelin a=wsmwk
authorKhushil Mistry <khushil324@gmail.com>
Thu, 11 Jun 2020 16:51:45 +0300
changeset 38509 decb78d3351b4bd0c43ef0b91ef01135f5778f71
parent 38508 4ecb5ad3fd50d02c80d97841f55d2bbb1ba91180
child 38510 02cafb5a0fe72a505f485010ec32977e80213b6d
push id2622
push userkaie@kuix.de
push dateTue, 16 Jun 2020 06:36:07 +0000
treeherdercomm-beta@02cafb5a0fe7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin, wsmwk
bugs1638822
Bug 1638822 - Bug 1638822 - convert openpgp strings to Fluent - jsm files. r=mkmelin a=wsmwk
mail/components/compose/content/messengercompose.xhtml
mail/extensions/openpgp/content/modules/gpg.jsm
mail/extensions/openpgp/content/modules/keyUsability.jsm
mail/extensions/openpgp/content/modules/keyserver.jsm
mail/extensions/openpgp/content/modules/mimeDecrypt.jsm
mail/extensions/openpgp/content/modules/persistentCrypto.jsm
mail/extensions/openpgp/content/modules/wksMimeHandler.jsm
mail/extensions/openpgp/content/strings/enigmail.ftl
mail/extensions/openpgp/content/strings/enigmail.properties
mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js
--- a/mail/components/compose/content/messengercompose.xhtml
+++ b/mail/components/compose/content/messengercompose.xhtml
@@ -58,16 +58,17 @@
   <stringbundle id="brandBundle" src="chrome://branding/locale/brand.properties"/>
   <stringbundle id="charsetBundle" src="chrome://communicator/content/labelsencodings.properties"/>
 
 <linkset>
   <html:link rel="localization" href="messenger/messengercompose/messengercompose.ftl"/>
   <html:link rel="localization" href="toolkit/main-window/findbar.ftl"/>
   <html:link rel="localization" href="toolkit/global/textActions.ftl"/>
   <html:link rel="localization" href="messenger/menubar.ftl"/>
+  <html:link rel="localization" href="messenger/openpgp/enigmail.ftl"/>
 </linkset>
 
 <script src="chrome://global/content/globalOverlay.js"/>
 <script src="chrome://global/content/editMenuOverlay.js"/>
 <script src="chrome://global/content/printUtils.js"/>
 <script src="chrome://messenger/content/accountUtils.js"/>
 <script src="chrome://messenger/content/mailCore.js"/>
 <script src="chrome://communicator/content/contentAreaClick.js"/>
--- a/mail/extensions/openpgp/content/modules/gpg.jsm
+++ b/mail/extensions/openpgp/content/modules/gpg.jsm
@@ -3,23 +3,22 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
  */
 
 "use strict";
 
 const EXPORTED_SYMBOLS = ["EnigmailGpg"];
 
-const { EnigmailLocale } = ChromeUtils.import(
-  "chrome://openpgp/content/modules/locale.jsm"
-);
 const { EnigmailVersioning } = ChromeUtils.import(
   "chrome://openpgp/content/modules/versioning.jsm"
 );
 
+var l10n = new Localization(["messenger/openpgp/enigmail.ftl"], true);
+
 const MINIMUM_GPG_VERSION = "2.0.14";
 
 var EnigmailGpg = {
   agentVersion: "",
   _agentPath: null,
 
   get agentPath() {
     return this._agentPath;
@@ -138,19 +137,19 @@ var EnigmailGpg = {
         return "ECDH";
       case 19:
         return "ECDSA";
       case 20:
         return "ELG";
       case 22:
         return "EDDSA";
       default:
-        return EnigmailLocale.getString("unknownSigningAlg", [
-          parseInt(id, 10),
-        ]);
+        return l10n.formatValueSync("unknown-signing-alg", {
+          id: parseInt(id, 10),
+        });
     }
   },
 
   hashAlgIdToString(id) {
     // RFC 4880 Sec. 9.4
     switch (parseInt(id, 10)) {
       case 1:
         return "MD5";
@@ -162,12 +161,14 @@ var EnigmailGpg = {
         return "SHA256";
       case 9:
         return "SHA384";
       case 10:
         return "SHA512";
       case 11:
         return "SHA224";
       default:
-        return EnigmailLocale.getString("unknownHashAlg", [parseInt(id, 10)]);
+        return l10n.formatValueSync("unknown-hash-alg", {
+          id: parseInt(id, 10),
+        });
     }
   },
 };
--- a/mail/extensions/openpgp/content/modules/keyUsability.jsm
+++ b/mail/extensions/openpgp/content/modules/keyUsability.jsm
@@ -37,16 +37,18 @@ const getWindows = EnigmailLazy.loader(
 );
 const getKeyRing = EnigmailLazy.loader(
   "enigmail/keyRing.jsm",
   "EnigmailKeyRing"
 );
 
 const DAY = 86400; // number of seconds of 1 day
 
+var l10n = new Localization(["messenger/openpgp/enigmail.ftl"], true);
+
 var EnigmailKeyUsability = {
   /**
    * Check whether some key pairs expire in less than N days from now.
    *
    * @param keySpecArr  - Array: list of key IDs or User IDs
    * @param numDay      - Number: number of days from now
    *
    * @return Array      - list of keys that will expire
@@ -187,30 +189,30 @@ var EnigmailKeyUsability = {
     let expiredKeys = this.getNewlyExpiredKeys();
     if (!expiredKeys || expiredKeys.length === 0) {
       return "";
     }
 
     let numDays = EnigmailPrefs.getPref("warnKeyExpiryNumDays");
 
     if (expiredKeys.length === 1) {
-      return EnigmailLocale.getString("expiry.keyExpiresSoon", [
-        getKeyDesc(expiredKeys[0]),
-        numDays,
-      ]);
+      return l10n.formatValueSync("expiry-key-expires-soon", {
+        desc: getKeyDesc(expiredKeys[0]),
+        days: numDays,
+      });
     }
 
     let keyDesc = "";
     for (let i = 0; i < expiredKeys.length; i++) {
       keyDesc += "- " + getKeyDesc(expiredKeys[i]) + "\n";
     }
-    return EnigmailLocale.getString("expiry.keysExpireSoon", [
-      numDays,
-      keyDesc,
-    ]);
+    return l10n.formatValueSync("expiry-keys-expire-soon", {
+      desc: keyDesc,
+      days: numDays,
+    });
   },
 
   /**
    * Check whether some key pairs (i.e. key with a secret key) have an
    * ownertrust of less than "ultimate".
    *
    * @param keySpecArr  - Array: list of key IDs or User IDs
    *
@@ -275,49 +277,53 @@ var EnigmailKeyUsability = {
       return "";
     }
 
     resultObj.Count = keysMissingOwnertrust.length;
 
     if (keysMissingOwnertrust.length === 1) {
       let keyDesc = getKeyDesc(keysMissingOwnertrust[0]);
       resultObj.keyId = keysMissingOwnertrust[0].keyId;
-      return EnigmailLocale.getString("expiry.keyMissingOwnerTrust", keyDesc);
+      return l10n.formatValueSync("expiry-key-missing-owner-trust", {
+        desc: keyDesc,
+      });
     }
 
     let keyDesc = "";
     for (let i = 0; i < keysMissingOwnertrust.length; i++) {
       keyDesc += "- " + getKeyDesc(keysMissingOwnertrust[i]) + "\n";
     }
-    return EnigmailLocale.getString("expiry.keysMissingOwnerTrust", keyDesc);
+    return l10n.formatValueSync("expiry-keys-missing-owner-trust", {
+      desc: keyDesc,
+    });
   },
 
   /**
    * Run the check for Ownertrust ("You rely on certifications") and
    * Display a message if something needs to be done
    */
-  checkOwnertrust() {
+  async checkOwnertrust() {
     EnigmailLog.DEBUG("keyUsability.jsm: checkOwnertrust\n");
 
     var resultObj = {};
     let msg = this.keyOwnerTrustCheck(resultObj);
 
     if (
       msg &&
       msg.length > 0 &&
       EnigmailPrefs.getPref("warnOnMissingOwnerTrust")
     ) {
       let actionButtonText = "";
 
       if (resultObj && resultObj.Count === 1) {
         // single key is concerned
-        actionButtonText = EnigmailLocale.getString("expiry.OpenKeyProperties");
+        actionButtonText = await l10n.formatValue("expiry-open-key-properties");
       } else {
         // Multiple keys concerned
-        actionButtonText = EnigmailLocale.getString("expiry.OpenKeyManager2");
+        actionButtonText = await l10n.formatValue("expiry-open-key-manager");
       }
 
       let checkedObj = {};
       let r = getDialog().msgBox(
         null,
         {
           msgtext: msg,
           dialogTitle: EnigmailLocale.getString("enigInfo2"),
--- a/mail/extensions/openpgp/content/modules/keyserver.jsm
+++ b/mail/extensions/openpgp/content/modules/keyserver.jsm
@@ -31,50 +31,53 @@ const { EnigmailXhrUtils } = ChromeUtils
 );
 const { EnigmailFuncs } = ChromeUtils.import(
   "chrome://openpgp/content/modules/funcs.jsm"
 );
 const { EnigmailCryptoAPI } = ChromeUtils.import(
   "chrome://openpgp/content/modules/cryptoAPI.jsm"
 );
 
+var l10n = new Localization(["messenger/openpgp/enigmail.ftl"], true);
+
 const ENIG_DEFAULT_HKP_PORT = "11371";
 const ENIG_DEFAULT_HKPS_PORT = "443";
 const ENIG_DEFAULT_LDAP_PORT = "389";
 
 /**
  KeySrvListener API
  Object implementing:
   - onProgress: function(percentComplete) [only implemented for download()]
   - onCancel: function() - the body will be set by the callee
 */
 
 function createError(errId) {
   let msg = "";
+
   switch (errId) {
     case EnigmailConstants.KEYSERVER_ERR_ABORTED:
-      msg = EnigmailLocale.getString("keyserver.error.aborted");
+      msg = l10n.formatValueSync("keyserver-error-aborted");
       break;
     case EnigmailConstants.KEYSERVER_ERR_SERVER_ERROR:
-      msg = EnigmailLocale.getString("keyserver.error.serverError");
+      msg = l10n.formatValueSync("keyserver-error-server-error");
       break;
     case EnigmailConstants.KEYSERVER_ERR_SERVER_UNAVAILABLE:
-      msg = EnigmailLocale.getString("keyserver.error.unavailable");
+      msg = l10n.formatValueSync("keyserver-error-unavailable");
       break;
     case EnigmailConstants.KEYSERVER_ERR_SECURITY_ERROR:
-      msg = EnigmailLocale.getString("keyserver.error.securityError");
+      msg = l10n.formatValueSync("keyserver-error-security-error");
       break;
     case EnigmailConstants.KEYSERVER_ERR_CERTIFICATE_ERROR:
-      msg = EnigmailLocale.getString("keyserver.error.certificateError");
+      msg = l10n.formatValueSync("keyserver-error-certificate-error");
       break;
     case EnigmailConstants.KEYSERVER_ERR_IMPORT_ERROR:
-      msg = EnigmailLocale.getString("keyserver.error.importError");
+      msg = l10n.formatValueSync("keyserver-error-import-error");
       break;
     case EnigmailConstants.KEYSERVER_ERR_UNKNOWN:
-      msg = EnigmailLocale.getString("keyserver.error.unknown");
+      msg = l10n.formatValueSync("keyserver-error-unknown");
       break;
   }
 
   return {
     result: errId,
     errorDetails: msg,
   };
 }
@@ -517,18 +520,18 @@ const accessHkpInternal = {
           continue;
         }
 
         switch (line[0]) {
           case "info":
             if (line[1] !== "1") {
               // protocol version not supported
               retObj.result = 7;
-              retObj.errorDetails = EnigmailLocale.getString(
-                "keyserver.error.unsupported2"
+              retObj.errorDetails = await l10n.formatValue(
+                "keyserver-error-unsupported"
               );
               retObj.pubKeys = [];
               return retObj;
             }
             break;
           case "pub":
             if (line.length >= 6) {
               if (key) {
--- a/mail/extensions/openpgp/content/modules/mimeDecrypt.jsm
+++ b/mail/extensions/openpgp/content/modules/mimeDecrypt.jsm
@@ -54,16 +54,18 @@ const { EnigmailCryptoAPI } = ChromeUtil
 );
 const { EnigmailAutocrypt } = ChromeUtils.import(
   "chrome://openpgp/content/modules/autocrypt.jsm"
 );
 const { EnigmailCompat } = ChromeUtils.import(
   "chrome://openpgp/content/modules/compat.jsm"
 );
 
+var l10n = new Localization(["messenger/openpgp/enigmail.ftl"], true);
+
 const ENCODING_DEFAULT = 0;
 const ENCODING_BASE64 = 1;
 const ENCODING_QP = 2;
 
 const LAST_MSG = EnigmailSingletons.lastDecryptedMessage;
 
 var gDebugLogLevel = 3;
 
@@ -78,25 +80,23 @@ var EnigmailMimeDecrypt = {
   },
 
   /**
    * Return a fake empty attachment with information that the message
    * was not decrypted
    *
    * @return {String}: MIME string (HTML text)
    */
-  emptyAttachment() {
+  async emptyAttachment() {
     EnigmailLog.DEBUG("mimeDecrypt.jsm: emptyAttachment()\n");
 
-    let encPart = EnigmailLocale.getString(
-      "mimeDecrypt.encryptedPart.attachmentLabel"
-    );
-    let concealed = EnigmailLocale.getString(
-      "mimeDecrypt.encryptedPart.concealedData"
-    );
+    let [encPart, concealed] = await l10n.formatValues([
+      { id: "mime-decrypt-encrypted-part-attachment-label" },
+      { id: "mime-decrypt-encrypted-part-concealed-data" },
+    ]);
     let retData = `Content-Type: message/rfc822; name="${encPart}.eml"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment; filename="${encPart}.eml"
 
 Content-Type: text/html
 
 <p><i>${concealed}</i></p>
 `;
@@ -519,17 +519,19 @@ MimeDecryptHandler.prototype = {
     EnigmailLog.DEBUG(
       `mimeDecrypt.jsm: checking MIME structure for ${this.mimePartNumber} / ${spec}\n`
     );
 
     if (
       !EnigmailMime.isRegularMimeStructure(this.mimePartNumber, spec, false)
     ) {
       if (!this.isUrlEnigmailConvert()) {
-        this.returnData(EnigmailMimeDecrypt.emptyAttachment());
+        EnigmailMimeDecrypt.emptyAttachment().then(value => {
+          this.returnData(value);
+        });
       } else {
         throw new Error(
           "Cannot decrypt messages with mixed (encrypted/non-encrypted) content"
         );
       }
       return;
     }
 
--- a/mail/extensions/openpgp/content/modules/persistentCrypto.jsm
+++ b/mail/extensions/openpgp/content/modules/persistentCrypto.jsm
@@ -46,16 +46,18 @@ const { EnigmailConstants } = ChromeUtil
 const { jsmime } = ChromeUtils.import("resource:///modules/jsmime.jsm");
 const { EnigmailStdlib } = ChromeUtils.import(
   "chrome://openpgp/content/modules/stdlib.jsm"
 );
 const { EnigmailEncryption } = ChromeUtils.import(
   "chrome://openpgp/content/modules/encryption.jsm"
 );
 
+var l10n = new Localization(["messenger/openpgp/enigmail.ftl"], true);
+
 const getFixExchangeMsg = EnigmailLazy.loader(
   "enigmail/fixExchangeMsg.jsm",
   "EnigmailFixExchangeMsg"
 );
 const getDecryption = EnigmailLazy.loader(
   "enigmail/decryption.jsm",
   "EnigmailDecryption"
 );
@@ -548,17 +550,17 @@ CryptMessageIntoFolder.prototype = {
       }
       ct += `; ${i[0]}="${i[1]}"`;
     }
 
     mimePart.headers._rawHeaders.set("content-type", [ct]);
     */
   },
 
-  decryptINLINE(mimePart) {
+  async decryptINLINE(mimePart) {
     EnigmailLog.DEBUG("persistentCrypto.jsm: decryptINLINE()\n");
 
     if ("decryptedPgpMime" in mimePart && mimePart.decryptedPgpMime) {
       return 0;
     }
 
     if ("body" in mimePart && mimePart.body.length > 0) {
       let ct = getContentType(mimePart);
@@ -650,19 +652,21 @@ CryptMessageIntoFolder.prototype = {
             ) {
               EnigmailLog.DEBUG(
                 "persistentCrypto.jsm: decryptINLINE: no MDC protection, decrypting anyway\n"
               );
             }
             if (statusFlagsObj.value & EnigmailConstants.DECRYPTION_FAILED) {
               // since we cannot find out if the user wants to cancel
               // we should ask
-              let msg = EnigmailLocale.getString(
-                "converter.decryptBody.failed",
-                this.subject
+              let msg = await l10n.formatValue(
+                "converter-decrypt-body-failed",
+                {
+                  subject: this.subject,
+                }
               );
 
               if (
                 !getDialog().confirmDlg(
                   null,
                   msg,
                   EnigmailLocale.getString("dlg.button.retry"),
                   EnigmailLocale.getString("dlg.button.skip")
--- a/mail/extensions/openpgp/content/modules/wksMimeHandler.jsm
+++ b/mail/extensions/openpgp/content/modules/wksMimeHandler.jsm
@@ -16,29 +16,28 @@ const { EnigmailCompat } = ChromeUtils.i
   "chrome://openpgp/content/modules/compat.jsm"
 );
 const { EnigmailVerify } = ChromeUtils.import(
   "chrome://openpgp/content/modules/mimeVerify.jsm"
 );
 const { EnigmailLog } = ChromeUtils.import(
   "chrome://openpgp/content/modules/log.jsm"
 );
-const { EnigmailLocale } = ChromeUtils.import(
-  "chrome://openpgp/content/modules/locale.jsm"
-);
 const { EnigmailDecryption } = ChromeUtils.import(
   "chrome://openpgp/content/modules/decryption.jsm"
 );
 const { EnigmailSingletons } = ChromeUtils.import(
   "chrome://openpgp/content/modules/singletons.jsm"
 );
 const { EnigmailConstants } = ChromeUtils.import(
   "chrome://openpgp/content/modules/constants.jsm"
 );
 
+var l10n = new Localization(["messenger/openpgp/enigmail.ftl"], true);
+
 var gDebugLog = false;
 
 var EnigmailWksMimeHandler = {
   /***
    * register a PGP/MIME verify object the same way PGP/MIME encrypted mail is handled
    */
   registerContentTypeHandler() {
     EnigmailLog.DEBUG("wksMimeHandler.jsm: registerContentTypeHandler()\n");
@@ -122,25 +121,27 @@ PgpWkdHandler.prototype = {
   onStopRequest() {
     EnigmailLog.DEBUG("wksMimeHandler.jsm: onStopRequest\n");
 
     if (this.data.search(/-----BEGIN PGP MESSAGE-----/i) >= 0) {
       this.decryptChallengeData();
     }
 
     let jsonStr = this.requestToJsonString(this.data);
-    let msg = "";
 
     if (this.data.search(/^\s*type:\s+confirmation-request/im) >= 0) {
-      msg = EnigmailLocale.getString("wkdMessage.body.req2");
+      l10n.formatValue("wkd-message-body-req").then(value => {
+        this.returnData(value);
+      });
     } else {
-      msg = EnigmailLocale.getString("wkdMessage.body.process");
+      l10n.formatValue("wkd-message-body-process").then(value => {
+        this.returnData(value);
+      });
     }
 
-    this.returnData(msg);
     this.displayStatus(jsonStr);
   },
 
   decryptChallengeData() {
     EnigmailLog.DEBUG("wksMimeHandler.jsm: decryptChallengeData()\n");
     let windowManager = Services.wm;
     let win = windowManager.getMostRecentWindow(null);
     let statusFlagsObj = {};
--- a/mail/extensions/openpgp/content/strings/enigmail.ftl
+++ b/mail/extensions/openpgp/content/strings/enigmail.ftl
@@ -198,8 +198,45 @@ key-usage-sign = Sign
 key-usage-certify = Certify
 key-usage-authentication = Authentication
 key-does-not-expire = Key does not expire
 key-expired = Key expired on { $keyExpiry }
 key-revoked = Key was revoked
 key-auto-accept-personal = You accept this key for all uses, because it is one of your personal keys. You have the secret key.
 key-do-you-accept = Do you accept this key for verifying digital signatures and for encrypting messages?
 key-accept-warning = Avoid accepting a rogue key. Use a communication channel other than email to verify the fingerprint of your correspondent's key.
+
+# Strings enigmailMsgComposeOverlay.js
+cannot-use-own-key-because = Unable to send the message, because there is a problem with your personal key. { $problem }
+cannot-encrypt-because-missing = Unable to send this message with end-to-end encryption, because there are problems with the keys of the following recipients: { $problem }
+
+# Strings in mimeDecrypt.jsm
+mime-decrypt-encrypted-part-attachment-label = Encrypted message part
+mime-decrypt-encrypted-part-concealed-data = This is an encrypted message part. You need to open it in a separate window by clicking on the attachment.
+
+# Strings in keyserver.jsm
+keyserver-error-aborted = Aborted
+keyserver-error-unknown = An unknown error occurred
+keyserver-error-server-error = The keyserver reported an error.
+keyserver-error-import-error = Failed to import the downloaded key.
+keyserver-error-unavailable = The keyserver is not available.
+keyserver-error-security-error = The keyserver does not support encrypted access.
+keyserver-error-certificate-error = The keyserver’s certificate is not valid.
+keyserver-error-unsupported = The keyserver is not supported.
+
+# Strings in mimeWkdHandler.jsm
+wkd-message-body-req = Your email provider processed your request to upload your public key to the OpenPGP Web Key Directory.\n\nPlease confirm to complete the publishing of your public key.
+wkd-message-body-process = This is an email related to the automatic processing to upload your public key to the OpenPGP Web Key Directory.\n\nYou do not need to take any manual action at this point.
+
+# Strings in persistentCrypto.jsm
+converter-decrypt-body-failed = Could not decrypt message with subject\n{ $subject }.\nDo you want to retry with a different passphrase or do you want to skip the message?
+
+# Strings in gpg.jsm
+unknown-signing-alg = Unknown signing algorithm (ID: { $id })
+unknown-hash-alg = Unknown cryptographic hash (ID: { $id })
+
+#strings in keyUsability.jsm
+expiry-key-expires-soon = Your key { $desc } will expire in less than { $days } days.\n\nWe recommend that you create a new key pair and configure the corresponding accounts to use it.
+expiry-keys-expire-soon = Your following keys will expire in less than { $days } days:\n{ $desc }. We recommend that you create new keys and configure the corresponding accounts to use them.
+expiry-key-missing-owner-trust = Your secret key { $desc } has missing trust.\n\nWe recommend that you set "You rely on certifications" to "ultimate" in key properties.
+expiry-keys-missing-owner-trust = The following of your secret keys have missing trust.\n{ $desc }.\nWe recommend that you set "You rely on certifications" to "ultimate" in key properties.
+expiry-open-key-manager = Open OpenPGP Key Management
+expiry-open-key-properties = Open Key Properties
--- a/mail/extensions/openpgp/content/strings/enigmail.properties
+++ b/mail/extensions/openpgp/content/strings/enigmail.properties
@@ -464,17 +464,17 @@ importInfoNoKeys=No keys imported.
 ### keygen.passRequired=Please specify a passphrase if you want to create a backup copy of your key outside your SmartCard.
 
 # Strings in enigmailSetCardPin.xhtml
 ### cardPin.processFailed=Failed to change PIN
 
 # Strings in enigRetrieveProgres.js
 ### keyserverProgress.refreshing=Refreshing keys, please wait ...
 ### keyserverProgress.uploading=Uploading keys, please wait ...
-keyserverProgress.wksUploadFailed=Could not upload your key to the Web Key Service
+### keyserverProgress.wksUploadFailed=Could not upload your key to the Web Key Service
 ### keyserverProgress.wksUploadCompleted=Your public key was successfully submitted to your provider. You will receive an email to confirm that you initiated the upload.
 ### keyserverTitle.refreshing=Refresh Keys
 ### keyserverTitle.uploading=Key Upload
 ### keyserver.result.download.none=No key downloaded.
 ### keyserver.result.download.1of1=Key successfully downloaded.
 ### keyserver.result.download.1ofN=Successfully downloaded 1 of %S keys.
 ### keyserver.result.download.NofN=Successfully downloaded %1$S of %2$S keys.
 ### keyserver.result.uploadOne=Successfully uploaded 1 key.
@@ -487,43 +487,36 @@ keyserverProgress.wksUploadFailed=Could 
 # Strings in enigmailAddUidDlg.xhtml
 ### addUidDlg.nameOrEmailError=You have to fill in a name and an email address
 ### addUidDlg.nameMinLengthError=The name must at least have 5 characters
 ### addUidDlg.invalidEmailError=You must specify a valid email address
 
 # Strings in enigmailCardDetails.js
 ### Carddetails.NoASCII=OpenPGP Smartcards only support ASCII characters in Firstname/Name.
 
-
 # network error types
 ### errorType.SecurityCertificate=The security certificate presented by the web service is not valid.
 ### errorType.SecurityProtocol=The security protocol used by the web service is unknown.
 ### errorType.Network=A network error has occurred.
 
 # filter stuff
 filter.folderRequired=You must select a target folder.
 filter.decryptMove2.label=Decrypt permanently (OpenPGP)
 filter.decryptCopy2.label=Create decrypted Copy (OpenPGP)
 filter.decryptMove.warnExperimental=Warning - the filter action "Decrypt permanently" may lead to destroyed messages.\n\nWe strongly recommend that you first try the "Create decrypted Copy" filter, test the result carefully, and only start using this filter once you are satisified with the result.
 filter.term.pgpencrypted.label=OpenPGP Encrypted
 filter.encrypt2.label=Encrypt to key (OpenPGP)
 filter.keyRequired=You must select a recipient key.
 filter.keyNotFound=Could not find an encryption key for '%S'.
 filter.warn.keyNotSecret=Warning - the filter action "Encrypt to key" replaces the recipients.\n\nIf you do not have the secret key for '%S' you will no longer be able to read the emails.
 
-# strings in enigmailConvert.jsm
-converter.decryptBody.failed=Could not decrypt message with subject\n'%S'.\nDo you want to retry with a different passphrase or do you want to skip the message?
 ### converter.decryptAtt.failed=Could not decrypt attachment '%1$S'\nof message with subject\n'%2$S'.\nDo you want to retry with a different passphrase or do you want to skip the message?
 
 ### saveLogFile.title=Save Log File
 
-# strings in gpg.jsm
-unknownSigningAlg=Unknown signing algorithm (ID: %S)
-unknownHashAlg=Unknown cryptographic hash (ID: %S)
-
 # strings in keyRing.jsm
 keyring.photo=Photo
 keyRing.pubKeyRevoked=The key %1$S (key ID %2$S) is revoked.
 keyRing.pubKeyExpired=The key %1$S (key ID %2$S) has expired.
 keyRing.pubKeyNotForSigning=The key %1$S (key ID %2$S) cannot be used for signing.
 keyRing.pubKeyNotForEncryption=The key %1$S (key ID %2$S) cannot be used for encryption.
 keyRing.keyDisabled=The key %1$S (key ID %2$S) is disabled; it cannot be used.
 keyRing.keyNotTrusted=The key %1$S (key ID %2$S) is not trusted enough. Please set the trust level of your key to "ultimate" to use it for signing.
@@ -531,41 +524,28 @@ keyRing.keyInvalid2=The key %1$S (key ID
 keyRing.signSubKeysRevoked=All signing-subkeys of key %1$S (key ID %2$S) are revoked.
 keyRing.signSubKeysExpired=All signing-subkeys of key %1$S (key ID %2$S) have expired.
 keyRing.signSubKeysUnusable=All signing-subkeys of key %1$S (key ID %2$S) are revoked, expired or otherwise unusable.
 keyRing.encSubKeysRevoked=All encryption subkeys of key %1$S (key ID %2$S) are revoked.
 keyRing.encSubKeysExpired=All encryption subkeys of key %1$S (key ID %2$S) have expired.
 keyRing.noSecretKey=You do not seem to have the secret key for %1$S (key ID %2$S) on your keyring; you cannot use the key for signing.
 keyRing.encSubKeysUnusable=All encryption subkeys of key %1$S (key ID %2$S) are revoked, expired or otherwise unusable.
 
-
 #strings in exportSettingsWizard.js
 ### cannotWriteToFile=Cannot save to file '%S'. Please select a different file.
 ### dataExportError=An error occurred during exporting your data.
 ### specifyExportFile=Specify file name for exporting
 ### homedirParamNotSUpported=Additional parameters that configure paths such as --homedir and --keyring are not supported for exporting/restoring your settings. Please use alternative methods such as setting the environment variable GNUPGHOME.
 
-#strings in expiry.jsm
-expiry.keyExpiresSoon=Your key %1$S will expire in less than %2$S days.\n\nWe recommend that you create a new key pair and configure the corresponding accounts to use it.
-expiry.keysExpireSoon=Your following keys will expire in less than %1$S days:\n%2$S. We recommend that you create new keys and configure the corresponding accounts to use them.
-expiry.keyMissingOwnerTrust=Your secret key %S has missing trust.\n\nWe recommend that you set "You rely on certifications" to "ultimate" in key properties.
-expiry.keysMissingOwnerTrust=The following of your secret keys have missing trust.\n%S.\nWe recommend that you set "You rely on certifications" to "ultimate" in key properties.
-expiry.OpenKeyManager2=Open OpenPGP Key Management
-expiry.OpenKeyProperties=Open Key Properties
-
 #strings in gpgAgent.jsm
 ### gpghomedir.notexists=The directory '%S' containing your OpenPGP keys does not exist and cannot be created.
 ### gpghomedir.notwritable=The directory '%S' containing your OpenPGP keys is not writable.
 ### gpghomedir.notdirectory=The directory '%S' containing your OpenPGP keys is a file instead of a directory.
 ### gpghomedir.notusable=Please fix the directory permissions or change the location of your GnuPG "home" directory. GnuPG cannot work correctly otherwise.
 
-#strings in mimeWkdHandler.jsm
-wkdMessage.body.req2=Your email provider processed your request to upload your public key to the OpenPGP Web Key Directory.\n\nPlease confirm to complete the publishing of your public key.
-wkdMessage.body.process=This is an email related to the automatic processing to upload your public key to the OpenPGP Web Key Directory.\n\nYou do not need to take any manual action at this point.
-
 ### handshakeDlg.button.initHandshake=Handshake...
 ### handshakeDlg.button.stopTrust=Stop Trusting
 ### handshakeDlg.button.reTrust=Stop Mistrusting
 ### handshakeDlg.label.outgoingMessage=Outgoing message
 ### handshakeDlg.label.incomingMessage=Incoming message
 ### handshakeDlg.error.noPeers=Cannot handshake without any correspondents.
 ### handshakeDlg.error.noProtection=Please enable protection in order to use the "Handshake" function.
 
@@ -573,41 +553,24 @@ wkdMessage.body.process=This is an email
 ### enigmail.acSetupPasswd.descCopyPasswd=Please enter the setup code below on your other device to proceed with the setup.
 
 #strings in autocrypt.jsm
 
 ### autocrypt.setupMsg.subject=Autocrypt Setup Message
 ### autocrypt.setupMsg.msgBody=To set up your new device for Autocrypt, please follow the instuctions that should be presented by your new device.
 ### autocrypt.setupMsg.fileTxt=This is the Autocrypt setup file used to transfer settings and keys between clients. You can decrypt it using the setup code displayed on your old device, then import the key to your keyring.
 
-#strings in keyserver.jsm
-keyserver.error.aborted=Aborted
-keyserver.error.unknown=An unknown error occurred
-keyserver.error.serverError=The keyserver reported an error.
-keyserver.error.importError=Failed to import the downloaded key.
-keyserver.error.unavailable=The keyserver is not available.
-keyserver.error.securityError=The keyserver does not support encrypted access.
-keyserver.error.certificateError=The keyserver’s certificate is not valid.
-keyserver.error.unsupported2=The keyserver is not supported.
-
-#strings in mimeDecrypt.jsm
-mimeDecrypt.encryptedPart.attachmentLabel=Encrypted message part
-mimeDecrypt.encryptedPart.concealedData=This is an encrypted message part. You need to open it in a separate window by clicking on the attachment.
-
 #strings in gnupg-key.jsm
 ### import.secretKeyImportError=An error has occurred in GnuPG while importing secret keys. The import was not successful.
 
 #strings in importSettings.js
 ### importSettings.errorNoFile=The file you specified is not a regular file!
 ### importSettings.cancelWhileInProgress=Restoring is in progress. Do you really want to abort the process?
 ### importSettings.button.abortImport=&Abort process
 
-cannotUseOwnKeyBecause=Unable to send the message, because there is a problem with your personal key. %S
-cannotEncryptBecauseMissing=Unable to send this message with end-to-end encryption, because there are problems with the keys of the following recipients: %S
-
 
 
 
 fileToBigToImport=This file is too big. Please don't import a large set of keys at once.
 cannotSendSigBecauseNoOwnKey=Cannot digitally sign this message, because you haven't yet configured end-to-end encryption for <%S>
 cannotSendEncBecauseNoOwnKey=Cannot send this message encrypted, because you haven't yet configured end-to-end encryption for <%S>
 
 
--- a/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js
+++ b/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js
@@ -2228,20 +2228,22 @@ Enigmail.msg = {
     }
 
     if (senderKeyId) {
       let senderKeyUsable = EnigmailEncryption.determineOwnKeyUsability(
         sendFlags,
         senderKeyId
       );
       if (senderKeyUsable.errorMsg) {
-        let fullAlert = EnigmailLocale.getString("cannotUseOwnKeyBecause", [
-          senderKeyUsable.errorMsg,
-        ]);
-
+        let fullAlert = await document.l10n.formatValue(
+          "cannot-use-own-key-because",
+          {
+            problem: senderKeyUsable.errorMsg,
+          }
+        );
         EnigmailDialog.alert(window, fullAlert);
         return false;
       }
     }
 
     if (gSendEncrypted) {
       let canEncryptDetails = await this.determineSendFlags();
       if (canEncryptDetails.errArray.length != 0) {
@@ -2251,19 +2253,21 @@ Enigmail.msg = {
           if (isFirst) {
             isFirst = false;
           } else {
             allProblems += ", ";
           }
           allProblems += obj.addr;
         }
 
-        let fullAlert = EnigmailLocale.getString(
-          "cannotEncryptBecauseMissing",
-          [allProblems]
+        let fullAlert = await document.l10n.formatValue(
+          "cannot-encrypt-because-missing",
+          {
+            problem: allProblems,
+          }
         );
 
         EnigmailDialog.alert(window, fullAlert);
         showMessageComposeSecurityStatus();
         return false;
       }
     }