diff --git a/src/commands/refreshopenpgpcertscommand.cpp b/src/commands/refreshopenpgpcertscommand.cpp index 6ebefe29a..070a5fc0f 100644 --- a/src/commands/refreshopenpgpcertscommand.cpp +++ b/src/commands/refreshopenpgpcertscommand.cpp @@ -1,135 +1,135 @@ /* -*- mode: c++; c-basic-offset:4 -*- commands/refreshopenpgpcertscommand.cpp This file is part of Kleopatra, the KDE keymanager Copyright (c) 2008 Klarälvdalens Datakonsult AB Kleopatra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Kleopatra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of the Qt library by Trolltech AS, Norway (or with modified versions of Qt that use the same license as Qt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than Qt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ #include #include "refreshopenpgpcertscommand.h" #include #include #include using namespace Kleo; using namespace Kleo::Commands; RefreshOpenPGPCertsCommand::RefreshOpenPGPCertsCommand(KeyListController *c) : GnuPGProcessCommand(c) { setShowsOutputWindow(true); } RefreshOpenPGPCertsCommand::RefreshOpenPGPCertsCommand(QAbstractItemView *v, KeyListController *c) : GnuPGProcessCommand(v, c) { setShowsOutputWindow(true); } RefreshOpenPGPCertsCommand::~RefreshOpenPGPCertsCommand() {} bool RefreshOpenPGPCertsCommand::preStartHook(QWidget *parent) const { if (!haveKeyserverConfigured()) if (KMessageBox::warningContinueCancel(parent, xi18nc("@info", "No OpenPGP directory services have been configured." "If not all of the certificates carry the name of their preferred " "certificate server (few do), a fallback server is needed to fetch from." "Since none is configured, Kleopatra will use " "keys.gnupg.net as the fallback." "You can configure OpenPGP directory servers in Kleopatra's " "configuration dialog." "Do you want to continue with keys.gnupg.net " "as fallback server?"), i18nc("@title:window", "OpenPGP Certificate Refresh"), KStandardGuiItem::cont(), KStandardGuiItem::cancel(), QStringLiteral("warn-refresh-openpgp-missing-keyserver")) != KMessageBox::Continue) { return false; } return KMessageBox::warningContinueCancel(parent, xi18nc("@info", "Refreshing OpenPGP certificates implies downloading all certificates anew, " "to check if any of them have been revoked in the meantime." "This can put a severe strain on your own as well as other people's network " "connections, and can take up to an hour or more to complete, depending on " "your network connection, and the number of certificates to check. " "Are you sure you want to continue?"), i18nc("@title:window", "OpenPGP Certificate Refresh"), KStandardGuiItem::cont(), KStandardGuiItem::cancel(), QStringLiteral("warn-refresh-openpgp-expensive")) == KMessageBox::Continue; } QStringList RefreshOpenPGPCertsCommand::arguments() const { QStringList result; result << gpgPath(); if (!haveKeyserverConfigured()) { result << QStringLiteral("--keyserver") << QStringLiteral("keys.gnupg.net"); } result << QStringLiteral("--refresh-keys"); return result; } QString RefreshOpenPGPCertsCommand::errorCaption() const { return i18nc("@title:window", "OpenPGP Certificate Refresh Error"); } QString RefreshOpenPGPCertsCommand::successCaption() const { return i18nc("@title:window", "OpenPGP Certificate Refresh Finished"); } QString RefreshOpenPGPCertsCommand::crashExitMessage(const QStringList &args) const { return xi18nc("@info", "The GPG process that tried to refresh OpenPGP certificates " "ended prematurely because of an unexpected error." "Please check the output of %1 for details.", args.join(QLatin1Char(' '))); } QString RefreshOpenPGPCertsCommand::errorExitMessage(const QStringList &args) const { - return i18nc("@info", - "An error occurred while trying to refresh OpenPGP certificates. " - "The output from %1 was: %2", - args[0], errorString().replace(QLatin1Char('\n'), QStringLiteral("
"))); + return xi18nc("@info", + "An error occurred while trying to refresh OpenPGP certificates. " + "The output from %1 was: %2", + args[0], errorString()); } QString RefreshOpenPGPCertsCommand::successMessage(const QStringList &) const { return i18nc("@info", "OpenPGP certificates refreshed successfully."); // ### --check-trustdb } diff --git a/src/commands/refreshx509certscommand.cpp b/src/commands/refreshx509certscommand.cpp index e91d6d659..b33756b0c 100644 --- a/src/commands/refreshx509certscommand.cpp +++ b/src/commands/refreshx509certscommand.cpp @@ -1,110 +1,110 @@ /* -*- mode: c++; c-basic-offset:4 -*- commands/refreshx509certscommand.cpp This file is part of Kleopatra, the KDE keymanager Copyright (c) 2008 Klarälvdalens Datakonsult AB Kleopatra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Kleopatra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of the Qt library by Trolltech AS, Norway (or with modified versions of Qt that use the same license as Qt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than Qt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ #include #include "refreshx509certscommand.h" #include #include #include using namespace Kleo; using namespace Kleo::Commands; RefreshX509CertsCommand::RefreshX509CertsCommand(KeyListController *c) : GnuPGProcessCommand(c) { } RefreshX509CertsCommand::RefreshX509CertsCommand(QAbstractItemView *v, KeyListController *c) : GnuPGProcessCommand(v, c) { } RefreshX509CertsCommand::~RefreshX509CertsCommand() {} bool RefreshX509CertsCommand::preStartHook(QWidget *parent) const { return KMessageBox::warningContinueCancel(parent, xi18nc("@info", "Refreshing X.509 certificates implies downloading CRLs for all certificates, " "even if they might otherwise still be valid." "This can put a severe strain on your own as well as other people's network " "connections, and can take up to an hour or more to complete, depending on " "your network connection, and the number of certificates to check. " "Are you sure you want to continue?"), i18nc("@title:window", "X.509 Certificate Refresh"), KStandardGuiItem::cont(), KStandardGuiItem::cancel(), QStringLiteral("warn-refresh-x509-expensive")) == KMessageBox::Continue; } QStringList RefreshX509CertsCommand::arguments() const { return QStringList() << gpgSmPath() << QStringLiteral("-k") << QStringLiteral("--with-validation") << QStringLiteral("--force-crl-refresh") << QStringLiteral("--enable-crl-checks"); } QString RefreshX509CertsCommand::errorCaption() const { return i18nc("@title:window", "X.509 Certificate Refresh Error"); } QString RefreshX509CertsCommand::successCaption() const { return i18nc("@title:window", "X.509 Certificate Refresh Finished"); } QString RefreshX509CertsCommand::crashExitMessage(const QStringList &args) const { return xi18nc("@info", "The GpgSM process that tried to refresh X.509 certificates " "ended prematurely because of an unexpected error." "Please check the output of %1 for details.", args.join(QLatin1Char(' '))); } QString RefreshX509CertsCommand::errorExitMessage(const QStringList &args) const { return xi18nc("@info", "An error occurred while trying to refresh X.509 certificates." - "The output from %1 was: %2", - args[0], errorString().replace(QLatin1Char('\n'), QStringLiteral("
"))); + "The output from %1 was: %2", + args[0], errorString()); } QString RefreshX509CertsCommand::successMessage(const QStringList &) const { return i18nc("@info", "X.509 certificates refreshed successfully."); }