[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: A patchset for KSSL's error messages
From: David Faure <faure () kde ! org>
Date: 2008-02-04 11:03:01
Message-ID: 200802041203.02418.faure () kde ! org
[Download RAW message or body]
On Monday 04 February 2008, Richard Hartmann wrote:
> On Feb 4, 2008 10:44 AM, David Faure <faure@kde.org> wrote:
>
> > I can see that the problem predates your patch, but this still looks very wrong \
> > to me: those strings, marked as "to be translated", are not in a form that is \
> > user-readable in english, in the first place.
> > Shouldn't they be more like i18n("Decode Issuer Public Key Failed") -- or an \
> > even-more readable version of this if you can provide one, something like \
> > i18n("Failed to decode the issuer's public key") ?
>
> I was wondering what those 'messages' were about, as well. I have perfectly fine
> messages in ksslcertificate.cpp so I could just copy those or, even better, make
> kjavaappletserver.cpp use them if someone tells me how to.
Indeed, let's just call the kssl code from there.
The attached patch compiles.
--
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
["kjavaappletserver.cpp.diff" (text/x-diff)]
Index: kjavaappletserver.cpp
===================================================================
--- kjavaappletserver.cpp (revision 769880)
+++ kjavaappletserver.cpp (working copy)
@@ -660,43 +660,10 @@ void KJavaAppletServer::slotJavaRequest(
if (cert) {
certs.prepend(cert);
if (cert->isSigner())
- text += i18n("Signed by (validation: ");
+ text += i18n("Signed by (validation: %1)", \
KSSLCertificate::verifyText(cert->validate())); else
- text += i18n("Certificate (validation: ");
- switch (cert->validate()) {
- case KSSLCertificate::Ok:
- text += i18n("Ok"); break;
- case KSSLCertificate::NoCARoot:
- text += i18n("NoCARoot"); break;
- case KSSLCertificate::InvalidPurpose:
- text += i18n("InvalidPurpose"); break;
- case KSSLCertificate::PathLengthExceeded:
- text += i18n("PathLengthExceeded"); break;
- case KSSLCertificate::InvalidCA:
- text += i18n("InvalidCA"); break;
- case KSSLCertificate::Expired:
- text += i18n("Expired"); break;
- case KSSLCertificate::SelfSigned:
- text += i18n("SelfSigned"); break;
- case KSSLCertificate::ErrorReadingRoot:
- text += i18n("ErrorReadingRoot"); break;
- case KSSLCertificate::Revoked:
- text += i18n("Revoked"); break;
- case KSSLCertificate::Untrusted:
- text += i18n("Untrusted"); break;
- case KSSLCertificate::SignatureFailed:
- text += i18n("SignatureFailed"); break;
- case KSSLCertificate::Rejected:
- text += i18n("Rejected"); break;
- case KSSLCertificate::PrivateKeyFailed:
- text += i18n("PrivateKeyFailed"); break;
- case KSSLCertificate::InvalidHost:
- text += i18n("InvalidHost"); break;
- case KSSLCertificate::Unknown:
- default:
- text += i18n("Unknown"); break;
- }
- text += QString(")\n");
+ text += i18n("Certificate (validation: %1)", \
KSSLCertificate::verifyText(cert->validate())); + text += \
"\n";
QString subject = cert->getSubject() + QChar('\n');
QRegExp reg(QString("/[A-Z]+="));
int pos = 0;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic