aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Brunschwig <[email protected]>2021-05-15 16:56:35 +0200
committerPatrick Brunschwig <[email protected]>2021-05-15 16:56:35 +0200
commit960cd78b5b071b65bd58d2df709eda3847a3d9e5 (patch)
tree177c48f2d0d64e402fcbcb727cd27d77ea4e83fd
parente5bf1c9d070d33f3152b97d21661a815ee747ed6 (diff)
downloadenigmail-960cd78b5b071b65bd58d2df709eda3847a3d9e5.tar.gz
enigmail-960cd78b5b071b65bd58d2df709eda3847a3d9e5.tar.bz2
enigmail-960cd78b5b071b65bd58d2df709eda3847a3d9e5.zip
split signing/encryption reason texts to allow for translations where
signing and encryption require texts
-rw-r--r--ui/content/enigmailMsgComposeOverlay.js38
-rw-r--r--ui/locale/en-US/enigmail.properties17
-rw-r--r--ui/tests/enigmailMsgComposeOverlay-test-f_h.js44
-rw-r--r--ui/tests/enigmailMsgComposeOverlay-test-i_r.js44
4 files changed, 74 insertions, 69 deletions
diff --git a/ui/content/enigmailMsgComposeOverlay.js b/ui/content/enigmailMsgComposeOverlay.js
index f280c460..4ad2af34 100644
--- a/ui/content/enigmailMsgComposeOverlay.js
+++ b/ui/content/enigmailMsgComposeOverlay.js
@@ -454,7 +454,7 @@ Enigmail.msg = {
if (this.getSmimeSigningEnabled()) {
this.sendMode |= SIGN;
- this.reasonSigned = EnigmailLocale.getString("reasonEnabledByDefault");
+ this.reasonSigned = EnigmailLocale.getString("signReasonEnabledByDefault");
}
if (!this.isEnigmailEnabled()) {
@@ -463,11 +463,11 @@ Enigmail.msg = {
if (this.getAccDefault("encrypt")) {
this.sendMode |= ENCRYPT;
- this.reasonEncrypted = EnigmailLocale.getString("reasonEnabledByDefault");
+ this.reasonEncrypted = EnigmailLocale.getString("encryptReasonEnabledByDefault");
}
if (this.getAccDefault("sign")) {
this.sendMode |= SIGN;
- this.reasonSigned = EnigmailLocale.getString("reasonEnabledByDefault");
+ this.reasonSigned = EnigmailLocale.getString("signReasonEnabledByDefault");
}
this.sendPgpMime = true;
@@ -1523,22 +1523,22 @@ Enigmail.msg = {
// process resulting encrypt mode
if (this.encryptForced == EnigmailConstants.ENIG_NEVER) { // force not to encrypt?
encFinally = EnigmailConstants.ENIG_FINAL_FORCENO;
- encReason = EnigmailLocale.getString("reasonManuallyForced");
+ encReason = EnigmailLocale.getString("encryptReasonManuallyForced");
}
else if (this.encryptForced == EnigmailConstants.ENIG_ALWAYS) { // force to encrypt?
encFinally = EnigmailConstants.ENIG_FINAL_FORCEYES;
- encReason = EnigmailLocale.getString("reasonManuallyForced");
+ encReason = EnigmailLocale.getString("encryptReasonManuallyForced");
}
else switch (this.encryptByRules) {
case EnigmailConstants.ENIG_NEVER:
encFinally = EnigmailConstants.ENIG_FINAL_NO;
- encReason = EnigmailLocale.getString("reasonByRecipientRules");
+ encReason = EnigmailLocale.getString("encryptReasonByRecipientRules");
break;
case EnigmailConstants.ENIG_UNDEF:
if (this.sendMode & ENCRYPT) {
encFinally = EnigmailConstants.ENIG_FINAL_YES;
if (pgpEnabled && this.getAccDefault("encrypt")) {
- encReason = EnigmailLocale.getString("reasonEnabledByDefault");
+ encReason = EnigmailLocale.getString("encryptReasonEnabledByDefault");
}
}
else {
@@ -1547,15 +1547,15 @@ Enigmail.msg = {
break;
case EnigmailConstants.ENIG_ALWAYS:
encFinally = EnigmailConstants.ENIG_FINAL_YES;
- encReason = EnigmailLocale.getString("reasonByRecipientRules");
+ encReason = EnigmailLocale.getString("encryptReasonByRecipientRules");
break;
case EnigmailConstants.ENIG_AUTO_ALWAYS:
encFinally = EnigmailConstants.ENIG_FINAL_YES;
- encReason = EnigmailLocale.getString("reasonByAutoEncryption");
+ encReason = EnigmailLocale.getString("encryptReasonByAutoEncryption");
break;
case EnigmailConstants.ENIG_CONFLICT:
encFinally = EnigmailConstants.ENIG_FINAL_CONFLICT;
- encReason = EnigmailLocale.getString("reasonByConflict");
+ encReason = EnigmailLocale.getString("encryptReasonByConflict");
break;
}
EnigmailLog.DEBUG("enigmailMsgComposeOverlay.js: encrypt=" + ((this.sendMode & ENCRYPT) !== 0) + " encryptByRules=" + this.encryptByRules + " encFinally=" + encFinally + "\n");
@@ -1564,22 +1564,22 @@ Enigmail.msg = {
// process resulting sign mode
if (this.signForced == EnigmailConstants.ENIG_NEVER) { // force not to sign?
signFinally = EnigmailConstants.ENIG_FINAL_FORCENO;
- signReason = EnigmailLocale.getString("reasonManuallyForced");
+ signReason = EnigmailLocale.getString("signReasonManuallyForced");
}
else if (this.signForced == EnigmailConstants.ENIG_ALWAYS) { // force to sign?
signFinally = EnigmailConstants.ENIG_FINAL_FORCEYES;
- signReason = EnigmailLocale.getString("reasonManuallyForced");
+ signReason = EnigmailLocale.getString("signReasonManuallyForced");
}
else switch (this.signByRules) {
case EnigmailConstants.ENIG_NEVER:
signFinally = EnigmailConstants.ENIG_FINAL_NO;
- signReason = EnigmailLocale.getString("reasonByRecipientRules");
+ signReason = EnigmailLocale.getString("signReasonByRecipientRules");
break;
case EnigmailConstants.ENIG_UNDEF:
if (this.sendMode & SIGN) {
signFinally = EnigmailConstants.ENIG_FINAL_YES;
if (pgpEnabled && this.getAccDefault("sign-pgp")) {
- signReason = EnigmailLocale.getString("reasonEnabledByDefault");
+ signReason = EnigmailLocale.getString("signReasonEnabledByDefault");
}
}
else {
@@ -1588,11 +1588,11 @@ Enigmail.msg = {
break;
case EnigmailConstants.ENIG_ALWAYS:
signFinally = EnigmailConstants.ENIG_FINAL_YES;
- signReason = EnigmailLocale.getString("reasonByRecipientRules");
+ signReason = EnigmailLocale.getString("signReasonByRecipientRules");
break;
case EnigmailConstants.ENIG_CONFLICT:
signFinally = EnigmailConstants.ENIG_FINAL_CONFLICT;
- signReason = EnigmailLocale.getString("reasonByConflict");
+ signReason = EnigmailLocale.getString("signReasonByConflict");
break;
}
EnigmailLog.DEBUG("enigmailMsgComposeOverlay.js: signed=" + ((this.sendMode & SIGN) !== 0) + " signByRules=" + this.signByRules + " signFinally=" + signFinally + "\n");
@@ -1609,20 +1609,20 @@ Enigmail.msg = {
case EnigmailConstants.ENIG_FINAL_FORCEYES:
if (this.getAccDefault("signIfEnc")) {
signFinally = EnigmailConstants.ENIG_FINAL_YES;
- signReason = EnigmailLocale.getString("reasonByEncryptionMode");
+ signReason = EnigmailLocale.getString("signReasonByEncryptionMode");
}
break;
case EnigmailConstants.ENIG_FINAL_NO:
case EnigmailConstants.ENIG_FINAL_FORCENO:
if (this.getAccDefault("signIfNotEnc")) {
signFinally = EnigmailConstants.ENIG_FINAL_YES;
- signReason = EnigmailLocale.getString("reasonByEncryptionMode");
+ signReason = EnigmailLocale.getString("signReasonByEncryptionMode");
}
break;
case EnigmailConstants.ENIG_FINAL_CONFLICT:
if (this.getAccDefault("signIfEnc") && this.getAccDefault("signIfNotEnc")) {
signFinally = EnigmailConstants.ENIG_FINAL_YES;
- signReason = EnigmailLocale.getString("reasonByEncryptionMode");
+ signReason = EnigmailLocale.getString("signReasonByEncryptionMode");
}
else {
signFinally = EnigmailConstants.ENIG_FINAL_CONFLICT;
diff --git a/ui/locale/en-US/enigmail.properties b/ui/locale/en-US/enigmail.properties
index 95b12e6a..6d3a4b46 100644
--- a/ui/locale/en-US/enigmail.properties
+++ b/ui/locale/en-US/enigmail.properties
@@ -200,12 +200,17 @@ signOn=Signing: ON
signOff=Signing: OFF
signOnWithReason=Signing: ON (%S)
signOffWithReason=Signing: OFF (%S)
-reasonEnabledByDefault=enabled by default
-reasonManuallyForced=manually forced
-reasonByRecipientRules=forced by Autocrypt or per-recipient rules
-reasonByAutoEncryption=forced by auto encryption
-reasonByConflict=due to conflict in per-recipient rules
-reasonByEncryptionMode=due to encryption mode
+encryptReasonEnabledByDefault=enabled by default
+encryptReasonManuallyForced=manually forced
+encryptReasonByRecipientRules=forced by Autocrypt or per-recipient rules
+encryptReasonByAutoEncryption=forced by auto encryption
+encryptReasonByConflict=due to conflict in per-recipient rules
+
+signReasonEnabledByDefault=enabled by default
+signReasonManuallyForced=manually forced
+signReasonByRecipientRules=forced by Autocrypt or per-recipient rules
+signReasonByConflict=due to conflict in per-recipient rules
+signReasonByEncryptionMode=due to encryption mode
# should not be used anymore:
encryptYes=Message will be encrypted
diff --git a/ui/tests/enigmailMsgComposeOverlay-test-f_h.js b/ui/tests/enigmailMsgComposeOverlay-test-f_h.js
index a4ac51c3..212cf2bc 100644
--- a/ui/tests/enigmailMsgComposeOverlay-test-f_h.js
+++ b/ui/tests/enigmailMsgComposeOverlay-test-f_h.js
@@ -663,7 +663,7 @@ function processAccountSpecificDefaultOptions_test() {
Enigmail.msg.processAccountSpecificDefaultOptions();
Assert.equal(Enigmail.msg.sendMode, 1);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonEnabledByDefault"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonEnabledByDefault"));
Assert.equal(Enigmail.msg.sendPgpMime, "");
Enigmail.msg.isEnigmailEnabled = function() {
@@ -683,8 +683,8 @@ function processAccountSpecificDefaultOptions_test() {
Enigmail.msg.processAccountSpecificDefaultOptions();
Assert.equal(Enigmail.msg.sendMode, 3);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonEnabledByDefault"));
- Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("reasonEnabledByDefault"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonEnabledByDefault"));
+ Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("encryptReasonEnabledByDefault"));
Assert.equal(Enigmail.msg.sendPgpMime, true);
Assert.equal(Enigmail.msg.attachOwnKeyObj.appendAttachment, true);
Assert.equal(Enigmail.msg.attachOwnKeyObj.attachedObj, null);
@@ -699,7 +699,7 @@ function processAccountSpecificDefaultOptions_test() {
Enigmail.msg.processAccountSpecificDefaultOptions();
Assert.equal(Enigmail.msg.sendMode, 1);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonEnabledByDefault"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonEnabledByDefault"));
Assert.equal(Enigmail.msg.sendPgpMime, false);
Assert.equal(Enigmail.msg.attachOwnKeyObj.appendAttachment, false);
Assert.equal(Enigmail.msg.attachOwnKeyObj.attachedObj, null);
@@ -714,7 +714,7 @@ function processAccountSpecificDefaultOptions_test() {
Enigmail.msg.processAccountSpecificDefaultOptions();
Assert.equal(Enigmail.msg.sendMode, 0);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonEnabledByDefault"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonEnabledByDefault"));
Assert.equal(Enigmail.msg.sendPgpMime, false);
Assert.equal(Enigmail.msg.attachOwnKeyObj.appendAttachment, false);
Assert.equal(Enigmail.msg.attachOwnKeyObj.attachedObj, null);
@@ -737,7 +737,7 @@ function processAccountSpecificDefaultOptions_test() {
Assert.equal(Enigmail.msg.sendMode, 2);
Assert.equal(Enigmail.msg.reasonSigned, "");
- Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("reasonEnabledByDefault"));
+ Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("encryptReasonEnabledByDefault"));
Assert.equal(Enigmail.msg.sendPgpMime, true);
Assert.equal(Enigmail.msg.attachOwnKeyObj.appendAttachment, true);
Assert.equal(Enigmail.msg.attachOwnKeyObj.attachedObj, null);
@@ -775,20 +775,20 @@ function processFinalState_test() {
Enigmail.msg.encryptForced = EnigmailConstants.ENIG_NEVER;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusEncrypted, EnigmailConstants.ENIG_FINAL_FORCENO);
- Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("reasonManuallyForced"));
+ Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("encryptReasonManuallyForced"));
//Encryption reasonManuallyForced
Enigmail.msg.encryptForced = EnigmailConstants.ENIG_ALWAYS;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusEncrypted, EnigmailConstants.ENIG_FINAL_FORCEYES);
- Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("reasonManuallyForced"));
+ Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("encryptReasonManuallyForced"));
//Encryption reasonByRecipientRules
Enigmail.msg.encryptForced = null;
Enigmail.msg.encryptByRules = EnigmailConstants.ENIG_NEVER;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusEncrypted, EnigmailConstants.ENIG_FINAL_NO);
- Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("reasonByRecipientRules"));
+ Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("encryptReasonByRecipientRules"));
//Encryption reasonEnabledByDefault
Enigmail.msg.encryptByRules = EnigmailConstants.ENIG_UNDEF;
@@ -799,7 +799,7 @@ function processFinalState_test() {
};
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusEncrypted, EnigmailConstants.ENIG_FINAL_YES);
- Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("reasonEnabledByDefault"));
+ Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("encryptReasonEnabledByDefault"));
//Encryption reasonEmpty
Enigmail.msg.encryptByRules = EnigmailConstants.ENIG_UNDEF;
@@ -812,19 +812,19 @@ function processFinalState_test() {
Enigmail.msg.encryptByRules = EnigmailConstants.ENIG_ALWAYS;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusEncrypted, EnigmailConstants.ENIG_FINAL_YES);
- Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("reasonByRecipientRules"));
+ Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("encryptReasonByRecipientRules"));
//Encryption reasonByAutoEncryption
Enigmail.msg.encryptByRules = EnigmailConstants.ENIG_AUTO_ALWAYS;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusEncrypted, EnigmailConstants.ENIG_FINAL_YES);
- Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("reasonByAutoEncryption"));
+ Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("encryptReasonByAutoEncryption"));
//Encryption reasonByConflict
Enigmail.msg.encryptByRules = EnigmailConstants.ENIG_CONFLICT;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusEncrypted, EnigmailConstants.ENIG_FINAL_CONFLICT);
- Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("reasonByConflict"));
+ Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("encryptReasonByConflict"));
//Signing of Key
@@ -832,20 +832,20 @@ function processFinalState_test() {
Enigmail.msg.signForced = EnigmailConstants.ENIG_NEVER;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusSigned, EnigmailConstants.ENIG_FINAL_FORCENO);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonManuallyForced"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonManuallyForced"));
//Signing reasonManuallyForced
Enigmail.msg.signForced = EnigmailConstants.ENIG_ALWAYS;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusSigned, EnigmailConstants.ENIG_FINAL_FORCEYES);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonManuallyForced"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonManuallyForced"));
//Signing reasonByRecipientRules
Enigmail.msg.signForced = null;
Enigmail.msg.signByRules = EnigmailConstants.ENIG_NEVER;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusSigned, EnigmailConstants.ENIG_FINAL_NO);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonByRecipientRules"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonByRecipientRules"));
//Signing reasonEnabledByDefault
Enigmail.msg.signByRules = EnigmailConstants.ENIG_UNDEF;
@@ -861,7 +861,7 @@ function processFinalState_test() {
};
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusSigned, EnigmailConstants.ENIG_FINAL_YES);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonEnabledByDefault"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonEnabledByDefault"));
//Signing reasonEmpty
Enigmail.msg.signByRules = EnigmailConstants.ENIG_UNDEF;
@@ -874,13 +874,13 @@ function processFinalState_test() {
Enigmail.msg.signByRules = EnigmailConstants.ENIG_ALWAYS;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusSigned, EnigmailConstants.ENIG_FINAL_YES);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonByRecipientRules"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonByRecipientRules"));
//Signing reasonByConflict
Enigmail.msg.signByRules = EnigmailConstants.ENIG_CONFLICT;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusSigned, EnigmailConstants.ENIG_FINAL_CONFLICT);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonByConflict"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonByConflict"));
//finalSignDependsOnEncrypt Cases
@@ -893,20 +893,20 @@ function processFinalState_test() {
Enigmail.msg.finalSignDependsOnEncrypt = true;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusSigned, EnigmailConstants.ENIG_FINAL_YES);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonByEncryptionMode"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonByEncryptionMode"));
//Encryption ENIG_NEVER
Enigmail.msg.encryptForced = EnigmailConstants.ENIG_NEVER;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusSigned, EnigmailConstants.ENIG_FINAL_YES);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonByEncryptionMode"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonByEncryptionMode"));
//Encryption encFinally = EnigmailConstants;
Enigmail.msg.encryptForced = null;
Enigmail.msg.encryptByRules = EnigmailConstants.ENIG_CONFLICT;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusSigned, EnigmailConstants.ENIG_FINAL_YES);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonByEncryptionMode"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonByEncryptionMode"));
//Encryption ENIG_CONFLICT
Enigmail.msg.getAccDefault = (prop) => {
diff --git a/ui/tests/enigmailMsgComposeOverlay-test-i_r.js b/ui/tests/enigmailMsgComposeOverlay-test-i_r.js
index 0d4d358d..b25c7ecb 100644
--- a/ui/tests/enigmailMsgComposeOverlay-test-i_r.js
+++ b/ui/tests/enigmailMsgComposeOverlay-test-i_r.js
@@ -481,7 +481,7 @@ function processAccountSpecificDefaultOptions_test() {
Enigmail.msg.processAccountSpecificDefaultOptions();
Assert.equal(Enigmail.msg.sendMode, 1);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonEnabledByDefault"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonEnabledByDefault"));
Assert.equal(Enigmail.msg.sendPgpMime, "");
Enigmail.msg.isEnigmailEnabled = function() {
@@ -501,8 +501,8 @@ function processAccountSpecificDefaultOptions_test() {
Enigmail.msg.processAccountSpecificDefaultOptions();
Assert.equal(Enigmail.msg.sendMode, 3);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonEnabledByDefault"));
- Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("reasonEnabledByDefault"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonEnabledByDefault"));
+ Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("encryptReasonEnabledByDefault"));
Assert.equal(Enigmail.msg.sendPgpMime, true);
Assert.equal(Enigmail.msg.attachOwnKeyObj.appendAttachment, true);
Assert.equal(Enigmail.msg.attachOwnKeyObj.attachedObj, null);
@@ -517,7 +517,7 @@ function processAccountSpecificDefaultOptions_test() {
Enigmail.msg.processAccountSpecificDefaultOptions();
Assert.equal(Enigmail.msg.sendMode, 1);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonEnabledByDefault"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonEnabledByDefault"));
Assert.equal(Enigmail.msg.sendPgpMime, true);
Assert.equal(Enigmail.msg.attachOwnKeyObj.appendAttachment, false);
Assert.equal(Enigmail.msg.attachOwnKeyObj.attachedObj, null);
@@ -532,7 +532,7 @@ function processAccountSpecificDefaultOptions_test() {
Enigmail.msg.processAccountSpecificDefaultOptions();
Assert.equal(Enigmail.msg.sendMode, 0);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonEnabledByDefault"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonEnabledByDefault"));
Assert.equal(Enigmail.msg.sendPgpMime, true);
Assert.equal(Enigmail.msg.attachOwnKeyObj.appendAttachment, false);
Assert.equal(Enigmail.msg.attachOwnKeyObj.attachedObj, null);
@@ -554,7 +554,7 @@ function processAccountSpecificDefaultOptions_test() {
Assert.equal(Enigmail.msg.sendMode, 2);
Assert.equal(Enigmail.msg.reasonSigned, "");
- Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("reasonEnabledByDefault"));
+ Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("encryptReasonEnabledByDefault"));
Assert.equal(Enigmail.msg.sendPgpMime, true);
Assert.equal(Enigmail.msg.attachOwnKeyObj.appendAttachment, true);
Assert.equal(Enigmail.msg.attachOwnKeyObj.attachedObj, null);
@@ -591,20 +591,20 @@ function processFinalState_test() {
Enigmail.msg.encryptForced = EnigmailConstants.ENIG_NEVER;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusEncrypted, EnigmailConstants.ENIG_FINAL_FORCENO);
- Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("reasonManuallyForced"));
+ Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("encryptReasonManuallyForced"));
//Encryption reasonManuallyForced
Enigmail.msg.encryptForced = EnigmailConstants.ENIG_ALWAYS;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusEncrypted, EnigmailConstants.ENIG_FINAL_FORCEYES);
- Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("reasonManuallyForced"));
+ Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("encryptReasonManuallyForced"));
//Encryption reasonByRecipientRules
Enigmail.msg.encryptForced = null;
Enigmail.msg.encryptByRules = EnigmailConstants.ENIG_NEVER;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusEncrypted, EnigmailConstants.ENIG_FINAL_NO);
- Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("reasonByRecipientRules"));
+ Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("encryptReasonByRecipientRules"));
//Encryption reasonEnabledByDefault
Enigmail.msg.encryptByRules = EnigmailConstants.ENIG_UNDEF;
@@ -615,7 +615,7 @@ function processFinalState_test() {
};
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusEncrypted, EnigmailConstants.ENIG_FINAL_YES);
- Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("reasonEnabledByDefault"));
+ Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("encryptReasonEnabledByDefault"));
//Encryption reasonEmpty
Enigmail.msg.encryptByRules = EnigmailConstants.ENIG_UNDEF;
@@ -628,19 +628,19 @@ function processFinalState_test() {
Enigmail.msg.encryptByRules = EnigmailConstants.ENIG_ALWAYS;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusEncrypted, EnigmailConstants.ENIG_FINAL_YES);
- Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("reasonByRecipientRules"));
+ Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("encryptReasonByRecipientRules"));
//Encryption reasonByAutoEncryption
Enigmail.msg.encryptByRules = EnigmailConstants.ENIG_AUTO_ALWAYS;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusEncrypted, EnigmailConstants.ENIG_FINAL_YES);
- Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("reasonByAutoEncryption"));
+ Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("encryptReasonByAutoEncryption"));
//Encryption reasonByConflict
Enigmail.msg.encryptByRules = EnigmailConstants.ENIG_CONFLICT;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusEncrypted, EnigmailConstants.ENIG_FINAL_CONFLICT);
- Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("reasonByConflict"));
+ Assert.equal(Enigmail.msg.reasonEncrypted, EnigmailLocale.getString("encryptReasonByConflict"));
//Signing of Key
@@ -648,20 +648,20 @@ function processFinalState_test() {
Enigmail.msg.signForced = EnigmailConstants.ENIG_NEVER;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusSigned, EnigmailConstants.ENIG_FINAL_FORCENO);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonManuallyForced"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonManuallyForced"));
//Signing reasonManuallyForced
Enigmail.msg.signForced = EnigmailConstants.ENIG_ALWAYS;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusSigned, EnigmailConstants.ENIG_FINAL_FORCEYES);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonManuallyForced"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonManuallyForced"));
//Signing reasonByRecipientRules
Enigmail.msg.signForced = null;
Enigmail.msg.signByRules = EnigmailConstants.ENIG_NEVER;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusSigned, EnigmailConstants.ENIG_FINAL_NO);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonByRecipientRules"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonByRecipientRules"));
//Signing reasonEnabledByDefault
Enigmail.msg.signByRules = EnigmailConstants.ENIG_UNDEF;
@@ -677,7 +677,7 @@ function processFinalState_test() {
};
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusSigned, EnigmailConstants.ENIG_FINAL_YES);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonEnabledByDefault"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonEnabledByDefault"));
//Signing reasonEmpty
Enigmail.msg.signByRules = EnigmailConstants.ENIG_UNDEF;
@@ -690,13 +690,13 @@ function processFinalState_test() {
Enigmail.msg.signByRules = EnigmailConstants.ENIG_ALWAYS;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusSigned, EnigmailConstants.ENIG_FINAL_YES);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonByRecipientRules"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonByRecipientRules"));
//Signing reasonByConflict
Enigmail.msg.signByRules = EnigmailConstants.ENIG_CONFLICT;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusSigned, EnigmailConstants.ENIG_FINAL_CONFLICT);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonByConflict"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonByConflict"));
//finalSignDependsOnEncrypt Cases
@@ -709,20 +709,20 @@ function processFinalState_test() {
Enigmail.msg.finalSignDependsOnEncrypt = true;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusSigned, EnigmailConstants.ENIG_FINAL_YES);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonByEncryptionMode"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonByEncryptionMode"));
//Encryption ENIG_NEVER
Enigmail.msg.encryptForced = EnigmailConstants.ENIG_NEVER;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusSigned, EnigmailConstants.ENIG_FINAL_YES);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonByEncryptionMode"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonByEncryptionMode"));
//Encryption encFinally = EnigmailConstants;
Enigmail.msg.encryptForced = null;
Enigmail.msg.encryptByRules = EnigmailConstants.ENIG_CONFLICT;
Enigmail.msg.processFinalState();
Assert.equal(Enigmail.msg.statusSigned, EnigmailConstants.ENIG_FINAL_YES);
- Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("reasonByEncryptionMode"));
+ Assert.equal(Enigmail.msg.reasonSigned, EnigmailLocale.getString("signReasonByEncryptionMode"));
//Encryption ENIG_CONFLICT
Enigmail.msg.getAccDefault = (prop) => {