summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--framework/src/domain/mime/mimetreeparser/messagepart.cpp33
-rw-r--r--framework/src/domain/mime/mimetreeparser/nodehelper.cpp1
2 files changed, 15 insertions, 19 deletions
diff --git a/framework/src/domain/mime/mimetreeparser/messagepart.cpp b/framework/src/domain/mime/mimetreeparser/messagepart.cpp
index b6244a5a..204681b6 100644
--- a/framework/src/domain/mime/mimetreeparser/messagepart.cpp
+++ b/framework/src/domain/mime/mimetreeparser/messagepart.cpp
@@ -43,8 +43,6 @@
43#include <gpgme++/keylistresult.h> 43#include <gpgme++/keylistresult.h>
44#include <gpgme.h> 44#include <gpgme.h>
45 45
46#include <KLocalizedString>
47
48#include <QTextCodec> 46#include <QTextCodec>
49#include <sstream> 47#include <sstream>
50 48
@@ -683,7 +681,7 @@ SignedMessagePart::SignedMessagePart(ObjectTreeParser *otp,
683 mMetaData.isSigned = true; 681 mMetaData.isSigned = true;
684 mMetaData.isGoodSignature = false; 682 mMetaData.isGoodSignature = false;
685 mMetaData.keyTrust = GpgME::Signature::Unknown; 683 mMetaData.keyTrust = GpgME::Signature::Unknown;
686 mMetaData.status = i18n("Wrong Crypto Plug-In."); 684 mMetaData.status = tr("Wrong Crypto Plug-In.");
687 mMetaData.status_code = GPGME_SIG_STAT_NONE; 685 mMetaData.status_code = GPGME_SIG_STAT_NONE;
688} 686}
689 687
@@ -708,7 +706,7 @@ bool SignedMessagePart::okVerify(const QByteArray &data, const QByteArray &signa
708 706
709 mMetaData.isSigned = false; 707 mMetaData.isSigned = false;
710 mMetaData.keyTrust = GpgME::Signature::Unknown; 708 mMetaData.keyTrust = GpgME::Signature::Unknown;
711 mMetaData.status = i18n("Wrong Crypto Plug-In."); 709 mMetaData.status = tr("Wrong Crypto Plug-In.");
712 mMetaData.status_code = GPGME_SIG_STAT_NONE; 710 mMetaData.status_code = GPGME_SIG_STAT_NONE;
713 711
714 const QByteArray mementoName = "verification"; 712 const QByteArray mementoName = "verification";
@@ -772,21 +770,20 @@ bool SignedMessagePart::okVerify(const QByteArray &data, const QByteArray &signa
772 770
773 if (!mCryptoProto) { 771 if (!mCryptoProto) {
774 if (cryptPlugDisplayName.isEmpty()) { 772 if (cryptPlugDisplayName.isEmpty()) {
775 errorMsg = i18n("No appropriate crypto plug-in was found."); 773 errorMsg = tr("No appropriate crypto plug-in was found.");
776 } else { 774 } else {
777 errorMsg = i18nc("%1 is either 'OpenPGP' or 'S/MIME'", 775 errorMsg = tr("%1 is either 'OpenPGP' or 'S/MIME'",
778 "No %1 plug-in was found.", 776 "No %1 plug-in was found.").arg(
779 cryptPlugDisplayName); 777 cryptPlugDisplayName);
780 } 778 }
781 } else { 779 } else {
782 errorMsg = i18n("Crypto plug-in \"%1\" cannot verify signatures.", 780 errorMsg = tr("Crypto plug-in \"%1\" cannot verify signatures.").arg(
783 cryptPlugLibName); 781 cryptPlugLibName);
784 } 782 }
785 mMetaData.errorText = i18n("The message is signed, but the " 783 mMetaData.errorText = tr("The message is signed, but the "
786 "validity of the signature cannot be " 784 "validity of the signature cannot be "
787 "verified.<br />" 785 "verified.<br />"
788 "Reason: %1", 786 "Reason: %1").arg(errorMsg);
789 errorMsg);
790 } 787 }
791 //TODO don't delete in async case 788 //TODO don't delete in async case
792 if (m) { 789 if (m) {
@@ -1018,7 +1015,7 @@ EncryptedMessagePart::EncryptedMessagePart(ObjectTreeParser *otp,
1018 mMetaData.isEncrypted = false; 1015 mMetaData.isEncrypted = false;
1019 mMetaData.isDecryptable = false; 1016 mMetaData.isDecryptable = false;
1020 mMetaData.keyTrust = GpgME::Signature::Unknown; 1017 mMetaData.keyTrust = GpgME::Signature::Unknown;
1021 mMetaData.status = i18n("Wrong Crypto Plug-In."); 1018 mMetaData.status = tr("Wrong Crypto Plug-In.");
1022 mMetaData.status_code = GPGME_SIG_STAT_NONE; 1019 mMetaData.status_code = GPGME_SIG_STAT_NONE;
1023} 1020}
1024 1021
@@ -1079,14 +1076,14 @@ bool EncryptedMessagePart::okDecryptMIME(KMime::Content &data)
1079 1076
1080 if (!mCryptoProto) { 1077 if (!mCryptoProto) {
1081 mError = UnknownError; 1078 mError = UnknownError;
1082 mMetaData.errorText = i18n("No appropriate crypto plug-in was found."); 1079 mMetaData.errorText = tr("No appropriate crypto plug-in was found.");
1083 return false; 1080 return false;
1084 } 1081 }
1085 1082
1086 QGpgME::DecryptVerifyJob *job = mCryptoProto->decryptVerifyJob(); 1083 QGpgME::DecryptVerifyJob *job = mCryptoProto->decryptVerifyJob();
1087 if (!job) { 1084 if (!job) {
1088 mError = UnknownError; 1085 mError = UnknownError;
1089 mMetaData.errorText = i18n("Crypto plug-in \"%1\" cannot decrypt messages.", mCryptoProto->name()); 1086 mMetaData.errorText = tr("Crypto plug-in \"%1\" cannot decrypt messages.").arg(mCryptoProto->name());
1090 return false; 1087 return false;
1091 } 1088 }
1092 1089
@@ -1140,14 +1137,14 @@ bool EncryptedMessagePart::okDecryptMIME(KMime::Content &data)
1140 1137
1141 if(noSecKey) { 1138 if(noSecKey) {
1142 mError = NoKeyError; 1139 mError = NoKeyError;
1143 mMetaData.errorText = i18n("Crypto plug-in \"%1\" could not decrypt the data. ", mCryptoProto->name()) 1140 mMetaData.errorText = tr("Crypto plug-in \"%1\" could not decrypt the data. ").arg(mCryptoProto->name())
1144 + i18n("No key found for recepients."); 1141 + tr("No key found for recepients.");
1145 } else if (passphraseError) { 1142 } else if (passphraseError) {
1146 mError = PassphraseError; 1143 mError = PassphraseError;
1147 } else { 1144 } else {
1148 mError = UnknownError; 1145 mError = UnknownError;
1149 mMetaData.errorText = i18n("Crypto plug-in \"%1\" could not decrypt the data. ", mCryptoProto->name()) 1146 mMetaData.errorText = tr("Crypto plug-in \"%1\" could not decrypt the data. ").arg(mCryptoProto->name())
1150 + i18n("Error: %1", mMetaData.errorText); 1147 + tr("Error: %1").arg(mMetaData.errorText);
1151 } 1148 }
1152 return false; 1149 return false;
1153 } 1150 }
diff --git a/framework/src/domain/mime/mimetreeparser/nodehelper.cpp b/framework/src/domain/mime/mimetreeparser/nodehelper.cpp
index a8af4e19..c75ee102 100644
--- a/framework/src/domain/mime/mimetreeparser/nodehelper.cpp
+++ b/framework/src/domain/mime/mimetreeparser/nodehelper.cpp
@@ -27,7 +27,6 @@
27#include <KMime/Headers> 27#include <KMime/Headers>
28 28
29#include <QTemporaryFile> 29#include <QTemporaryFile>
30#include <KLocalizedString>
31#include <kcharsets.h> 30#include <kcharsets.h>
32 31
33#include <QUrl> 32#include <QUrl>