From 2a09965426b414add85988d73c36ce806fb58e16 Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Fri, 9 Jan 2026 10:12:37 +0200 Subject: [PATCH] Update Warning dialogs IB-7962 Signed-off-by: Raul Metsma --- client/Application.cpp | 83 +++--- client/Application.h | 2 +- client/CDoc1.cpp | 6 +- client/CryptoDoc.cpp | 99 +++++-- client/DigiDoc.cpp | 104 ++++--- client/DigiDoc.h | 4 +- client/DocumentModel.cpp | 28 +- client/LdapSearch.h | 2 +- client/MainWindow.cpp | 48 ++-- client/QSigner.cpp | 30 +- client/QSigner.h | 4 +- client/common_enums.h | 8 - client/dialogs/AddRecipients.cpp | 51 ++-- client/dialogs/AddRecipients.h | 2 +- client/dialogs/CertificateDetails.cpp | 2 +- client/dialogs/FileDialog.cpp | 29 +- client/dialogs/MobileProgress.cpp | 13 +- client/dialogs/SettingsDialog.cpp | 29 +- client/dialogs/SmartIDProgress.cpp | 21 +- client/dialogs/WarningDialog.cpp | 56 ++-- client/dialogs/WarningDialog.h | 23 +- client/dialogs/WarningDialog.ui | 68 ++--- client/translations/en.ts | 375 ++++++++++++++----------- client/translations/et.ts | 383 +++++++++++++++----------- client/translations/ru.ts | 371 ++++++++++++++----------- client/widgets/ContainerPage.cpp | 26 +- client/widgets/FileList.cpp | 45 +-- client/widgets/ItemList.cpp | 15 +- client/widgets/ItemList.h | 10 +- client/widgets/ItemList.ui | 8 +- client/widgets/SignatureItem.cpp | 11 +- client/widgets/VerifyCert.cpp | 32 ++- 32 files changed, 1156 insertions(+), 832 deletions(-) diff --git a/client/Application.cpp b/client/Application.cpp index 99541868e..1f41c7ffe 100644 --- a/client/Application.cpp +++ b/client/Application.cpp @@ -66,6 +66,7 @@ class MacMenuBar {}; #include #include #include +#include #include #include #include @@ -197,11 +198,14 @@ class DigidocConf final: public digidoc::XmlConfCurrent if(static std::atomic_bool isShown(false); !isShown.exchange(true)) { dispatchToMain([] { - WarningDialog::show(Application::tr( - "The renewal of Trust Service status List, used for digital signature validation, has failed. " - "Please check your internet connection and make sure you have the latest ID-software version " - "installed. An expired Trust Service List (TSL) will be used for signature validation. " - "Additional information"), QString()); + WarningDialog::create() + ->withTitle(Application::tr("The renewal of Trust Service status List has failed")) + ->withText(Application::tr( + "Trust Service status List is used for digital signature validation. " + "Please check your internet connection and make sure you have the latest ID-software version " + "installed. An expired Trust Service List (TSL) will be used for signature validation. " + "Additional information")) + ->open(); }); } return true; @@ -344,6 +348,8 @@ Application::Application( int &argc, char **argv ) connect(this, &Application::messageReceived, this, qOverload(&Application::parseArgs)); #endif + QFontDatabase::addApplicationFont(QStringLiteral(":/fonts/Roboto-Bold.ttf")); + #ifdef CONFIG_URL d->conf = new Configuration(this); QMetaObject::invokeMethod(this, [this] { @@ -354,47 +360,48 @@ Application::Application( int &argc, char **argv ) WarningDialog *dlg{}; if(lessThanVersion(QLatin1String("QDIGIDOC4-UNSUPPORTED"))) { - dlg = WarningDialog::show(tr( - "This version of ID-software on your computer is unsupported. " - "DigiDoc4 Client cannot be used until you update ID-software. " - "Install new ID-software from www.id.ee. " - "macOS users can download the latest ID-software version from the " - "Mac App Store.")); + dlg = WarningDialog::create() + ->withTitle(tr("This version of ID-software on your computer is unsupported")) + ->withText(tr("DigiDoc4 Client cannot be used until you update ID-software. " + "Install new ID-software from www.id.ee. " + "macOS users can download the latest ID-software version from the " + "Mac App Store.")); connect(dlg, &WarningDialog::finished, this, &Application::quit); } else if(lessThanVersion(QLatin1String("QDIGIDOC4-SUPPORTED"))) { - dlg = WarningDialog::show(tr( - "Your ID-software has expired. To download the latest software version, go to the " - "id.ee website. " - "macOS users can download the latest ID-software version from the " - "Mac App Store.")); + dlg = WarningDialog::create() + ->withTitle(tr("Your ID-software has expired")) + ->withText(tr("To download the latest software version, go to the " + "id.ee website. " + "macOS users can download the latest ID-software version from the " + "Mac App Store.")); } connect(d->conf, &Configuration::finished, this, [lessThanVersion](bool changed, const QString &){ if(changed && lessThanVersion(QLatin1String("QDIGIDOC4-LATEST"))) { - auto *dlg = new WarningDialog(tr( - "An ID-software update has been found. To download the update, go to the " - "id.ee website. " - "macOS users can download the update from the " - "Mac App Store."), activeWindow()); + auto *dlg = WarningDialog::create(activeWindow()) + ->withTitle(tr("An ID-software update has been found")) + ->withText(tr("To download the update, go to the " + "id.ee website. " + "macOS users can download the update from the " + "Mac App Store.")); new Overlay(dlg, activeWindow()); dlg->exec(); } }); -#ifdef Q_OS_WIN if(dlg) { - dlg->addButton(tr("Start downloading"), 2); - connect(dlg, &WarningDialog::finished, this, [](int result) { - if(result != 2) - return; +#ifdef Q_OS_WIN + dlg->addButton(tr("Start downloading"), QMessageBox::Ok); + connect(dlg, &WarningDialog::accepted, this, [] { QString path = QApplication::applicationDirPath() + QLatin1String("/id-updater.exe"); if (QFile::exists(path)) QProcess::startDetached(path, {}); }); - } #endif + dlg->open(); + } }, Qt::QueuedConnection); #endif @@ -470,11 +477,11 @@ Application::Application( int &argc, char **argv ) #ifdef Q_OS_MAC if(!Settings::PLUGINS.isSet()) { - auto *dlg = new WarningDialog(tr( - "In order to authenticate and sign in e-services with an ID-card you need to install the web browser components."), mainWindow()); - dlg->setCancelText(tr("Ignore forever")); - dlg->addButton(tr("Remind later"), QMessageBox::Ignore); - dlg->addButton(tr("Install"), QMessageBox::Open); + auto *dlg = WarningDialog::create() + ->withText(tr("In order to authenticate and sign in e-services with an ID-card you need to install the web browser components.")) + ->setCancelText(tr("Ignore forever")) + ->addButton(tr("Remind later"), QMessageBox::Ignore) + ->addButton(tr("Install"), QMessageBox::Open); connect(dlg, &WarningDialog::finished, this, [](int result) { switch(result) { @@ -809,11 +816,15 @@ bool Application::notify(QObject *object, QEvent *event) } catch(const std::bad_alloc &e) { - WarningDialog::show(tr("Added file(s) exceeds the maximum size limit of the container(120MB)."), QString::fromLocal8Bit(e.what())); + WarningDialog::create() + ->withTitle(DocumentModel::tr("Failed to add file")) + ->withText(tr("Added file(s) exceeds the maximum size limit of the container(120MB).")) + ->withDetails(QString::fromLocal8Bit(e.what())) + ->open(); } catch(...) { - WarningDialog::show(tr("Caught exception!")); + WarningDialog::create()->withTitle(tr("Caught exception!"))->open(); } return false; @@ -944,11 +955,11 @@ void Application::showClient(QStringList files, bool crypto, bool sign, bool new }); } -void Application::showWarning( const QString &msg, const digidoc::Exception &e ) +void Application::showWarning(const QString &title, const digidoc::Exception &e) { digidoc::Exception::ExceptionCode code = digidoc::Exception::General; QStringList causes = DigiDoc::parseException(e, code); - WarningDialog::show(msg, causes.join('\n')); + WarningDialog::create()->withTitle(title)->withDetails(causes.join('\n'))->open(); } QSigner* Application::signer() const { return d->signer; } diff --git a/client/Application.h b/client/Application.h index 1bc595707..c458af40a 100644 --- a/client/Application.h +++ b/client/Application.h @@ -92,7 +92,7 @@ private Q_SLOTS: static void msgHandler(QtMsgType type, const QMessageLogContext &ctx, const QString &msg); static void parseArgs(const QString &msg = {}); static void parseArgs(QStringList args); - static void showWarning(const QString &msg, const digidoc::Exception &e); + static void showWarning(const QString &title, const digidoc::Exception &e); #if defined(Q_OS_MAC) static void initMacEvents(); static void deinitMacEvents(); diff --git a/client/CDoc1.cpp b/client/CDoc1.cpp index 338797151..202aeac8a 100644 --- a/client/CDoc1.cpp +++ b/client/CDoc1.cpp @@ -24,10 +24,10 @@ #include "QCryptoBackend.h" #include "QSigner.h" #include "Utils.h" -#include "dialogs/FileDialog.h" #include #include +#include #include #include #include @@ -68,7 +68,7 @@ const QHash CDoc1::SHA_MTH{ CDoc1::CDoc1(const QString &path) : QFile(path) { - setLastError(CryptoDoc::tr("An error occurred while opening the document.")); + setLastError(CryptoDoc::tr("An error occurred while opening the document")); if(!open(QFile::ReadOnly)) return; readXML(this, [this](QXmlStreamReader &xml) { @@ -195,7 +195,7 @@ bool CDoc1::decryptPayload(const QByteArray &key) return setLastError(CryptoDoc::tr("Error parsing document")); data = Crypto::cipher(ENC_MTH[method], key, data, false); if(data.isEmpty()) - return setLastError(CryptoDoc::tr("Failed to decrypt document")); + return setLastError(QCoreApplication::translate("QSigner", "Failed to decrypt document")); // remove ANSIX923 padding if(data.size() > 0 && method == AES128CBC_MTH) diff --git a/client/CryptoDoc.cpp b/client/CryptoDoc.cpp index 2b197b64a..51a5132f3 100644 --- a/client/CryptoDoc.cpp +++ b/client/CryptoDoc.cpp @@ -49,7 +49,7 @@ class CryptoDoc::Private final: public QThread { Q_OBJECT public: - bool isEncryptedWarning() const; + bool isEncryptedWarning(const QString &title) const; void run() final; inline void waitForFinished() { @@ -67,12 +67,12 @@ class CryptoDoc::Private final: public QThread QStringList tempFiles; }; -bool CryptoDoc::Private::isEncryptedWarning() const +bool CryptoDoc::Private::isEncryptedWarning(const QString &title) const { if( fileName.isEmpty() ) - WarningDialog::show(CryptoDoc::tr("Container is not open")); + WarningDialog::create()->withTitle(title)->withText(CryptoDoc::tr("Container is not open"))->open(); if(isEncrypted) - WarningDialog::show(CryptoDoc::tr("Container is encrypted")); + WarningDialog::create()->withTitle(title)->withText(CryptoDoc::tr("Container is encrypted"))->open(); return fileName.isEmpty() || isEncrypted; } @@ -96,7 +96,7 @@ CDocumentModel::CDocumentModel(CryptoDoc::Private *doc) bool CDocumentModel::addFile(const QString &file, const QString &mime) { - if( d->isEncryptedWarning() ) + if(d->isEncryptedWarning(DocumentModel::tr("Failed to add file"))) return false; QFileInfo info(file); @@ -105,8 +105,11 @@ bool CDocumentModel::addFile(const QString &file, const QString &mime) if(d->cdoc->version() == 1 && info.size() > 120*1024*1024) { - WarningDialog::show(tr("Added file(s) exceeds the maximum size limit of the container (∼120MB). " - "Read more about it")); + WarningDialog::create() + ->withTitle(DocumentModel::tr("Failed to add file")) + ->withText(tr("Added file(s) exceeds the maximum size limit of the container (∼120MB). " + "Read more about it")) + ->open(); return false; } @@ -137,7 +140,10 @@ QString CDocumentModel::copy(int row, const QString &dst) const file.data->seek(0); if(QFile f(dst); f.open(QFile::WriteOnly) && copyIODevice(file.data.get(), &f) == file.size) return dst; - WarningDialog::show(tr("Failed to save file '%1'").arg(dst)); + WarningDialog::create() + ->withTitle(FileDialog::tr("Failed to save file")) + ->withText(dst) + ->open(); return {}; } @@ -175,12 +181,15 @@ void CDocumentModel::open(int row) bool CDocumentModel::removeRow(int row) { - if(d->isEncryptedWarning()) + if(d->isEncryptedWarning(DocumentModel::tr("Failed remove document from container"))) return false; if(d->cdoc->files.empty() || row >= d->cdoc->files.size()) { - WarningDialog::show(DocumentModel::tr("Internal error")); + WarningDialog::create() + ->withTitle(DocumentModel::tr("Failed remove document from container")) + ->withText(DocumentModel::tr("Internal error")) + ->open(); return false; } @@ -307,11 +316,14 @@ CryptoDoc::~CryptoDoc() { clear(); delete d; } bool CryptoDoc::addKey( const CKey &key ) { - if(d->isEncryptedWarning()) + if(d->isEncryptedWarning(tr("Failed to add key"))) return false; if(d->cdoc->keys.contains(key)) { - WarningDialog::show(tr("Key already exists")); + WarningDialog::create() + ->withTitle(tr("Failed to add key")) + ->withText(tr("Key already exists")) + ->open(); return false; } d->cdoc->keys.append(key); @@ -349,7 +361,10 @@ bool CryptoDoc::decrypt() { if( d->fileName.isEmpty() ) { - WarningDialog::show(tr("Container is not open")); + WarningDialog::create() + ->withTitle(QSigner::tr("Failed to decrypt document")) + ->withText(tr("Container is not open")) + ->open(); return false; } if(!d->isEncrypted) @@ -358,18 +373,23 @@ bool CryptoDoc::decrypt() CKey key = d->cdoc->canDecrypt(qApp->signer()->tokenauth().cert()); if(key.key.isEmpty()) { - WarningDialog::show(tr("You do not have the key to decrypt this document")); + WarningDialog::create() + ->withTitle(QSigner::tr("Failed to decrypt document")) + ->withText(tr("You do not have the key to decrypt this document")) + ->open(); return false; } if(d->cdoc->version() == 2 && !key.transaction_id.isEmpty() && !Settings::CDOC2_NOTIFICATION.isSet()) { - auto *dlg = new WarningDialog(tr("You must enter your PIN code twice in order to decrypt the CDOC2 container. " - "The first PIN entry is required for authentication to the key server referenced in the CDOC2 container. " - "Second PIN entry is required to decrypt the CDOC2 container."), Application::mainWindow()); - dlg->setCancelText(WarningDialog::Cancel); - dlg->addButton(WarningDialog::OK, QMessageBox::Ok); - dlg->addButton(tr("Don't show again"), QMessageBox::Ignore); + auto *dlg = WarningDialog::create() + ->withTitle(QSigner::tr("Failed to decrypt document")) + ->withText(tr("You must enter your PIN code twice in order to decrypt the CDOC2 container. " + "The first PIN entry is required for authentication to the key server referenced in the CDOC2 container. " + "Second PIN entry is required to decrypt the CDOC2 container.")) + ->setCancelText(WarningDialog::Cancel) + ->addButton(WarningDialog::OK, QMessageBox::Ok) + ->addButton(tr("Don't show again"), QMessageBox::Ignore); switch (dlg->exec()) { case QMessageBox::Ok: break; @@ -386,15 +406,25 @@ bool CryptoDoc::decrypt() #endif if(d->key.isEmpty()) { - WarningDialog::show(tr("Failed to decrypt document. Please check your internet connection and network settings."), d->cdoc->lastError); + WarningDialog::create() + ->withTitle(QSigner::tr("Failed to decrypt document")) + ->withText(tr("Please check your internet connection and network settings.")) + ->withDetails(d->cdoc->lastError) + ->open(); return false; } d->waitForFinished(); if(d->isEncrypted) - WarningDialog::show(tr("Error parsing document")); + WarningDialog::create() + ->withTitle(QSigner::tr("Failed to decrypt document")) + ->withText(tr("Error parsing document")) + ->open(); if(!d->cdoc->lastError.isEmpty()) - WarningDialog::show(d->cdoc->lastError); + WarningDialog::create() + ->withTitle(QSigner::tr("Failed to decrypt document")) + ->withDetails(d->cdoc->lastError) + ->open(); return !d->isEncrypted; } @@ -407,14 +437,20 @@ bool CryptoDoc::encrypt( const QString &filename ) d->fileName = filename; if( d->fileName.isEmpty() ) { - WarningDialog::show(tr("Container is not open")); + WarningDialog::create() + ->withTitle(tr("Failed to encrypt document")) + ->withText(tr("Container is not open")) + ->open(); return false; } if(d->isEncrypted) return true; if(d->cdoc->keys.isEmpty()) { - WarningDialog::show(tr("No keys specified")); + WarningDialog::create() + ->withTitle(tr("Failed to encrypt document")) + ->withText(tr("No keys specified")) + ->open(); return false; } @@ -422,7 +458,11 @@ bool CryptoDoc::encrypt( const QString &filename ) if(d->isEncrypted) open(d->fileName); else - WarningDialog::show(tr("Failed to encrypt document. Please check your internet connection and network settings."), d->cdoc->lastError); + WarningDialog::create() + ->withTitle(tr("Failed to encrypt document")) + ->withText(tr("Please check your internet connection and network settings.")) + ->withDetails(d->cdoc->lastError) + ->open(); return d->isEncrypted; } @@ -450,7 +490,10 @@ bool CryptoDoc::open( const QString &file ) d->isEncrypted = bool(d->cdoc); if(!d->isEncrypted || d->cdoc->keys.isEmpty()) { - WarningDialog::show(tr("Failed to open document"), d->cdoc->lastError); + WarningDialog::create() + ->withTitle(tr("Failed to open document")) + ->withDetails(d->cdoc->lastError) + ->open(); return false; } Application::addRecent( file ); @@ -459,7 +502,7 @@ bool CryptoDoc::open( const QString &file ) void CryptoDoc::removeKey( int id ) { - if(!d->isEncryptedWarning()) + if(!d->isEncryptedWarning(tr("Failed to remove key"))) d->cdoc->keys.removeAt(id); } diff --git a/client/DigiDoc.cpp b/client/DigiDoc.cpp index fe198e11c..1ad80dfe7 100644 --- a/client/DigiDoc.cpp +++ b/client/DigiDoc.cpp @@ -22,9 +22,7 @@ #include "Application.h" #include "CheckConnection.h" #include "Common.h" -#include "QPCSC.h" #include "QSigner.h" -#include "SslCertificate.h" #include "TokenData.h" #include "Utils.h" #include "dialogs/FileDialog.h" @@ -56,18 +54,24 @@ struct ServiceConfirmation final: public ContainerOpenCB bool validateOnline() const final { if(!CheckConnection().check()) return dispatchToMain([this] { - WarningDialog::show(parent, DigiDoc::tr("Connecting to SiVa server failed! Please check your internet connection and network settings.")); + WarningDialog::create(parent) + ->withTitle(DigiDoc::tr("Connecting to SiVa server failed!")) + ->withText(DigiDoc::tr("Please check your internet connection and network settings.")) + ->open(); return false; }); return dispatchToMain([this] { - auto *dlg = new WarningDialog(DigiDoc::tr("This type of signed document will be transmitted to the " - "Digital Signature Validation Service SiVa to verify the validity of the digital signature. " - "Read more information about transmitted data to Digital Signature Validation service from " - "here.
" - "Do you want to continue?"), parent); - dlg->setCancelText(WarningDialog::Cancel); - dlg->addButton(WarningDialog::YES, QMessageBox::Yes); - return dlg->exec() == QMessageBox::Yes; + return WarningDialog::create(parent) + ->withTitle(DigiDoc::tr("Send document to SiVa")) + ->withText(DigiDoc::tr( + "This type of signed document will be transmitted to the " + "Digital Signature Validation Service SiVa to verify the validity of the digital signature. " + "Read more information about transmitted data to Digital Signature Validation service from " + "here.
" + "Do you want to continue?")) + ->setCancelText(WarningDialog::Cancel) + ->addButton(WarningDialog::YES, QMessageBox::Yes) + ->exec() == QMessageBox::Yes; }); } Q_DISABLE_COPY(ServiceConfirmation) @@ -294,7 +298,10 @@ bool SDocumentModel::addFile(const QString &file, const QString &mime) QString fileName(info.fileName()); if(fileName == QStringLiteral("mimetype")) { - WarningDialog::show(DocumentModel::tr("Cannot add file with name 'mimetype' to the envelope.")); + WarningDialog::create() + ->withTitle(DocumentModel::tr("Failed to add file")) + ->withText(DocumentModel::tr("Cannot add file with name 'mimetype' to the envelope.")) + ->open(); return false; } if(doc->addFile(file, mime)) @@ -362,7 +369,7 @@ bool SDocumentModel::removeRow(int row) doc->modified = true; return true; } - catch( const Exception &e ) { DigiDoc::setLastError(tr("Failed remove document from container"), e); } + catch( const Exception &e ) { DigiDoc::setLastError(DocumentModel::tr("Failed remove document from container"), e); } return false; } @@ -394,7 +401,7 @@ DigiDoc::~DigiDoc() { clear(); } bool DigiDoc::addFile(const QString &file, const QString &mime) { - if(isError(!b->signatures().empty(), tr("Cannot add files to signed container"))) + if(isError(!b->signatures().empty(), DocumentModel::tr("Failed to add file"), tr("Cannot add files to signed container"))) return false; try { b->addDataFile( to(file), to(mime)); @@ -437,12 +444,12 @@ DocumentModel* DigiDoc::documentModel() const QString DigiDoc::fileName() const { return m_fileName; } -bool DigiDoc::isError(bool failure, const QString &msg) const +bool DigiDoc::isError(bool failure, const QString &title, const QString &text) const { if(!b) - WarningDialog::show(tr("Container is not open")); + WarningDialog::create()->withTitle(title)->withText(tr("Container is not open"))->open(); else if(failure) - WarningDialog::show(msg); + WarningDialog::create()->withTitle(title)->withText(text)->open(); return !b || failure; } @@ -540,15 +547,13 @@ bool DigiDoc::open( const QString &file ) switch(e.code()) { case Exception::NetworkError: - setLastError(tr("Connecting to SiVa server failed! Please check your internet connection."), e); - break; case Exception::HostNotFound: case Exception::InvalidUrl: - setLastError(tr("Connecting to SiVa server failed! Please check your internet connection and network settings."), e); + setLastError(tr("Connecting to SiVa server failed!"), e); break; default: if(e.msg().find("Online validation disabled") == std::string::npos) - setLastError(tr("An error occurred while opening the document."), e); + setLastError(tr("An error occurred while opening the document"), e); break; } } @@ -585,7 +590,7 @@ QStringList DigiDoc::parseException(const Exception &e, Exception::ExceptionCode void DigiDoc::removeSignature( unsigned int num ) { - if(isError(num >= b->signatures().size(), tr("Missing signature"))) + if(isError(num >= b->signatures().size(), tr("Failed remove signature from container"), tr("Missing signature"))) return; try { modified = waitFor([&] { @@ -626,47 +631,51 @@ bool DigiDoc::saveAs(const QString &filename) return false; } -void DigiDoc::setLastError( const QString &msg, const Exception &e ) +void DigiDoc::setLastError(const QString &title, const Exception &e) { + auto *dlg = WarningDialog::create()->withTitle(title); Exception::ExceptionCode code = Exception::General; QStringList causes = parseException(e, code); switch( code ) { case Exception::CertificateRevoked: - WarningDialog::show(tr("Certificate status revoked"), causes.join('\n')); break; + dlg->withText(tr("Certificate status revoked")); break; case Exception::CertificateUnknown: - WarningDialog::show(tr("Certificate status unknown"), causes.join('\n')); break; + dlg->withText(tr("Certificate status unknown")); break; case Exception::OCSPTimeSlot: - WarningDialog::show(tr("Please check your computer time. Additional information"), causes.join('\n')); break; + dlg->withText(tr("Please check your computer time. Additional information")); break; case Exception::OCSPRequestUnauthorized: - WarningDialog::show(tr("You have not granted IP-based access. " - "Check your validity confirmation service access settings."), causes.join('\n')); break; + dlg->withText(tr("You have not granted IP-based access. " + "Check your validity confirmation service access settings.")); break; case Exception::TSForbidden: - WarningDialog::show(tr("Failed to sign container. " - "Check your Time-Stamping service access settings."), causes.join('\n')); break; + dlg->withText(tr("Check your Time-Stamping service access settings.")); break; case Exception::TSTooManyRequests: - WarningDialog::show(tr("The limit for digital signatures per month has been reached for this IP address. " - "Additional information"), causes.join('\n')); break; + dlg->withText(tr("The limit for digital signatures per month has been reached for this IP address. " + "Additional information")); break; case Exception::PINCanceled: - break; + dlg->deleteLater(); + return; case Exception::PINFailed: - WarningDialog::show(tr("PIN Login failed"), causes.join('\n')); break; + dlg->withText(tr("PIN Login failed")); break; case Exception::PINIncorrect: - WarningDialog::show(tr("PIN Incorrect"), causes.join('\n')); break; + dlg->withText(tr("PIN Incorrect")); break; case Exception::PINLocked: - WarningDialog::show(tr("PIN Locked. Unblock to reuse PIN."), causes.join('\n')); break; - case Exception::NetworkError: // use passed message for these thre exceptions + dlg->withText(tr("PIN Locked. Unblock to reuse PIN.")); break; + case Exception::NetworkError: + dlg->withText(tr("Please check your internet connection.")); break; case Exception::HostNotFound: case Exception::InvalidUrl: + dlg->withText(tr("Please check your internet connection and network settings.")); break; default: - WarningDialog::show(msg, causes.join('\n')); break; + break; } + dlg->withDetails(causes.join('\n'))->open(); } bool DigiDoc::sign(const QString &city, const QString &state, const QString &zip, const QString &country, const QString &role, Signer *signer) { - if(isError(b->dataFiles().empty(), tr("Cannot add signature to empty container"))) + if(isError(b->dataFiles().empty(), tr("Failed to sign container"), tr("Cannot add signature to empty container"))) return false; try @@ -696,15 +705,20 @@ bool DigiDoc::sign(const QString &city, const QString &state, const QString &zip switch(code) { case Exception::PINIncorrect: - (new WarningDialog(tr("PIN Incorrect"), Application::mainWindow()))->exec(); + WarningDialog::create() + ->withTitle(tr("Failed to sign container")) + ->withText(tr("PIN Incorrect")) + ->exec(); return sign(city, state, zip, country, role, signer); - case Exception::NetworkError: - case Exception::HostNotFound: - WarningDialog::show(tr("Failed to sign container. Please check the access to signing services and network settings."), causes.join('\n')); break; case Exception::InvalidUrl: - WarningDialog::show(tr("Failed to sign container. Signing service URL is incorrect."), causes.join('\n')); break; + WarningDialog::create() + ->withTitle(tr("Failed to sign container")) + ->withText(tr("Signing service URL is incorrect.")) + ->withDetails(causes.join('\n')) + ->open(); + break; default: - setLastError(tr("Failed to sign container."), e); break; + setLastError(tr("Failed to sign container"), e); break; } } return false; diff --git a/client/DigiDoc.h b/client/DigiDoc.h index 429cd1793..fca8ac1e1 100644 --- a/client/DigiDoc.h +++ b/client/DigiDoc.h @@ -148,8 +148,8 @@ class DigiDoc: public QObject digidoc::Exception::ExceptionCode &code); private: - bool isError(bool failure, const QString &msg = {}) const; - static void setLastError( const QString &msg, const digidoc::Exception &e ); + bool isError(bool failure, const QString &title, const QString &text) const; + static void setLastError(const QString &title, const digidoc::Exception &e); std::unique_ptr b; std::unique_ptr parentContainer; diff --git a/client/DocumentModel.cpp b/client/DocumentModel.cpp index 61b1c7ab0..0e04ea5af 100644 --- a/client/DocumentModel.cpp +++ b/client/DocumentModel.cpp @@ -32,16 +32,20 @@ bool DocumentModel::addFileCheck(const QString &container, QFileInfo file) // Check that container is not dropped into itself if(QFileInfo(container) == file) { - auto *dlg = new WarningDialog(tr("Cannot add container to same container\n%1") - .arg(FileDialog::normalized(container))); - dlg->setCancelText(WarningDialog::Cancel); - dlg->open(); + WarningDialog::create() + ->withTitle(tr("Cannot add container to same container")) + ->withText(FileDialog::normalized(container)) + ->setCancelText(WarningDialog::Cancel) + ->open(); return false; } if(file.size() == 0) { - WarningDialog::show(tr("Cannot add empty file to the container.")); + WarningDialog::create() + ->withTitle(tr("Cannot add empty file to the container")) + ->withText(FileDialog::normalized(file.absoluteFilePath())) + ->open(); return false; } QString fileName = file.fileName(); @@ -49,8 +53,10 @@ bool DocumentModel::addFileCheck(const QString &container, QFileInfo file) { if(fileName == data(row)) { - WarningDialog::show(tr("Cannot add the file to the envelope. File '%1' is already in container.") - .arg(FileDialog::normalized(fileName))); + WarningDialog::create() + ->withTitle(tr("File is already in container")) + ->withText(FileDialog::normalized(fileName)) + ->open(); return false; } } @@ -90,8 +96,10 @@ bool DocumentModel::verifyFile(const QString &f) QJsonArray allowedExts = Application::confValue(QLatin1String("ALLOWED-EXTENSIONS")).toArray(defaultArray); if(allowedExts.contains(QJsonValue(QFileInfo(f).suffix().toLower()))) return true; - auto *dlg = new WarningDialog(tr("A file with this extension cannot be opened in the DigiDoc4 Client. Download the file to view it.")); - dlg->setCancelText(WarningDialog::OK); - dlg->open(); + WarningDialog::create() + ->withTitle(tr("Failed to open file")) + ->withText(tr("A file with this extension cannot be opened in the DigiDoc4 Client. Download the file to view it.")) + ->setCancelText(WarningDialog::OK) + ->open(); return false; } diff --git a/client/LdapSearch.h b/client/LdapSearch.h index d52ee1b0c..e8a0d336d 100644 --- a/client/LdapSearch.h +++ b/client/LdapSearch.h @@ -34,7 +34,7 @@ class LdapSearch final: public QObject Q_SIGNALS: void searchResult(const QList &result, int resultCount, const QVariantMap &userData); - void error( const QString &msg, const QString &details ); + void error(const QString &title, const QString &details); private: bool init(); diff --git a/client/MainWindow.cpp b/client/MainWindow.cpp index 8cd99c38e..4f50dab5d 100644 --- a/client/MainWindow.cpp +++ b/client/MainWindow.cpp @@ -44,7 +44,6 @@ #include #include #include -#include #include using namespace ria::qdigidoc4; @@ -231,9 +230,10 @@ bool MainWindow::encrypt() while (!FileDialog::fileIsWritable(cryptoDoc->fileName())) { - auto *dlg = new WarningDialog(tr("Cannot alter container %1. Save different location?") - .arg(FileDialog::normalized(cryptoDoc->fileName())), this); - dlg->addButton(WarningDialog::YES, QMessageBox::Yes); + auto *dlg = WarningDialog::create(this) + ->withTitle(CryptoDoc::tr("Failed to encrypt document")) + ->withText(tr("Cannot alter container %1. Save different location?").arg(FileDialog::normalized(cryptoDoc->fileName()))) + ->addButton(WarningDialog::YES, QMessageBox::Yes); if(dlg->exec() != QMessageBox::Yes) return false; QString to = FileDialog::getSaveFileName(this, FileDialog::tr("Save file"), cryptoDoc->fileName()); @@ -527,23 +527,20 @@ void MainWindow::resetDigiDoc(std::unique_ptr &&doc) { if(digiDoc && digiDoc->isModified()) { - QString warning, cancelTxt, saveTxt; + auto *dlg = WarningDialog::create(this); + QString saveTxt; if(digiDoc->state() == UnsignedContainer) { - warning = tr("You've added file(s) to container, but these are not signed yet. Keep the unsigned container or remove it?"); - cancelTxt = WarningDialog::buttonLabel(WarningDialog::Remove); - saveTxt = tr("Keep"); + dlg->withText(tr("You've added file(s) to container, but these are not signed yet. Keep the unsigned container or remove it?")) + ->setCancelText(WarningDialog::Remove) + ->addButton(tr("Keep"), QMessageBox::Save); } else { - warning = tr("You've changed the open container but have not saved any changes. Save the changes or close without saving?"); - cancelTxt = tr("Do not save"); - saveTxt = tr("Save"); + dlg->withText(tr("You've changed the open container but have not saved any changes. Save the changes or close without saving?")) + ->setCancelText(tr("Do not save")) + ->addButton(tr("Save"), QMessageBox::Save); } - - auto *dlg = new WarningDialog(warning, this); - dlg->setCancelText(cancelTxt); - dlg->addButton(saveTxt, QMessageBox::Save); if(dlg->exec() == QMessageBox::Save) save(); } @@ -558,8 +555,10 @@ bool MainWindow::save() QString target = digiDoc->fileName(); while(!FileDialog::fileIsWritable(target)) { - auto *dlg = new WarningDialog(tr("Cannot alter container %1. Save different location?").arg(target), this); - dlg->addButton(WarningDialog::YES, QMessageBox::Yes); + auto *dlg = WarningDialog::create(this) + ->withTitle(tr("Cannot alter container")) + ->withText(tr("Cannot alter container %1. Save different location?").arg(FileDialog::normalized(target))) + ->addButton(WarningDialog::YES, QMessageBox::Yes); if(dlg->exec() != QMessageBox::Yes) return false; if(target = FileDialog::getSaveFileName(this, FileDialog::tr("Save file"), target); target.isEmpty()) @@ -685,13 +684,14 @@ bool MainWindow::wrap(const QString& wrappedFile, bool pdf) bool MainWindow::wrapContainer(bool signing) { - QString msg = signing ? - tr("Files can not be added to the signed container. The system will create a new container which shall contain the signed document and the files you wish to add.") : - tr("Files can not be added to the cryptocontainer. The system will create a new container which shall contain the cypto-document and the files you wish to add."); - auto *dlg = new WarningDialog(msg, this); - dlg->setCancelText(WarningDialog::Cancel); - dlg->addButton(tr("Continue"), QMessageBox::Ok); - return dlg->exec() == QMessageBox::Ok; + return WarningDialog::create(this) + ->withTitle(signing ? tr("Files can not be added to the signed container") : tr("Files can not be added to the cryptocontainer")) + ->withText(signing ? + tr("The system will create a new container which shall contain the signed document and the files you wish to add.") : + tr("The system will create a new container which shall contain the cypto-document and the files you wish to add.")) + ->setCancelText(WarningDialog::Cancel) + ->addButton(tr("Continue"), QMessageBox::Ok) + ->exec() == QMessageBox::Ok; } void MainWindow::updateMyEID(const TokenData &t) diff --git a/client/QSigner.cpp b/client/QSigner.cpp index 467c3f29e..a329d1fbe 100644 --- a/client/QSigner.cpp +++ b/client/QSigner.cpp @@ -121,8 +121,11 @@ QSigner::QSigner(QObject *parent) EC_KEY_METHOD_set_sign(d->ecmethod, sign, sign_setup, Private::ecdsa_do_sign); d->smartcard = new QSmartCard(parent); - connect(this, &QSigner::error, this, [](const QString &msg) { - WarningDialog::show(msg); + connect(this, &QSigner::error, this, [](const QString &title, const QString &msg) { + WarningDialog::create() + ->withTitle(title) + ->withText(msg) + ->open(); }); connect(this, &QSigner::signDataChanged, this, [this](const TokenData &token) { std::string method; @@ -172,13 +175,13 @@ QByteArray QSigner::decrypt(std::function &&func) { if(!d->lock.tryLockForWrite(10 * 1000)) { - Q_EMIT error( tr("Signing/decrypting is already in progress another window.") ); + Q_EMIT error(tr("Failed to decrypt document"), tr("Signing/decrypting is already in progress another window.")); return {}; } if( d->auth.cert().isNull() ) { - Q_EMIT error( tr("Authentication certificate is not selected.") ); + Q_EMIT error(tr("Failed to decrypt document"), tr("Authentication certificate is not selected.")); d->lock.unlock(); return {}; } @@ -188,10 +191,10 @@ QByteArray QSigner::decrypt(std::function &&func) case QCryptoBackend::PinOK: break; case QCryptoBackend::PinCanceled: return {}; case QCryptoBackend::PinLocked: - Q_EMIT error(QCryptoBackend::errorString(status)); + Q_EMIT error(tr("Failed to decrypt document"), QCryptoBackend::errorString(status)); return {}; default: - Q_EMIT error(tr("Failed to login token") + ' ' + QCryptoBackend::errorString(status)); + Q_EMIT error(tr("Failed to decrypt document"), tr("Failed to login token") + ' ' + QCryptoBackend::errorString(status)); return {}; } QByteArray result = waitFor(func, d->backend); @@ -200,7 +203,7 @@ QByteArray QSigner::decrypt(std::function &&func) return {}; if(result.isEmpty()) - Q_EMIT error( tr("Failed to decrypt document") ); + Q_EMIT error(tr("Failed to decrypt document"), {}); return result; } @@ -228,14 +231,17 @@ QSslKey QSigner::key() const return key; } -quint8 QSigner::login(const TokenData &cert) const +quint8 QSigner::login(const TokenData &token) const { - switch(auto status = d->backend->login(cert)) + switch(auto status = d->backend->login(token)) { case QCryptoBackend::PinOK: return status; case QCryptoBackend::PinIncorrect: - (new WarningDialog(QCryptoBackend::errorString(status), Application::mainWindow()))->exec(); - return login(cert); + WarningDialog::create() + ->withTitle(SslCertificate(token.cert()).keyUsage().contains(SslCertificate::NonRepudiation) ? tr("Failed to sign document") : tr("Failed to decrypt document")) + ->withText(QCryptoBackend::errorString(status)) + ->exec(); + return login(token); default: d->lock.unlock(); // QSmartCard should also know that PIN is blocked. @@ -290,7 +296,7 @@ void QSigner::run() auto *pkcs11 = qobject_cast(d->backend); if(pkcs11 && !pkcs11->reload()) { - Q_EMIT error(tr("Failed to load PKCS#11 module")); + Q_EMIT error(tr("Failed to load PKCS#11 module"), {}); return; } diff --git a/client/QSigner.h b/client/QSigner.h index 1e03d3979..5468b99bf 100644 --- a/client/QSigner.h +++ b/client/QSigner.h @@ -55,10 +55,10 @@ class QSigner final: public QThread, public digidoc::Signer void cacheChanged(); void authDataChanged( const TokenData &token ); void signDataChanged( const TokenData &token ); - void error( const QString &msg ); + void error(const QString &title, const QString &text); private: - quint8 login(const TokenData &cert) const; + quint8 login(const TokenData &token) const; static QCryptographicHash::Algorithm methodToNID(const std::string &method); void run() final; diff --git a/client/common_enums.h b/client/common_enums.h index 81e99cf34..5bc62f0fa 100644 --- a/client/common_enums.h +++ b/client/common_enums.h @@ -54,14 +54,6 @@ enum Actions : unsigned char { ClearCryptoWarning, }; -enum ItemType : unsigned char { - ItemFile, - ItemSignature, - ItemAddress, - ToAddAdresses, - AddedAdresses, -}; - enum Pages : unsigned char { SignIntro, SignDetails, diff --git a/client/dialogs/AddRecipients.cpp b/client/dialogs/AddRecipients.cpp index 69f910383..9cbf33fd4 100644 --- a/client/dialogs/AddRecipients.cpp +++ b/client/dialogs/AddRecipients.cpp @@ -60,8 +60,8 @@ AddRecipients::AddRecipients(ItemList* itemList, QWidget *parent) setWindowFlags( Qt::Dialog | Qt::CustomizeWindowHint ); new Overlay(this); - ui->leftPane->init(ria::qdigidoc4::ToAddAdresses, QT_TRANSLATE_NOOP("ItemList", "Add recipients")); - ui->rightPane->init(ria::qdigidoc4::AddedAdresses, QT_TRANSLATE_NOOP("ItemList", "Added recipients")); + ui->leftPane->init(ItemList::ToAddAdresses, QT_TRANSLATE_NOOP("ItemList", "Add recipients")); + ui->rightPane->init(ItemList::AddedAdresses, QT_TRANSLATE_NOOP("ItemList", "Added recipients")); connect(ui->confirm, &QPushButton::clicked, this, &AddRecipients::accept); connect(ui->cancel, &QPushButton::clicked, this, &AddRecipients::reject); @@ -116,7 +116,7 @@ void AddRecipients::addRecipientFromFile() QFile f( file ); if( !f.open( QIODevice::ReadOnly ) ) { - WarningDialog::show(this, tr("Failed to read certificate")); + WarningDialog::create(this)->withTitle(tr("Failed to read certificate"))->open(); return; } @@ -128,12 +128,12 @@ void AddRecipients::addRecipientFromFile() } if( cert.isNull() ) { - WarningDialog::show(this, tr("Failed to read certificate")); + WarningDialog::create(this)->withTitle(tr("Failed to read certificate"))->open(); } else if( !SslCertificate( cert ).keyUsage().contains( SslCertificate::KeyEncipherment ) && !SslCertificate( cert ).keyUsage().contains( SslCertificate::KeyAgreement ) ) { - WarningDialog::show(this, tr("This certificate cannot be used for encryption")); + WarningDialog::create(this)->withTitle(tr("This certificate cannot be used for encryption"))->open(); } else addRecipient(cert); @@ -184,14 +184,18 @@ void AddRecipients::addRecipientToRightPane(Item *item, bool update) { if(Settings::CDOC2_DEFAULT && Settings::CDOC2_USE_KEYSERVER) { - WarningDialog::show(this, tr("Failed to add certificate. An expired certificate cannot be used for encryption.")); + WarningDialog::create(this) + ->withTitle(tr("Failed to add certificate")) + ->withText(tr("An expired certificate cannot be used for encryption.")) + ->open(); return; } - auto *dlg = new WarningDialog(tr("Are you sure that you want use certificate for encrypting, which expired on %1?
" + auto *dlg = WarningDialog::create(this)->withText(tr( + "Are you sure that you want use certificate for encrypting, which expired on %1?
" "When decrypter has updated certificates then decrypting is impossible.") - .arg(expiryDate.toString(QStringLiteral("dd.MM.yyyy hh:mm:ss"))), this); - dlg->setCancelText(WarningDialog::NO); - dlg->addButton(WarningDialog::YES, QMessageBox::Yes); + .arg(expiryDate.toString(QStringLiteral("dd.MM.yyyy hh:mm:ss")))) + ->setCancelText(WarningDialog::NO) + ->addButton(WarningDialog::YES, QMessageBox::Yes); if(dlg->exec() != QMessageBox::Yes) return; } @@ -202,9 +206,10 @@ void AddRecipients::addRecipientToRightPane(Item *item, bool update) errors.removeAll(QSslError(QSslError::CertificateExpired, key.cert)); if(!errors.isEmpty()) { - auto *dlg = new WarningDialog(tr("Recipient’s certification chain contains certificates that are not trusted. Continue with encryption?"), this); - dlg->setCancelText(WarningDialog::NO); - dlg->addButton(WarningDialog::YES, QMessageBox::Yes); + auto *dlg = WarningDialog::create(this) + ->withText(tr("Recipient’s certification chain contains certificates that are not trusted. Continue with encryption?")) + ->setCancelText(WarningDialog::NO) + ->addButton(WarningDialog::YES, QMessageBox::Yes); if(dlg->exec() != QMessageBox::Yes) return; } @@ -291,14 +296,14 @@ void AddRecipients::search(const QString &term, bool select, const QString &type else { QApplication::restoreOverrideCursor(); - WarningDialog::show(this, tr("Personal code is not valid!")); + WarningDialog::create(this)->withTitle(tr("Personal code is not valid!"))->open(); } } -void AddRecipients::showError( const QString &msg, const QString &details ) +void AddRecipients::showError(const QString &title, const QString &details) { QApplication::restoreOverrideCursor(); - WarningDialog::show(this, msg, details); + WarningDialog::create(this)->withTitle(title)->withDetails(details)->open(); } void AddRecipients::showResult(const QList &result, int resultCount, const QVariantMap &userData) @@ -317,12 +322,14 @@ void AddRecipients::showResult(const QList &result, int resultC } } if(resultCount >= 50) - showError(tr("The name you were looking for gave too many results, please refine your search.")); + WarningDialog::create(this) + ->withText(tr("The name you were looking for gave too many results, please refine your search.")) + ->open(); else if(--multiSearch <= 0 && ui->leftPane->items.isEmpty()) - { - showError(tr("Person or company does not own a valid certificate.
" - "It is necessary to have a valid certificate for encryption.
" - "Read more about it.")); - } + WarningDialog::create(this) + ->withTitle(tr("Person or company does not own a valid certificate")) + ->withText(tr("It is necessary to have a valid certificate for encryption.
" + "Read more about it.")) + ->open(); QApplication::restoreOverrideCursor(); } diff --git a/client/dialogs/AddRecipients.h b/client/dialogs/AddRecipients.h index a9bc5fece..4998f5174 100644 --- a/client/dialogs/AddRecipients.h +++ b/client/dialogs/AddRecipients.h @@ -51,7 +51,7 @@ class AddRecipients final : public QDialog void addRecipientToRightPane(Item *item, bool update = true); void search(const QString &term, bool select = false, const QString &type = {}); - void showError(const QString &msg, const QString &details = {}); + void showError(const QString &title, const QString &details); void showResult(const QList &result, int resultCount, const QVariantMap &userData); static AddressItem* itemListValue(ItemList *list, const CKey &cert); diff --git a/client/dialogs/CertificateDetails.cpp b/client/dialogs/CertificateDetails.cpp index ea7d91f0f..f679e3ae7 100644 --- a/client/dialogs/CertificateDetails.cpp +++ b/client/dialogs/CertificateDetails.cpp @@ -75,7 +75,7 @@ CertificateDetails::CertificateDetails(const SslCertificate &cert, QWidget *pare if(QFile f(file); f.open(QIODevice::WriteOnly)) f.write(cert.toPem()); else - WarningDialog::show(this, tr("Failed to save file")); + WarningDialog::create(this)->withTitle(QCoreApplication::translate("FileDialog", "Failed to save file"))->open(); }); connect(ui.close, &QPushButton::clicked, this, &CertificateDetails::accept); connect( this, &CertificateDetails::finished, this, &CertificateDetails::close ); diff --git a/client/dialogs/FileDialog.cpp b/client/dialogs/FileDialog.cpp index 41955855e..ddb891b46 100644 --- a/client/dialogs/FileDialog.cpp +++ b/client/dialogs/FileDialog.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include @@ -247,7 +246,10 @@ QString FileDialog::getExistingDirectory( QWidget *parent, const QString &captio if( !QFileInfo( res ).isWritable() ) #endif { - WarningDialog::show(parent, tr( "You don't have sufficient privileges to write this file into folder %1" ).arg( res )); + WarningDialog::create(parent) + ->withTitle(tr("Failed to save files")) + ->withText(tr("You don't have sufficient privileges to write this file into folder %1").arg(res)) + ->open(); return {}; } @@ -259,10 +261,10 @@ QString FileDialog::getSaveFileName(QWidget *parent, const QString &caption, con if(filename.endsWith(QLatin1String(".adoc"), Qt::CaseInsensitive)) filter = tr("Documents (%1)").arg(QLatin1String("*.adoc")); else if(filename.endsWith(QLatin1String(".asice"), Qt::CaseInsensitive) || - filename.endsWith(QLatin1String(".sce"), Qt::CaseInsensitive)) + filename.endsWith(QLatin1String(".sce"), Qt::CaseInsensitive)) filter = tr("Documents (%1)").arg(QLatin1String("*.asice *.sce")); else if(filename.endsWith(QLatin1String(".asics"), Qt::CaseInsensitive) || - filename.endsWith(QLatin1String(".scs"), Qt::CaseInsensitive)) + filename.endsWith(QLatin1String(".scs"), Qt::CaseInsensitive)) filter = tr("Documents (%1)").arg(QLatin1String("*.asics *.scs")); else if(filename.endsWith(QLatin1String(".bdoc"), Qt::CaseInsensitive)) filter = tr("Documents (%1)").arg(QLatin1String("*.bdoc")); @@ -277,17 +279,16 @@ QString FileDialog::getSaveFileName(QWidget *parent, const QString &caption, con else if(filename.endsWith(QLatin1String(".pdf"), Qt::CaseInsensitive)) filter = tr("Documents (%1)").arg(QLatin1String("*.pdf")); QString file; - while( true ) + while(!(file = QFileDialog::getSaveFileName(parent, caption, normalized(filename), filter)).isEmpty()) { - file = QFileDialog::getSaveFileName(parent, caption, normalized(filename), filter); - if( !file.isEmpty() && !fileIsWritable( file ) ) - { - WarningDialog::show(parent, tr( "You don't have sufficient privileges to write this file into folder %1" ).arg( file )); - } - else - break; + if(fileIsWritable(file)) + return result(file); + WarningDialog::create(parent) + ->withTitle(tr("Failed to save file")) + ->withText(tr("You don't have sufficient privileges to write this file into folder %1").arg(file)) + ->exec(); } - return result( file ); + return file; } QString FileDialog::normalized(const QString &data) @@ -310,8 +311,6 @@ QString FileDialog::result( const QString &str ) #ifndef Q_OS_MACOS if(!str.isEmpty()) Settings::LAST_PATH = QFileInfo(str).absolutePath(); -#else - Settings::LAST_PATH.clear(); #endif return str; } diff --git a/client/dialogs/MobileProgress.cpp b/client/dialogs/MobileProgress.cpp index 0bfa1fe5a..7ea2b915e 100644 --- a/client/dialogs/MobileProgress.cpp +++ b/client/dialogs/MobileProgress.cpp @@ -98,14 +98,16 @@ background-color: #007aff; d->req.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); d->manager = CheckConnection::setupNAM(d->req); d->manager->setParent(d); - QObject::connect(d->manager, &QNetworkAccessManager::finished, d, [=](QNetworkReply *reply) { + QObject::connect(d->manager, &QNetworkAccessManager::finished, d, [=, this](QNetworkReply *reply) { QScopedPointer scope(reply); - auto returnError = [=](const QString &err, const QString &details = {}) { + auto returnError = [=, this](const QString &err, const QString &details = {}) { qCWarning(MIDLog) << err; d->statusTimer->stop(); d->hide(); - auto *dlg = WarningDialog::show(d->parentWidget(), err, details); + auto *dlg = WarningDialog::create(d->parentWidget())->withText(err)->withDetails(details) + ->withTitle(QCoreApplication::translate("DigiDoc", "Failed to sign container")); QObject::connect(dlg, &WarningDialog::finished, &d->l, &QEventLoop::exit); + dlg->open(); }; switch(reply->error()) @@ -224,7 +226,10 @@ bool MobileProgress::init(const QString &ssid, const QString &cell) { if(!d->UUID.isEmpty() && QUuid(d->UUID).isNull()) { - WarningDialog::show(d->parentWidget(), tr("Failed to send request. Check your %1 service access settings.").arg(tr("mobile-ID"))); + WarningDialog::create(d->parentWidget()) + ->withText(tr("Failed to send request. Check your %1 service access settings.").arg(tr("mobile-ID"))) + ->withTitle(QCoreApplication::translate("DigiDoc", "Failed to sign container")) + ->open(); return false; } d->ssid = ssid; diff --git a/client/dialogs/SettingsDialog.cpp b/client/dialogs/SettingsDialog.cpp index 1ea71bf38..4f8b3432d 100644 --- a/client/dialogs/SettingsDialog.cpp +++ b/client/dialogs/SettingsDialog.cpp @@ -300,19 +300,23 @@ SettingsDialog::SettingsDialog(int page, QWidget *parent) if(QFile f(qdigidoc4log); f.open(QFile::WriteOnly|QFile::Truncate)) f.write({}); #ifdef Q_OS_MACOS - WarningDialog::show(this, tr("Restart DigiDoc4 Client to activate logging. Read more " - "here.")); + WarningDialog::create(this) + ->withTitle(tr("Restart DigiDoc4 Client to activate logging")) + ->withText(tr("Read more here.")) + ->open(); #else - auto *dlg = WarningDialog::show(this, tr("Restart DigiDoc4 Client to activate logging. Read more " - "here. Restart now?")); - dlg->setCancelText(WarningDialog::NO); - dlg->addButton(WarningDialog::YES, QMessageBox::Yes); + auto *dlg = WarningDialog::create(this) + ->withTitle(tr("Restart DigiDoc4 Client to activate logging")) + ->withText(tr("Read more here. Restart now?")) + ->setCancelText(WarningDialog::NO) + ->addButton(WarningDialog::YES, QMessageBox::Yes); connect(dlg, &WarningDialog::finished, qApp, [](int result) { if(result == QMessageBox::Yes) { qApp->setProperty("restart", true); QApplication::quit(); } }); + dlg->open(); #endif }); @@ -332,11 +336,16 @@ SettingsDialog::SettingsDialog(int page, QWidget *parent) #ifdef CONFIG_URL connect(qApp->conf(), &Configuration::finished, this, [this](bool /*update*/, const QString &error){ if(!error.isEmpty()) { - WarningDialog::show(this, tr("Checking updates has failed.") + "
" + tr("Please try again."), error); + WarningDialog::create(this) + ->withTitle(tr("Checking updates has failed.")) + ->withText(tr("Please try again.")) + ->withDetails(error) + ->open(); return; } - auto *dlg = WarningDialog::show(this, tr("DigiDoc4 Client configuration update was successful.")); + auto *dlg = WarningDialog::create(this)->withTitle(tr("DigiDoc4 Client configuration update was successful.")); new Overlay(dlg); + dlg->open(); #ifdef Q_OS_WIN QString path = QApplication::applicationDirPath() + QLatin1String("/id-updater.exe"); if (QFile::exists(path)) @@ -386,7 +395,7 @@ SettingsDialog::SettingsDialog(int page, QWidget *parent) cert.issuerInfo(QSslCertificate::Organization).contains(u"Zetes Estonia OÜ"_s, Qt::CaseInsensitive)) CertDeleteCertificateFromStore(CertDuplicateCertificateContext(c)); } - WarningDialog::show(this, tr("Redundant certificates have been successfully removed.")); + WarningDialog::create(this)->withTitle(tr("Redundant certificates have been successfully removed."))->open(); }); #endif @@ -597,7 +606,7 @@ void SettingsDialog::saveFile(const QString &name, const QByteArray &content) if( filename.isEmpty() ) return; if(QFile f(filename); !f.open(QIODevice::WriteOnly|QIODevice::Text) || !f.write(content)) - WarningDialog::show(this, tr("Failed write to file!")); + WarningDialog::create(this)->withText(tr("Failed write to file!"))->open(); } diff --git a/client/dialogs/SmartIDProgress.cpp b/client/dialogs/SmartIDProgress.cpp index c0e7dd2e1..97afb60fd 100644 --- a/client/dialogs/SmartIDProgress.cpp +++ b/client/dialogs/SmartIDProgress.cpp @@ -110,16 +110,18 @@ background-color: #007aff; d->req.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); d->manager = CheckConnection::setupNAM(d->req); d->manager->setParent(d); - QNetworkAccessManager::connect(d->manager, &QNetworkAccessManager::finished, d, [&](QNetworkReply *reply){ + QNetworkAccessManager::connect(d->manager, &QNetworkAccessManager::finished, d, [&, this](QNetworkReply *reply){ QScopedPointer scope(reply); - auto returnError = [=](const QString &err, const QString &details = {}) { + auto returnError = [=, this](const QString &err, const QString &details = {}) { qCWarning(SIDLog) << err; d->statusTimer->stop(); delete d->timer; d->timer = nullptr; d->hide(); - auto *dlg = WarningDialog::show(d->parentWidget(), err, details); + auto *dlg = WarningDialog::create(d->parentWidget())->withText(err)->withDetails(details) + ->withTitle(QCoreApplication::translate("DigiDoc", "Failed to sign container")); QObject::connect(dlg, &WarningDialog::finished, &d->l, &QEventLoop::exit); + dlg->open(); }; switch(reply->error()) @@ -127,7 +129,7 @@ background-color: #007aff; case QNetworkReply::NoError: break; case QNetworkReply::ContentNotFoundError: - return returnError(tr("Failed to sign container. Your Smart-ID transaction has expired or user account not found.")); + return returnError(tr("Your Smart-ID transaction has expired or user account not found.")); case QNetworkReply::ConnectionRefusedError: return returnError(tr("%1 service has encountered technical errors. Please try again later.").arg(tr("Smart-ID"))); case QNetworkReply::SslHandshakeFailedError: @@ -144,7 +146,7 @@ background-color: #007aff; switch (httpStatusCode) { case 403: - return returnError(tr("Failed to sign container. Check your %1 service access settings. " + return returnError(tr("Check your %1 service access settings. " "Additional information").arg(tr("Smart-ID"))); case 409: return returnError(tr("Failed to send request. The number of unsuccesful request from this IP address has been exceeded. Please try again later.")); @@ -185,9 +187,9 @@ background-color: #007aff; endResult == QLatin1String("USER_REFUSED_CONFIRMATIONMESSAGE_WITH_VC_CHOICE")) returnError(tr("User denied or cancelled")); else if(endResult == QLatin1String("TIMEOUT")) - returnError(tr("Failed to sign container. Your Smart-ID transaction has expired or user account not found.")); + returnError(tr("Your Smart-ID transaction has expired or user account not found.")); else if(endResult == QLatin1String("REQUIRED_INTERACTION_NOT_SUPPORTED_BY_APP")) - returnError(tr("Failed to sign container. You need to update your Smart-ID application to sign documents in DigiDoc4 Client.")); + returnError(tr("You need to update your Smart-ID application to sign documents in DigiDoc4 Client.")); else if(endResult == QLatin1String("WRONG_VC")) returnError(tr("Error: an incorrect control code was chosen")); else if(endResult == QLatin1String("DOCUMENT_UNUSABLE")) @@ -238,7 +240,10 @@ bool SmartIDProgress::init(const QString &country, const QString &idCode, const { if(!d->UUID.isEmpty() && QUuid(d->UUID).isNull()) { - WarningDialog::show(d->parentWidget(), tr("Failed to send request. Check your %1 service access settings.").arg(tr("Smart-ID"))); + WarningDialog::create(d->parentWidget()) + ->withText(tr("Failed to send request. Check your %1 service access settings.").arg(tr("Smart-ID"))) + ->withTitle(QCoreApplication::translate("DigiDoc", "Failed to sign container")) + ->open(); return false; } QFileInfo info(fileName); diff --git a/client/dialogs/WarningDialog.cpp b/client/dialogs/WarningDialog.cpp index 587819c66..0ec547e96 100644 --- a/client/dialogs/WarningDialog.cpp +++ b/client/dialogs/WarningDialog.cpp @@ -25,7 +25,7 @@ #include #include -WarningDialog::WarningDialog(const QString &text, const QString &details, QWidget *parent) +WarningDialog::WarningDialog(QWidget *parent) : QDialog(parent) , ui(new Ui::WarningDialog) { @@ -37,33 +37,28 @@ WarningDialog::WarningDialog(const QString &text, const QString &details, QWidge #endif ui->buttonBox->layout()->setSpacing(40); - ui->text->setText(text); - ui->details->setText(details); + ui->title->hide(); + ui->text->hide(); ui->details->hide(); - ui->showDetails->setHidden(details.isEmpty()); + ui->showDetails->hide(); connect(ui->showDetails, &AccordionTitle::toggled, ui->details, &QLabel::setVisible); cancel = ui->buttonBox->button(QDialogButtonBox::Close); cancel->setCursor(Qt::PointingHandCursor); connect(cancel, &QPushButton::clicked, this, &QDialog::reject); resetCancelStyle(true); - } -WarningDialog::WarningDialog(const QString &text, QWidget *parent) - : WarningDialog(text, {}, parent) -{} - WarningDialog::~WarningDialog() { delete ui; } -void WarningDialog::addButton(ButtonText label, int ret, bool red) +WarningDialog *WarningDialog::addButton(ButtonText label, int ret, bool red) { - addButton(buttonLabel(label), ret, red); + return addButton(buttonLabel(label), ret, red); } -void WarningDialog::addButton(const QString& label, int ret, bool red) +WarningDialog *WarningDialog::addButton(const QString& label, int ret, bool red) { if(ui->buttonBox->buttons().size() > 3) ui->buttonBox->layout()->setSpacing(5); @@ -116,6 +111,7 @@ void WarningDialog::addButton(const QString& label, int ret, bool red) break; } connect(button, &QPushButton::clicked, this, [this, ret] { done(ret); }); + return this; } QString WarningDialog::buttonLabel(ButtonText label) @@ -130,32 +126,48 @@ QString WarningDialog::buttonLabel(ButtonText label) } } -void WarningDialog::resetCancelStyle(bool warning) +WarningDialog *WarningDialog::resetCancelStyle(bool warning) { style()->unpolish(cancel); cancel->setProperty("warning", warning); style()->polish(cancel); + return this; } -void WarningDialog::setCancelText(ButtonText label) +WarningDialog *WarningDialog::setCancelText(ButtonText label) { - setCancelText(buttonLabel(label)); + return setCancelText(buttonLabel(label)); } -void WarningDialog::setCancelText(const QString &label) +WarningDialog *WarningDialog::setCancelText(const QString &label) { cancel->setText(label); ui->buttonBox->addButton(cancel, QDialogButtonBox::RejectRole); + return this; +} + +WarningDialog* WarningDialog::create(QWidget *parent) +{ + return new WarningDialog(parent ? parent : Application::mainWindow()); } -WarningDialog* WarningDialog::show(const QString &text, const QString &details) +WarningDialog* WarningDialog::withText(const QString &text) +{ + ui->text->setText(text); + ui->text->setHidden(text.isEmpty()); + return this; +} +WarningDialog* WarningDialog::withTitle(const QString &title) { - return show(Application::mainWindow(), text, details); + ui->title->setText(title); + ui->title->setHidden(title.isEmpty()); + return this; } -WarningDialog* WarningDialog::show(QWidget *parent, const QString &text, const QString &details) +WarningDialog* WarningDialog::withDetails(const QString &details) { - auto *dlg = new WarningDialog(text, details, parent); - dlg->open(); - return dlg; + ui->details->setText(details); + ui->details->hide(); + ui->showDetails->setHidden(details.isEmpty()); + return this; } diff --git a/client/dialogs/WarningDialog.h b/client/dialogs/WarningDialog.h index 977733fa3..3169c0fb2 100644 --- a/client/dialogs/WarningDialog.h +++ b/client/dialogs/WarningDialog.h @@ -39,21 +39,24 @@ class WarningDialog final: public QDialog YES, Remove, }; - explicit WarningDialog(const QString &text, const QString &details, QWidget *parent = nullptr); - explicit WarningDialog(const QString &text, QWidget *parent = nullptr); ~WarningDialog() final; - void addButton(ButtonText label, int ret, bool red = false); - void addButton(const QString& label, int ret, bool red = false); - void setCancelText(ButtonText label); - void setCancelText(const QString& label); - void resetCancelStyle(bool warning); - static WarningDialog *show(const QString &text, const QString &details = {}); - static WarningDialog *show(QWidget *parent, const QString &text, const QString &details = {}); + WarningDialog *addButton(ButtonText label, int ret, bool red = false); + WarningDialog *addButton(const QString& label, int ret, bool red = false); + WarningDialog *setCancelText(ButtonText label); + WarningDialog *setCancelText(const QString& label); + WarningDialog *resetCancelStyle(bool warning); + WarningDialog *withTitle(const QString &text); + WarningDialog *withText(const QString &text); + WarningDialog *withDetails(const QString &details); - static QString buttonLabel(ButtonText label); + static WarningDialog *create(QWidget *parent = {}); private: + explicit WarningDialog(QWidget *parent = nullptr); + + static QString buttonLabel(ButtonText label); + Ui::WarningDialog *ui; WaitDialogHider hider; QPushButton *cancel; diff --git a/client/dialogs/WarningDialog.ui b/client/dialogs/WarningDialog.ui index fe144fe92..eecd215a5 100644 --- a/client/dialogs/WarningDialog.ui +++ b/client/dialogs/WarningDialog.ui @@ -6,19 +6,25 @@ 0 0 - 568 - 247 + 570 + 281 - #WarningDialog > QLabel { + #WarningDialog { +border-radius: 4px; +background-color: #FFFFFF; +} +#WarningDialog > QLabel { color: #07142A; font-family: Roboto, Helvetica; font-size: 14px; } -#WarningDialog { -border-radius: 4px; -background-color: #FFFFFF; +#WarningDialog > #title { +color: #003168; +font-family: Roboto, Helvetica; +font-size: 20px; +font-weight: 700; } QPushButton { background-color: #2F70B6; @@ -26,10 +32,11 @@ border: 1px solid #2F70B6; border-radius: 4px; padding: 12px 12px; color: #ffffff; +font-family: Roboto, Helvetica; font-size: 14px; font-weight: 700; } -QPushButton:hover { +QPushButton:hover, QPushButton:focus { background-color: #2B66A6; border-color: #2B66A6; } @@ -46,13 +53,11 @@ background-color: transparent; border-color: #AD2A45; color: #AD2A45; } -QPushButton[warning="true"]:hover { +QPushButton[warning="true"]:hover, QPushButton[warning="true"]:focus { background-color: #F5EBED; -border-color: #F5EBED; } QPushButton[warning="true"]:pressed { background-color: #E1C1C6; -border-color: #E1C1C6; } @@ -76,37 +81,26 @@ border-color: #E1C1C6; 24 - - - - 520 - 30 - + + + Qt::TabFocus - - - Roboto - -1 - + + Qt::AlignCenter + + + + IBeamCursor - - QLabel { -margin: 10px 15px 0px 15px; -border: none; -} - - - TextLabel + + Qt::TabFocus Qt::RichText - - Qt::AlignCenter - true @@ -148,10 +142,12 @@ border: none; IBeamCursor + + Qt::TabFocus + QLabel { margin: 0px 15px 0px 15px; -border: none; } @@ -170,6 +166,12 @@ border: none; + + + 522 + 0 + + QDialogButtonBox::Close diff --git a/client/translations/en.ts b/client/translations/en.ts index be3ffe60a..0b3b1a495 100644 --- a/client/translations/en.ts +++ b/client/translations/en.ts @@ -18,13 +18,25 @@ This certificate cannot be used for encryption This certificate cannot be used for encryption + + Failed to add certificate + Failed to add certificate + + + An expired certificate cannot be used for encryption. + An expired certificate cannot be used for encryption. + Personal code is not valid! Personal code is not valid! - Person or company does not own a valid certificate.<br />It is necessary to have a valid certificate for encryption.<br /><a href='https://www.id.ee/en/article/encryption-and-decryption-of-documents/'>Read more about it</a>. - Person or company does not own a valid certificate.<br />It is necessary to have a valid certificate for encryption.<br /><a href='https://www.id.ee/en/article/encryption-and-decryption-of-documents/'>Read more about it</a>. + Person or company does not own a valid certificate + Person or company does not own a valid certificate + + + It is necessary to have a valid certificate for encryption.<br /><a href='https://www.id.ee/en/article/encryption-and-decryption-of-documents/'>Read more about it</a>. + It is necessary to have a valid certificate for encryption.<br /><a href='https://www.id.ee/en/article/encryption-and-decryption-of-documents/'>Read more about it</a>. Certificates (*.cer *.crt *.pem) @@ -62,10 +74,6 @@ The name you were looking for gave too many results, please refine your search. The name you were looking for gave too many results, please refine your search. - - Failed to add certificate. An expired certificate cannot be used for encryption. - Failed to add certificate. An expired certificate cannot be used for encryption. - AddressItem @@ -144,10 +152,6 @@ Caught exception! Caught exception! - - The renewal of Trust Service status List, used for digital signature validation, has failed. Please check your internet connection and make sure you have the latest ID-software version installed. An expired Trust Service List (TSL) will be used for signature validation. <a href="https://www.id.ee/en/article/digidoc4-message-updating-the-list-of-trusted-certificates-was-unsuccessful/">Additional information</a> - The renewal of Trust Service status List, used for digital signature validation, has failed. Please check your internet connection and make sure you have the latest ID-software version installed. An expired Trust Service List (TSL) will be used for signature validation. <a href="https://www.id.ee/en/article/digidoc4-message-updating-the-list-of-trusted-certificates-was-unsuccessful/">Additional information</a> - Loading TSL lists Loading TSL lists @@ -156,6 +160,14 @@ Added file(s) exceeds the maximum size limit of the container(120MB). Added file(s) exceeds the maximum size limit of the container (~120MB). + + The renewal of Trust Service status List has failed + The renewal of Trust Service status List has failed + + + Trust Service status List is used for digital signature validation. Please check your internet connection and make sure you have the latest ID-software version installed. An expired Trust Service List (TSL) will be used for signature validation. <a href="https://www.id.ee/en/article/digidoc4-message-updating-the-list-of-trusted-certificates-was-unsuccessful/">Additional information</a> + Trust Service status List is used for digital signature validation. Please check your internet connection and make sure you have the latest ID-software version installed. An expired Trust Service List (TSL) will be used for signature validation. <a href="https://www.id.ee/en/article/digidoc4-message-updating-the-list-of-trusted-certificates-was-unsuccessful/">Additional information</a> + Ignore forever Ignore forever @@ -168,6 +180,30 @@ DigiDoc4 Client Help DigiDoc4 Client Help + + This version of ID-software on your computer is unsupported + This version of ID-software on your computer is unsupported + + + DigiDoc4 Client cannot be used until you update ID-software. Install new ID-software from <a href="https://www.id.ee/en/article/install-id-software/">www.id.ee</a>. macOS users can download the latest ID-software version from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. + DigiDoc4 Client cannot be used until you update ID-software. Install new ID-software from <a href="https://www.id.ee/en/article/install-id-software/">www.id.ee</a>. macOS users can download the latest ID-software version from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. + + + Your ID-software has expired + Your ID-software has expired + + + To download the latest software version, go to the <a href="https://www.id.ee/en/article/install-id-software/">id.ee</a> website. macOS users can download the latest ID-software version from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. + To download the latest software version, go to the <a href="https://www.id.ee/en/article/install-id-software/">id.ee</a> website. macOS users can download the latest ID-software version from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. + + + An ID-software update has been found + An ID-software update has been found + + + To download the update, go to the <a href="https://www.id.ee/en/article/install-id-software/">id.ee</a> website. macOS users can download the update from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. + To download the update, go to the <a href="https://www.id.ee/en/article/install-id-software/">id.ee</a> website. macOS users can download the update from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. + Close Window Close Window @@ -192,18 +228,6 @@ https://www.id.ee/en/id-help/ https://www.id.ee/en/id-help/ - - This version of ID-software on your computer is unsupported. DigiDoc4 Client cannot be used until you update ID-software. Install new ID-software from <a href="https://www.id.ee/en/article/install-id-software/">www.id.ee</a>. macOS users can download the latest ID-software version from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. - This version of ID-software on your computer is unsupported. DigiDoc4 Client cannot be used until you update ID-software. Install new ID-software from <a href="https://www.id.ee/en/article/install-id-software/">www.id.ee</a>. macOS users can download the latest ID-software version from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. - - - Your ID-software has expired. To download the latest software version, go to the <a href="https://www.id.ee/en/article/install-id-software/">id.ee</a> website. macOS users can download the latest ID-software version from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. - Your ID-software has expired. To download the latest software version, go to the <a href="https://www.id.ee/en/article/install-id-software/">id.ee</a> website. macOS users can download the latest ID-software version from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. - - - An ID-software update has been found. To download the update, go to the <a href="https://www.id.ee/en/article/install-id-software/">id.ee</a> website. macOS users can download the update from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. - An ID-software update has been found. To download the update, go to the <a href="https://www.id.ee/en/article/install-id-software/">id.ee</a> website. macOS users can download the update from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. - Start downloading Start downloading @@ -218,10 +242,6 @@ CDocumentModel - - Failed to save file '%1' - Failed to save file '%1' - Added file(s) exceeds the maximum size limit of the container (∼120MB). <a href='https://www.id.ee/en/article/encrypting-large-120-mb-files/'>Read more about it</a> Added file(s) exceeds the maximum size limit of the container (∼120MB). <a href='https://www.id.ee/en/article/encrypting-large-120-mb-files/'>Read more about it</a> @@ -360,10 +380,6 @@ Save certificate Save certificate - - Failed to save file - Failed to save file - Close Close @@ -450,20 +466,24 @@ Container: - The document has already been signed by you. - The document has already been signed by you. + The document has already been signed by you + The document has already been signed by you DigiDoc4 Client DigiDoc4 Client - In order to view Validity Confirmation Sheet there has to be at least one printer installed! - In order to view Validity Confirmation Sheet there has to be at least one printer installed! + You are about to delete the last file in the container + You are about to delete the last file in the container - You are about to delete the last file in the container, it is removed along with the container. - You are about to delete the last file in the container, it is removed along with the container. + It is removed along with the container. + It is removed along with the container. + + + In order to view Validity Confirmation Sheet there has to be at least one printer installed! + In order to view Validity Confirmation Sheet there has to be at least one printer installed! Change @@ -549,28 +569,32 @@ Digi-ID - Failed to decrypt document - Failed to decrypt document + Failed to add key + Failed to add key - Failed to open document - Failed to open document + Please check your internet connection and network settings. + Please check your internet connection and network settings. - An error occurred while opening the document. - An error occurred while opening the document. + Failed to encrypt document + Failed to encrypt document - You must enter your PIN code twice in order to decrypt the CDOC2 container. The first PIN entry is required for authentication to the key server referenced in the CDOC2 container. Second PIN entry is required to decrypt the CDOC2 container. - You must enter your PIN code twice in order to decrypt the CDOC2 container. The first PIN entry is required for authentication to the key server referenced in the CDOC2 container. Second PIN entry is required to decrypt the CDOC2 container. + Failed to remove key + Failed to remove key - Failed to encrypt document. Please check your internet connection and network settings. - Failed to encrypt document. Please check your internet connection and network settings. + Failed to open document + Failed to open document + + + An error occurred while opening the document + An error occurred while opening the document - Failed to decrypt document. Please check your internet connection and network settings. - Failed to decrypt document. Please check your internet connection and network settings. + You must enter your PIN code twice in order to decrypt the CDOC2 container. The first PIN entry is required for authentication to the key server referenced in the CDOC2 container. Second PIN entry is required to decrypt the CDOC2 container. + You must enter your PIN code twice in order to decrypt the CDOC2 container. The first PIN entry is required for authentication to the key server referenced in the CDOC2 container. Second PIN entry is required to decrypt the CDOC2 container. Don't show again @@ -698,6 +722,10 @@ Cannot add files to signed container Cannot add files to signed container + + Please check your internet connection. + Please check your internet connection. + Cannot add signature to empty container Cannot add signature to empty container @@ -714,6 +742,18 @@ PIN Login failed PIN Login failed + + Connecting to SiVa server failed! + Connecting to SiVa server failed! + + + Please check your internet connection and network settings. + Please check your internet connection and network settings. + + + Send document to SiVa + Send document to SiVa + Certificate status revoked Certificate status revoked @@ -722,13 +762,21 @@ Certificate status unknown Certificate status unknown + + Check your Time-Stamping service access settings. + Check your Time-Stamping service access settings. + PIN Locked. Unblock to reuse PIN. PIN Locked. Unblock to reuse PIN. - An error occurred while opening the document. - An error occurred while opening the document. + Signing service URL is incorrect. + Signing service URL is incorrect. + + + An error occurred while opening the document + An error occurred while opening the document Failed add file to container @@ -742,10 +790,6 @@ Failed to save container Failed to save container - - Failed to sign container. Check your Time-Stamping service access settings. - Failed to sign container. Check your Time-Stamping service access settings. - You have not granted IP-based access. Check your validity confirmation service access settings. You have not granted IP-based access. Check your validity confirmation service access settings. @@ -762,50 +806,40 @@ The timestamp added to the signature must be taken before validity confirmation. The timestamp added to the signature must be taken before validity confirmation. - - Connecting to SiVa server failed! Please check your internet connection. - Connecting to SiVa server failed! Please check your internet connection. - - - Failed to sign container. - Failed to sign container. - This type of signed document will be transmitted to the Digital Signature Validation Service SiVa to verify the validity of the digital signature. Read more information about transmitted data to Digital Signature Validation service from <a href="https://www.id.ee/en/article/data-protection-conditions-for-the-id-software-of-the-national-information-system-authority/">here</a>.<br />Do you want to continue? This type of signed document will be transmitted to the Digital Signature Validation Service SiVa to verify the validity of the digital signature. Read more information about transmitted data to Digital Signature Validation service from <a href="https://www.id.ee/en/article/data-protection-conditions-for-the-id-software-of-the-national-information-system-authority/">here</a>.<br />Do you want to continue? - Connecting to SiVa server failed! Please check your internet connection and network settings. - Connecting to SiVa server failed! Please check your internet connection and network settings. + Opening + Opening - Failed to sign container. Please check the access to signing services and network settings. - Failed to sign container. Please check the access to signing services and network settings. + Failed to sign container + Failed to sign container + + + DocumentModel - Failed to sign container. Signing service URL is incorrect. - Failed to sign container. Signing service URL is incorrect. + Cannot add container to same container + Cannot add container to same container - Opening - Opening + File is already in container + File is already in container - - - DocumentModel - Cannot add container to same container -%1 - Cannot add container to same container -%1 + Failed to open file + Failed to open file A file with this extension cannot be opened in the DigiDoc4 Client. Download the file to view it. A file with this extension cannot be opened in the DigiDoc4 Client. Download the file to view it. - Cannot add the file to the envelope. File '%1' is already in container. - Cannot add the file to the envelope. File '%1' is already in container. + Failed remove document from container + Failed remove document from container Internal error @@ -816,8 +850,12 @@ Cannot add file with name 'mimetype' to the envelope. - Cannot add empty file to the container. - Cannot add empty file to the container. + Cannot add empty file to the container + Cannot add empty file to the container + + + Failed to add file + Failed to add file @@ -842,6 +880,10 @@ Create %1 Create %1 + + Failed to save files + Failed to save files + Documents (%1) Documents (%1) @@ -854,6 +896,10 @@ Move file Move file + + Failed to save file + Failed to save file + FileItem @@ -1376,16 +1422,12 @@ ID-Card Converted to crypto container! - Removing signature - Removing signature - - - Files can not be added to the signed container. The system will create a new container which shall contain the signed document and the files you wish to add. - Files can not be added to the signed container. The system will create a new container which shall contain the signed document and the files you wish to add. + Cannot alter container + Cannot alter container - Files can not be added to the cryptocontainer. The system will create a new container which shall contain the cypto-document and the files you wish to add. - Files can not be added to the cryptocontainer. The system will create a new container which shall contain the cypto-document and the files you wish to add. + Removing signature + Removing signature Connect the card reader to your computer and insert your ID card into the reader @@ -1460,6 +1502,22 @@ ID-Card Save Save + + Files can not be added to the signed container + Files can not be added to the signed container + + + Files can not be added to the cryptocontainer + Files can not be added to the cryptocontainer + + + The system will create a new container which shall contain the signed document and the files you wish to add. + The system will create a new container which shall contain the signed document and the files you wish to add. + + + The system will create a new container which shall contain the cypto-document and the files you wish to add. + The system will create a new container which shall contain the cypto-document and the files you wish to add. + Continue Continue @@ -1582,10 +1640,22 @@ ID-Card mobile-ID mobile-ID + + Your Smart-ID transaction has expired or user account not found. + Your Smart-ID transaction has expired or user account not found. + Smart-ID Smart-ID + + Check your %1 service access settings. <a href="https://www.id.ee/en/article/for-organisations-that-sign-large-quantities-of-documents-using-digidoc4-client/">Additional information</a> + Check your %1 service access settings. <a href="https://www.id.ee/en/article/for-organisations-that-sign-large-quantities-of-documents-using-digidoc4-client/">Additional information</a> + + + You need to update your Smart-ID application to sign documents in DigiDoc4 Client. + You need to update your Smart-ID application to sign documents in DigiDoc4 Client. + Service result: Service result: @@ -1594,10 +1664,6 @@ ID-Card Make sure control code matches with one in phone screen and enter Smart-ID PIN2-code. Make sure control code matches with one in phone screen and enter Smart-ID PIN2-code. - - Failed to sign container. Check your %1 service access settings. <a href="https://www.id.ee/en/article/for-organisations-that-sign-large-quantities-of-documents-using-digidoc4-client/">Additional information</a> - Failed to sign container. Check your %1 service access settings. <a href="https://www.id.ee/en/article/for-organisations-that-sign-large-quantities-of-documents-using-digidoc4-client/">Additional information</a> - Your Smart-ID certificate level must be qualified to sign documents in DigiDoc4 Client. Your Smart-ID certificate level must be qualified to sign documents in DigiDoc4 Client. @@ -1662,14 +1728,6 @@ ID-Card Failed to send request. The number of unsuccesful request from this IP address has been exceeded. Please try again later. Failed to send request. The number of unsuccesful request from this IP address has been exceeded. Please try again later. - - Failed to sign container. Your Smart-ID transaction has expired or user account not found. - Failed to sign container. Your Smart-ID transaction has expired or user account not found. - - - Failed to sign container. You need to update your Smart-ID application to sign documents in DigiDoc4 Client. - Failed to sign container. You need to update your Smart-ID application to sign documents in DigiDoc4 Client. - Failed to send request. A valid session is associated with this personal code. It is not possible to start a new signing before the current session expires. Please try again later. Failed to send request. A valid session is associated with this personal code. It is not possible to start a new signing before the current session expires. Please try again later. @@ -2149,13 +2207,6 @@ ID-Card Cancel - - SDocumentModel - - Failed remove document from container - Failed remove document from container - - SettingsDialog @@ -2218,6 +2269,18 @@ ID-Card Checking updates has failed. Checking updates has failed. + + Restart DigiDoc4 Client to activate logging + Restart DigiDoc4 Client to activate logging + + + Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. + Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. + + + Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. Restart now? + Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. Restart now? + Please try again. Please try again. @@ -2331,14 +2394,6 @@ Additional licenses and components Save log Save log - - Restart DigiDoc4 Client to activate logging. Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. Restart now? - Restart DigiDoc4 Client to activate logging. Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. Restart now? - - - Restart DigiDoc4 Client to activate logging. Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. - Restart DigiDoc4 Client to activate logging. Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. - The project is supported by the European Regional Development Fund The project is supported by the European Regional Development Fund @@ -2621,10 +2676,6 @@ Additional licenses and components time at - - Remove signature %1? - Remove signature %1? - Remove signature accessible @@ -2772,18 +2823,6 @@ Additional licenses and components PUK code is blocked because the PUK code has been entered 3 times incorrectly.<br/>You can not unblock the PUK code yourself.<br/>As long as the PUK code is blocked, all eID options can be used, except PUK-code.<br/> PUK code is blocked because the PUK code has been entered 3 times incorrectly.<br/>You can not unblock the PUK code yourself.<br/>As long as the PUK code is blocked, all eID options can be used, except PUK-code.<br/> - - Certificate status is unknown. A valid certificate is required for electronic use. - Certificate status is unknown. A valid certificate is required for electronic use. - - - Your ID-card signing certificate status is unknown. You need valid certificates to use your ID-card electronically. - Your ID-card signing certificate status is unknown. You need valid certificates to use your ID-card electronically. - - - Your ID-card authentication certificate status is unknown. You need valid certificates to use your ID-card electronically. - Your ID-card authentication certificate status is unknown. You need valid certificates to use your ID-card electronically. - Please visit the service center to obtain new codes.<br/><a href="https://www.politsei.ee/en/instructions/applying-for-an-id-card-for-an-adult/reminders-for-id-card-holders/">Additional information</a>. Please visit the service center to obtain new codes.<br/><a href="https://www.politsei.ee/en/instructions/applying-for-an-id-card-for-an-adult/reminders-for-id-card-holders/">Additional information</a>. @@ -2837,52 +2876,76 @@ Additional licenses and components Certificate for Encryption - PIN%1 has been blocked because PIN%1 code has been entered incorrectly 3 times. - PIN%1 has been blocked because PIN%1 code has been entered incorrectly 3 times. + Certificate is valid + Certificate is valid - Unblock to reuse PIN%1. - Unblock to reuse PIN%1. + Your ID-card signing certificate is valid + Your ID-card signing certificate is valid - Check certificate status - Check certificate status + Your ID-card authentication certificate is valid + Your ID-card authentication certificate is valid - Your ID-card authentication certificate is valid. - Your ID-card authentication certificate is valid. + Certificate is not valid + Certificate is not valid - Your ID-card signing certificate is valid. - Your ID-card signing certificate is valid. + A valid certificate is required for electronic use. + A valid certificate is required for electronic use. - Your ID-card signing certificate is not valid. You need valid certificates to use your ID-card electronically. - Your ID-card signing certificate is not valid. You need valid certificates to use your ID-card electronically. + Your ID-card signing certificate is not valid + Your ID-card signing certificate is not valid - Your ID-card authentication certificate is not valid. You need valid certificates to use your ID-card electronically. - Your ID-card authentication certificate is not valid. You need valid certificates to use your ID-card electronically. + You need valid certificates to use your ID-card electronically. + You need valid certificates to use your ID-card electronically. - Read more <a href="https://www.id.ee/en/article/validity-of-id-card-certificates/">here</a>. - Read more <a href="https://www.id.ee/en/article/validity-of-id-card-certificates/">here</a>. + Your ID-card authentication certificate is not valid + Your ID-card authentication certificate is not valid - Certificate is valid. - Certificate is valid. + Certificate status is unknown + Certificate status unknown - Certificate is not valid. A valid certificate is required for electronic use. - Certificate is not valid. A valid certificate is required for electronic use. + Your ID-card signing certificate status is unknown + Your ID-card signing certificate status is unknown - PIN%1 can not be used because the certificate has expired. - PIN%1 can not be used because the certificate has expired. + Your ID-card authentication certificate status is unknown + Your ID-card authentication certificate status is unknown - Certificate status check failed. Please check your internet connection. - Certificate status check failed. Please check your internet connection. + Certificate status check failed + Certificate status check failed + + + Please check your internet connection. + Please check your internet connection. + + + PIN%1 has been blocked because PIN%1 code has been entered incorrectly 3 times. + PIN%1 has been blocked because PIN%1 code has been entered incorrectly 3 times. + + + Unblock to reuse PIN%1. + Unblock to reuse PIN%1. + + + Check certificate status + Check certificate status + + + Read more <a href="https://www.id.ee/en/article/validity-of-id-card-certificates/">here</a>. + Read more <a href="https://www.id.ee/en/article/validity-of-id-card-certificates/">here</a>. + + + PIN%1 can not be used because the certificate has expired. + PIN%1 can not be used because the certificate has expired. diff --git a/client/translations/et.ts b/client/translations/et.ts index 5eb82a8a2..355d4c340 100644 --- a/client/translations/et.ts +++ b/client/translations/et.ts @@ -18,13 +18,25 @@ This certificate cannot be used for encryption Selle sertifikaadiga ei saa krüpteerida + + Failed to add certificate + Sertifikaadi lisamine ebaõnnestus + + + An expired certificate cannot be used for encryption. + Aegunud sertifikaati ei saa kasutada krüpteerimiseks. + Personal code is not valid! Isikukood pole korrektne! - Person or company does not own a valid certificate.<br />It is necessary to have a valid certificate for encryption.<br /><a href='https://www.id.ee/en/article/encryption-and-decryption-of-documents/'>Read more about it</a>. - Isikul või asutusel puudub kehtiv sertifikaat.<br />Krüpteerimiseks on vaja kehtivat sertifikaati.<br /><a href='https://www.id.ee/artikkel/dokumentide-krupteerimine-ja-dekrupteerimine/'>Loe täpsemalt siit</a>. + Person or company does not own a valid certificate + Isikul või asutusel puudub kehtiv sertifikaat + + + It is necessary to have a valid certificate for encryption.<br /><a href='https://www.id.ee/en/article/encryption-and-decryption-of-documents/'>Read more about it</a>. + Krüpteerimiseks on vaja kehtivat sertifikaati.<br /><a href='https://www.id.ee/artikkel/dokumentide-krupteerimine-ja-dekrupteerimine/'>Loe täpsemalt siit</a>. Certificates (*.cer *.crt *.pem) @@ -62,10 +74,6 @@ The name you were looking for gave too many results, please refine your search. Sinu otsitud nimi andis liiga palju vastuseid, palun täpsusta otsingut. - - Failed to add certificate. An expired certificate cannot be used for encryption. - Sertifikaadi lisamine ebaõnnestus. Aegunud sertifikaati ei saa kasutada krüpteerimiseks. - AddressItem @@ -144,10 +152,6 @@ Caught exception! Tekkis viga! - - The renewal of Trust Service status List, used for digital signature validation, has failed. Please check your internet connection and make sure you have the latest ID-software version installed. An expired Trust Service List (TSL) will be used for signature validation. <a href="https://www.id.ee/en/article/digidoc4-message-updating-the-list-of-trusted-certificates-was-unsuccessful/">Additional information</a> - Digiallkirjade kehtivuse kontrollimiseks kasutatava sertifikaatide usaldusnimekirja uuendamine ebaõnnestus. Palun kontrolli oma arvuti internetiühendust ja seda, kas arvutis on kõige uuem ID-tarkvara versioon. Allkirjade verifitseerimiseks kasutatakse aegunud nimekirja. <a href="https://www.id.ee/artikkel/digidoc4-teade-sertifikaatide-usaldusnimekirja-uuendamine-ebaonnestus/">Lisainfo</a> - Loading TSL lists Laadin TSL-nimekirja @@ -156,6 +160,14 @@ Added file(s) exceeds the maximum size limit of the container(120MB). Lisatud fail(id) ületab turvaümbriku maksimaalset suurust (~120MB). + + The renewal of Trust Service status List has failed + Sertifikaatide usaldusnimekirja uuendamine ebaõnnestus + + + Trust Service status List is used for digital signature validation. Please check your internet connection and make sure you have the latest ID-software version installed. An expired Trust Service List (TSL) will be used for signature validation. <a href="https://www.id.ee/en/article/digidoc4-message-updating-the-list-of-trusted-certificates-was-unsuccessful/">Additional information</a> + Sertifikaatide usaldusnimekirja kasutatatkse digiallkirjade kehtivuse kontrollimiseks. Palun kontrolli oma arvuti internetiühendust ja seda, kas arvutis on kõige uuem ID-tarkvara versioon. Allkirjade verifitseerimiseks kasutatakse aegunud nimekirja. <a href="https://www.id.ee/artikkel/digidoc4-teade-sertifikaatide-usaldusnimekirja-uuendamine-ebaonnestus/">Lisainfo</a> + Ignore forever Mitte kunagi @@ -168,6 +180,30 @@ DigiDoc4 Client Help DigiDoc4 klient abi + + This version of ID-software on your computer is unsupported + Sinu arvutis olev ID-tarkvara ei ole toetatud + + + DigiDoc4 Client cannot be used until you update ID-software. Install new ID-software from <a href="https://www.id.ee/en/article/install-id-software/">www.id.ee</a>. macOS users can download the latest ID-software version from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. + DigiDoc4 kliendi kasutamiseks pead ID-tarkvara uuendama. Paigalda uus ID-tarkvara veebilehelt <a href="https://www.id.ee/artikkel/paigalda-id-tarkvara/">www.id.ee</a>, macOS kasutajad saavad uusima tarkvara <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>'ist. + + + Your ID-software has expired + Sinu kasutatav ID-tarkvara on aegunud + + + To download the latest software version, go to the <a href="https://www.id.ee/en/article/install-id-software/">id.ee</a> website. macOS users can download the latest ID-software version from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. + Tarkvara viimase versiooni saad alla laadida veebilehelt <a href="https://www.id.ee/artikkel/paigalda-id-tarkvara/">id.ee</a>, macOS kasutajad saavad uusima tarkvara <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>'ist. + + + An ID-software update has been found + Saadaval on ID-tarkvara uuendus + + + To download the update, go to the <a href="https://www.id.ee/en/article/install-id-software/">id.ee</a> website. macOS users can download the update from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. + Uuenduse saad paigaldada veebilehelt <a href="https://www.id.ee/artikkel/paigalda-id-tarkvara/">id.ee</a>, macOS kasutajad saavad uuenduse alla laadida <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>'ist. + Close Window Sulge aken @@ -192,18 +228,6 @@ https://www.id.ee/en/id-help/ https://www.id.ee/id-abikeskus/ - - This version of ID-software on your computer is unsupported. DigiDoc4 Client cannot be used until you update ID-software. Install new ID-software from <a href="https://www.id.ee/en/article/install-id-software/">www.id.ee</a>. macOS users can download the latest ID-software version from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. - Sinu arvutis olev ID-tarkvara ei ole toetatud. DigiDoc4 kliendi kasutamiseks pead ID-tarkvara uuendama. Paigalda uus ID-tarkvara veebilehelt <a href="https://www.id.ee/artikkel/paigalda-id-tarkvara/">www.id.ee</a>, macOS kasutajad saavad uusima tarkvara <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>'ist. - - - Your ID-software has expired. To download the latest software version, go to the <a href="https://www.id.ee/en/article/install-id-software/">id.ee</a> website. macOS users can download the latest ID-software version from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. - Sinu kasutatav ID-tarkvara on aegunud. Tarkvara viimase versiooni saad alla laadida veebilehelt <a href="https://www.id.ee/artikkel/paigalda-id-tarkvara/">id.ee</a>, macOS kasutajad saavad uusima tarkvara <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>'ist. - - - An ID-software update has been found. To download the update, go to the <a href="https://www.id.ee/en/article/install-id-software/">id.ee</a> website. macOS users can download the update from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. - Saadaval on ID-tarkvara uuendus, mille saad paigaldada veebilehelt <a href="https://www.id.ee/artikkel/paigalda-id-tarkvara/">id.ee</a>, macOS kasutajad saavad uuenduse alla laadida <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>'ist. - Start downloading Alusta paigaldust @@ -218,10 +242,6 @@ CDocumentModel - - Failed to save file '%1' - Faili '%1' salvestamine ebaõnnestus - Added file(s) exceeds the maximum size limit of the container (∼120MB). <a href='https://www.id.ee/en/article/encrypting-large-120-mb-files/'>Read more about it</a> Lisatud fail(id) ületab turvaümbriku maksimaalset suurust (~120MB). <a href='https://www.id.ee/artikkel/suuremahuliste-120-mb-failide-krupteerimine/'>Loe täpsemalt siit</a> @@ -360,10 +380,6 @@ Save certificate Salvesta sertifikaat - - Failed to save file - Faili salvestamine ebaõnnestus - Close Sulge @@ -450,20 +466,24 @@ Ümbrik: - The document has already been signed by you. - Dokument on Sinu poolt juba allkirjastatud. + The document has already been signed by you + Dokument on Sinu poolt juba allkirjastatud DigiDoc4 Client DigiDoc4 klient - In order to view Validity Confirmation Sheet there has to be at least one printer installed! - Digitaalallkirjade kinnituslehe kuvamiseks peab olema arvutis vähemalt üks printer seadistatud! + You are about to delete the last file in the container + Oled kustutamas viimast faili ümbrikus - You are about to delete the last file in the container, it is removed along with the container. - Oled kustutamas viimast faili ümbrikus, koos sellega eemaldatakse ka ümbrik. + It is removed along with the container. + Koos sellega eemaldatakse ka ümbrik. + + + In order to view Validity Confirmation Sheet there has to be at least one printer installed! + Digitaalallkirjade kinnituslehe kuvamiseks peab olema arvutis vähemalt üks printer seadistatud! Change @@ -549,28 +569,32 @@ Digi-ID - Failed to decrypt document - Dokumendi dekrüpteerimine ebaõnnestus + Failed to add key + Võtme lisamine ebaõnnestus - Failed to open document - Dokumendi avamine ebaõnnestus + Please check your internet connection and network settings. + Palun kontrolli internetiühendust ja võrgu sätteid. - An error occurred while opening the document. - Ümbriku avamisel tekkis viga. + Failed to encrypt document + Dokumendi krüpteerimine ebaõnnestus - You must enter your PIN code twice in order to decrypt the CDOC2 container. The first PIN entry is required for authentication to the key server referenced in the CDOC2 container. Second PIN entry is required to decrypt the CDOC2 container. - CDOC2 ümbriku dekrüpteerimiseks tuleb sisestada PIN-koodi kaks korda. Esimene PIN-koodi sisestamine on vajalik autentimiseks CDOC2 ümbrikus viidatud võtmeedastusserverisse. Teine PIN-koodi sisestamine on vajalik CDOC2 ümbriku dekrüpteerimiseks. + Failed to remove key + Võtme eemaldamine ebaõnnestus + + + Failed to open document + Dokumendi avamine ebaõnnestus - Failed to encrypt document. Please check your internet connection and network settings. - Dokumendi krüpteerimine ebaõnnestus. Palun kontrolli internetiühendust ja võrgu sätteid. + An error occurred while opening the document + Ümbriku avamisel tekkis viga - Failed to decrypt document. Please check your internet connection and network settings. - Dokumendi dekrüpteerimine ebaõnnestus. Palun kontrolli internetiühendust ja võrgu sätteid. + You must enter your PIN code twice in order to decrypt the CDOC2 container. The first PIN entry is required for authentication to the key server referenced in the CDOC2 container. Second PIN entry is required to decrypt the CDOC2 container. + CDOC2 ümbriku dekrüpteerimiseks tuleb sisestada PIN-koodi kaks korda. Esimene PIN-koodi sisestamine on vajalik autentimiseks CDOC2 ümbrikus viidatud võtmeedastusserverisse. Teine PIN-koodi sisestamine on vajalik CDOC2 ümbriku dekrüpteerimiseks. Don't show again @@ -698,6 +722,10 @@ Cannot add files to signed container Allkirjastatud ümbrikule ei saa lisada faile + + Please check your internet connection. + Palun kontrolli internetiühendust. + Cannot add signature to empty container Tühjale ümbrikule ei saa lisada allkirja @@ -714,6 +742,18 @@ PIN Login failed PIN-koodi valideerimine ebaõnnestus + + Connecting to SiVa server failed! + Viga SiVa serveriga ühenduse saamisel! + + + Please check your internet connection and network settings. + Palun kontrolli internetiühendust ja võrgu sätteid. + + + Send document to SiVa + Saada dokument SiVa-le + Certificate status revoked Sertifikaat on kehtetu @@ -722,13 +762,21 @@ Certificate status unknown Sertifikaadi staatus on teadmata + + Check your Time-Stamping service access settings. + Kontrolli ajatempliteenuse ligipääsu seadeid. + PIN Locked. Unblock to reuse PIN. PIN on lukus. Tühista blokeering, et PIN-i taas kasutada. - An error occurred while opening the document. - Ümbriku avamisel tekkis viga. + Signing service URL is incorrect. + Allkirjastamise teenuse URL ei ole korrektne. + + + An error occurred while opening the document + Ümbriku avamisel tekkis viga Failed add file to container @@ -742,10 +790,6 @@ Failed to save container Ümbriku salvestamine ebaõnnestus - - Failed to sign container. Check your Time-Stamping service access settings. - Ümbriku allkirjastamine ebaõnnestus. Kontrolli ajatempliteenuse ligipääsu seadeid. - You have not granted IP-based access. Check your validity confirmation service access settings. Puudub IP-põhine ligipääs. Kontrolli kehtivuskinnitusteenuse ligipääsu seadeid. @@ -762,50 +806,40 @@ The timestamp added to the signature must be taken before validity confirmation. Allkirjale lisatud ajatempel peab olema varasem kehtivuskinnitusest. - - Connecting to SiVa server failed! Please check your internet connection. - Viga SiVa serveriga ühenduse saamisel! Palun kontrolli internetiühendust. - - - Failed to sign container. - Ümbriku allkirjastamine ebaõnnestus. - This type of signed document will be transmitted to the Digital Signature Validation Service SiVa to verify the validity of the digital signature. Read more information about transmitted data to Digital Signature Validation service from <a href="https://www.id.ee/en/article/data-protection-conditions-for-the-id-software-of-the-national-information-system-authority/">here</a>.<br />Do you want to continue? Seda tüüpi allkirjastatud dokument edastatakse digitaalallkirjade kehtivuse kontrollimiseks valideerimisteenusele SiVa. Digitaalallkirjade kehtivuse kontrollimisel edastatud andmete kohta loe lähemalt <a href="https://www.id.ee/artikkel/riigi-infosusteemi-ameti-id-tarkvara-andmekaitsetingimused/">siit</a>.<br />Kas soovid jätkata? - Connecting to SiVa server failed! Please check your internet connection and network settings. - Viga SiVa serveriga ühenduse saamisel! Palun kontrolli internetiühendust ja võrgu sätteid. + Opening + Avamine - Failed to sign container. Please check the access to signing services and network settings. - Ümbriku allkirjastamine ebaõnnestus. Palun kontrolli allkirjastamiseks vajalike teenuste ligipääsu ja võrgu sätteid. + Failed to sign container + Ümbriku allkirjastamine ebaõnnestus + + + DocumentModel - Failed to sign container. Signing service URL is incorrect. - Ümbriku allkirjastamine ebaõnnestus. Allkirjastamise teenuse URL ei ole korrektne. + Cannot add container to same container + Ümbriku lisamine samasse ümbrikusse ebaõnnestus1 - Opening - Avamine + File is already in container + Fail on juba ümbrikus - - - DocumentModel - Cannot add container to same container -%1 - Ümbriku lisamine samasse ümbrikusse ebaõnnestus -%1 + Failed to open file + Faili avamine ebaõnnestus A file with this extension cannot be opened in the DigiDoc4 Client. Download the file to view it. Sellise laiendiga faili ei ole võimalik avada DigiDoc4 kliendis. Faili vaatamiseks laadi see alla. - Cannot add the file to the envelope. File '%1' is already in container. - Faili lisamine ümbrikusse ebaõnnestus. Lisatud '%1' on juba ümbrikus olemas. + Failed remove document from container + Faili eemaldamine ümbrikust ebaõnnestus Internal error @@ -816,8 +850,12 @@ Faili nimega "mimetype" ei saa lisada ümbrikusse. - Cannot add empty file to the container. - Tühja faili ei saa lisada ümbrikusse. + Cannot add empty file to the container + Tühja faili ei saa lisada ümbrikusse + + + Failed to add file + Faili lisamine ebaõnnestus @@ -842,6 +880,10 @@ Create %1 Loo %1 + + Failed to save files + Failide salvestamine ebaõnnestus + Documents (%1) Dokumendid (%1) @@ -854,6 +896,10 @@ Move file Liiguta fail + + Failed to save file + Faili salvestamine ebaõnnestus + FileItem @@ -1376,16 +1422,12 @@ ID-kaardiga Konverteeritud turvaümbrikuks! - Removing signature - Allkirja eemaldamine - - - Files can not be added to the signed container. The system will create a new container which shall contain the signed document and the files you wish to add. - Allkirjastatud ümbrikusse ei saa faile lisada. Süsteem loob uue ümbriku, kuhu lisatakse allkirjastatud dokument ja Sinu valitud failid. + Cannot alter container + Ümbriku salvestamine ebaõnnestus - Files can not be added to the cryptocontainer. The system will create a new container which shall contain the cypto-document and the files you wish to add. - Krüpto-ümbrikusse ei saa faile lisada. Süsteem loob uue ümbriku, kuhu lisatakse krüpteeritud dokument ja Sinu valitud failid. + Removing signature + Allkirja eemaldamine Connect the card reader to your computer and insert your ID card into the reader @@ -1460,6 +1502,22 @@ ID-kaardiga Save Salvesta + + Files can not be added to the signed container + Allkirjastatud ümbrikusse ei saa faile lisada + + + Files can not be added to the cryptocontainer + Krüpto-ümbrikusse ei saa faile lisada + + + The system will create a new container which shall contain the signed document and the files you wish to add. + Süsteem loob uue ümbriku, kuhu lisatakse allkirjastatud dokument ja Sinu valitud failid. + + + The system will create a new container which shall contain the cypto-document and the files you wish to add. + Süsteem loob uue ümbriku, kuhu lisatakse krüpteeritud dokument ja Sinu valitud failid. + Continue Edasi @@ -1582,10 +1640,22 @@ ID-kaardiga mobile-ID mobiil-ID + + Your Smart-ID transaction has expired or user account not found. + Sinu Smart-ID toiming aegus või kontot ei leitud. + Smart-ID Smart-ID + + Check your %1 service access settings. <a href="https://www.id.ee/en/article/for-organisations-that-sign-large-quantities-of-documents-using-digidoc4-client/">Additional information</a> + Kontrolli %1 teenuse ligipääsu seadeid. <a href="https://www.id.ee/artikkel/asutustele-kus-allkirjastatakse-digidoc4-kliendi-kaudu-suuremates-kogustes-dokumente/">Loe täpsemalt siit</a> + + + You need to update your Smart-ID application to sign documents in DigiDoc4 Client. + DigiDoc4 kliendis allkirjastamiseks pead Smart-ID rakendust uuendama. + Service result: Teenuse vastus/tulemus: @@ -1594,10 +1664,6 @@ ID-kaardiga Make sure control code matches with one in phone screen and enter Smart-ID PIN2-code. Veendu kontrollkoodi õigsuses ja sisesta nutiseadmes Smart-ID PIN2-kood. - - Failed to sign container. Check your %1 service access settings. <a href="https://www.id.ee/en/article/for-organisations-that-sign-large-quantities-of-documents-using-digidoc4-client/">Additional information</a> - Ümbriku allkirjastamine ebaõnnestus. Kontrolli %1 teenuse ligipääsu seadeid. <a href="https://www.id.ee/artikkel/asutustele-kus-allkirjastatakse-digidoc4-kliendi-kaudu-suuremates-kogustes-dokumente/">Loe täpsemalt siit</a> - Your Smart-ID certificate level must be qualified to sign documents in DigiDoc4 Client. DigiDoc4 kliendis allkirjastamiseks peab sinu Smart-ID vastama tasemele kõrge. @@ -1662,14 +1728,6 @@ ID-kaardiga Failed to send request. %1 service has encountered technical errors. Please try again later. Päringu saatmine ebaõnnestus. %1 teenuses esinevad tehnilised tõrked. Palun proovige mõne aja pärast uuesti. - - Failed to sign container. Your Smart-ID transaction has expired or user account not found. - Ümbriku allkirjastamine ebaõnnestus. Sinu Smart-ID toiming aegus või kontot ei leitud. - - - Failed to sign container. You need to update your Smart-ID application to sign documents in DigiDoc4 Client. - Ümbriku allkirjastamine ebaõnnestus. DigiDoc4 kliendis allkirjastamiseks pead Smart-ID rakendust uuendama. - Failed to send request. A valid session is associated with this personal code. It is not possible to start a new signing before the current session expires. Please try again later. Päringu saatmine ebaõnnestus. Selle isikukoodiga on seotud kehtiv sessioon. Enne kehtiva sessiooni aegumist ei ole võimalik uut allkirjastamist alustada. Palun proovige mõne aja pärast uuesti. @@ -2149,13 +2207,6 @@ ID-kaardiga Katkesta - - SDocumentModel - - Failed remove document from container - Faili eemaldamine ümbrikust ebaõnnestus - - SettingsDialog @@ -2218,6 +2269,18 @@ ID-kaardiga Checking updates has failed. Värskenduste kontrollimine on ebaõnnestunud. + + Restart DigiDoc4 Client to activate logging + Logimise aktiveerimiseks taaskäivita DigiDoc4 klient + + + Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. + Loe täpsemalt <a href="https://www.id.ee/artikkel/logifaili-genereerimine-digidoc4-kliendis/">siit</a>. + + + Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. Restart now? + Loe täpsemalt <a href="https://www.id.ee/artikkel/logifaili-genereerimine-digidoc4-kliendis/">siit</a>. Taaskäivita rakendus? + Please try again. Palun proovi uuesti. @@ -2331,14 +2394,6 @@ Täiendavad litsentsid ja komponendid Save log Salvesta logifail - - Restart DigiDoc4 Client to activate logging. Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. Restart now? - Logimise aktiveerimiseks taaskäivita DigiDoc4 klient. Loe täpsemalt <a href="https://www.id.ee/artikkel/logifaili-genereerimine-digidoc4-kliendis/">siit</a>. Taaskäivita rakendus? - - - Restart DigiDoc4 Client to activate logging. Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. - Logimise aktiveerimiseks taaskäivita DigiDoc4 klient. Loe täpsemalt <a href="https://www.id.ee/artikkel/logifaili-genereerimine-digidoc4-kliendis/">siit</a>. - The project is supported by the European Regional Development Fund Projekti on toetatud Euroopa Liidu Regionaalarengu Fondist @@ -2621,10 +2676,6 @@ Täiendavad litsentsid ja komponendid time kell - - Remove signature %1? - Kas eemaldada allkiri %1? - Remove signature accessible @@ -2772,18 +2823,6 @@ Täiendavad litsentsid ja komponendid PUK code is blocked because the PUK code has been entered 3 times incorrectly.<br/>You can not unblock the PUK code yourself.<br/>As long as the PUK code is blocked, all eID options can be used, except PUK-code.<br/> PUK-kood on blokeeritud, kuna PUK-koodi on sisestatud 3 korda valesti.<br/>PUK-koodi ei saa ise lahti blokeerida.<br/>Kuigi PUK-kood on blokeeritud, saab kõiki eID võimalusi kasutada, välja arvatud PUK-koodi vajavaid.<br/> - - Certificate status is unknown. A valid certificate is required for electronic use. - Sertifikaadi staatus on teadmata. Elektrooniliseks kasutamiseks on vaja kehtivat sertifikaati. - - - Your ID-card signing certificate status is unknown. You need valid certificates to use your ID-card electronically. - Sinu ID-kaardi allkirjastamise sertifikaadi staatus on teadmata. Elektrooniliseks kasutamiseks on vaja kehtivat sertifikaati. - - - Your ID-card authentication certificate status is unknown. You need valid certificates to use your ID-card electronically. - Sinu ID-kaardi isikutuvastamise sertifikaadi staatus on teadmata. Elektrooniliseks kasutamiseks on vaja kehtivat sertifikaati. - Please visit the service center to obtain new codes.<br/><a href="https://www.politsei.ee/en/instructions/applying-for-an-id-card-for-an-adult/reminders-for-id-card-holders/">Additional information</a>. Uue PUK-koodi saamiseks külasta klienditeeninduspunkti, kust saad koodiümbriku uute koodidega.<br/><a href="https://www.politsei.ee/et/juhend/id-kaardi-taotlemine-taeiskasvanule/id-kaardi-kasutaja-meelespea/">Lisainfo</a>. @@ -2824,6 +2863,58 @@ Täiendavad litsentsid ja komponendid PUK code PUK-kood + + Certificate is valid + Sertifikaat kehtib + + + Your ID-card signing certificate is valid + Sinu ID-kaardi allkirjastamise sertifikaat kehtib + + + Your ID-card authentication certificate is valid + Sinu ID-kaardi isikutuvastamise sertifikaat kehtib + + + Certificate is not valid + Sertifikaat ei kehti + + + A valid certificate is required for electronic use. + Elektrooniliseks kasutamiseks on vaja kehtivat sertifikaati. + + + Your ID-card signing certificate is not valid + Sinu ID-kaardi allkirjastamise sertifikaat ei kehti + + + You need valid certificates to use your ID-card electronically. + ID-kaardi elektrooniliseks kasutamiseks on vaja kehtivaid sertifikaate. + + + Your ID-card authentication certificate is not valid + Sinu ID-kaardi isikutuvastamise sertifikaat ei kehti + + + Certificate status is unknown + Sertifikaadi staatus on teadmata + + + Your ID-card signing certificate status is unknown + Sinu ID-kaardi allkirjastamise sertifikaat staatus on teadmata + + + Your ID-card authentication certificate status is unknown + Sinu ID-kaardi isikutuvastamise sertifikaadi staatus on teadmata + + + Certificate status check failed + Sertifikaadi staatuse kontrollimine ebaõnnestus + + + Please check your internet connection. + Palun kontrolli internetiühendust. + The PUK code is located in your envelope PUK-kood asub Sinu koodiümbrikus @@ -2852,38 +2943,10 @@ Täiendavad litsentsid ja komponendid Check certificate status Kontrolli sertifikaadi staatust - - Your ID-card authentication certificate is valid. - Sinu ID-kaardi isikutuvastamise sertifikaat kehtib. - - - Your ID-card signing certificate is valid. - Sinu ID-kaardi allkirjastamise sertifikaat kehtib. - - - Your ID-card signing certificate is not valid. You need valid certificates to use your ID-card electronically. - Sinu ID-kaardi allkirjastamise sertifikaat ei kehti. ID-kaardi elektrooniliseks kasutamiseks on vaja kehtivaid sertifikaate. - - - Your ID-card authentication certificate is not valid. You need valid certificates to use your ID-card electronically. - Sinu ID-kaardi isikutuvastamise sertifikaat ei kehti. ID-kaardi elektrooniliseks kasutamiseks on vaja kehtivaid sertifikaate. - Read more <a href="https://www.id.ee/en/article/validity-of-id-card-certificates/">here</a>. Loe rohkem <a href="https://www.id.ee/artikkel/id-kaardi-sertifikaatide-kehtivus/">siit</a>. - - Certificate is valid. - Sertifikaat kehtib. - - - Certificate is not valid. A valid certificate is required for electronic use. - Sertifikaat ei kehti. Elektrooniliseks kasutamiseks on vaja kehtivat sertifikaati. - - - Certificate status check failed. Please check your internet connection. - Sertifikaadi staatuse kontrollimine ebaõnnestus. Palun kontrolli internetiühendust. - WarningDialog diff --git a/client/translations/ru.ts b/client/translations/ru.ts index 3fee1e545..1463122e0 100644 --- a/client/translations/ru.ts +++ b/client/translations/ru.ts @@ -18,13 +18,25 @@ This certificate cannot be used for encryption Данным сертификатом нельзя зашифровать + + Failed to add certificate + Не удалось добавить сертификат + + + An expired certificate cannot be used for encryption. + Сертификат с истекшим сроком действия нельзя использовать для шифрования. + Personal code is not valid! Личный код недействителен! - Person or company does not own a valid certificate.<br />It is necessary to have a valid certificate for encryption.<br /><a href='https://www.id.ee/en/article/encryption-and-decryption-of-documents/'>Read more about it</a>. - У человека или предприятия отсутствует действующий сертификат.<br />Для шифрования нужен действующий сертификат.<br /><a href='https://www.id.ee/ru/artikkel/shifrovanie-i-deshifrovka-dokumentov/'>Точнее можно прочитать</a>. + Person or company does not own a valid certificate + У человека или предприятия отсутствует действующий сертификат + + + It is necessary to have a valid certificate for encryption.<br /><a href='https://www.id.ee/en/article/encryption-and-decryption-of-documents/'>Read more about it</a>. + Для шифрования нужен действующий сертификат.<br /><a href='https://www.id.ee/ru/artikkel/shifrovanie-i-deshifrovka-dokumentov/'>Точнее можно прочитать</a>. Certificates (*.cer *.crt *.pem) @@ -62,10 +74,6 @@ The name you were looking for gave too many results, please refine your search. Согласно Вашему запросу выдается много ответов, пожалуйста уточните запрос. - - Failed to add certificate. An expired certificate cannot be used for encryption. - Не удалось добавить сертификат. Сертификат с истекшим сроком действия нельзя использовать для шифрования. - AddressItem @@ -144,10 +152,6 @@ Caught exception! Перехвачена системная ошибка! - - The renewal of Trust Service status List, used for digital signature validation, has failed. Please check your internet connection and make sure you have the latest ID-software version installed. An expired Trust Service List (TSL) will be used for signature validation. <a href="https://www.id.ee/en/article/digidoc4-message-updating-the-list-of-trusted-certificates-was-unsuccessful/">Additional information</a> - Не удалось обновить список доверенных сертификатов, используемый для проверки действительности цифровых подписей. Пожалуйста, проверьте ваше интернет-соединение и убедитесь в том, что на компьютере установлена последняя версия программного обеспечения ID-карты. Для верификации подписей будет использован устаревший список доверенных сертификатов. <a href="https://www.id.ee/ru/artikkel/uvedomlenie-digidoc4-obnovlenie-spiska-doveriya-sertifikatov-ne-udalos/">Дополнительная информация</a> - Loading TSL lists Загружаем список TSL @@ -156,6 +160,14 @@ Added file(s) exceeds the maximum size limit of the container(120MB). Вложенные файл(ы) превышают размер контейнера безопасности (~120 МБ). + + The renewal of Trust Service status List has failed + Не удалось обновить список доверенных сертификатов + + + Trust Service status List is used for digital signature validation. Please check your internet connection and make sure you have the latest ID-software version installed. An expired Trust Service List (TSL) will be used for signature validation. <a href="https://www.id.ee/en/article/digidoc4-message-updating-the-list-of-trusted-certificates-was-unsuccessful/">Additional information</a> + Список доверенных сертификатов используется для проверки действительности цифровых подписей. Пожалуйста, проверьте ваше интернет-соединение и убедитесь в том, что на компьютере установлена последняя версия программного обеспечения ID-карты. Для верификации подписей будет использован устаревший список доверенных сертификатов. <a href="https://www.id.ee/ru/artikkel/uvedomlenie-digidoc4-obnovlenie-spiska-doveriya-sertifikatov-ne-udalos/">Дополнительная информация</a> + Ignore forever Не устанавливать @@ -168,6 +180,30 @@ DigiDoc4 Client Help DigiDoc4 клиент помощь + + This version of ID-software on your computer is unsupported + Программное обеспечение ID на вашем компьютере не поддерживается + + + DigiDoc4 Client cannot be used until you update ID-software. Install new ID-software from <a href="https://www.id.ee/en/article/install-id-software/">www.id.ee</a>. macOS users can download the latest ID-software version from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. + Чтобы использовать программу DigiDoc4 клиент, вам необходимо обновить программное обеспечение ID. Установите новое программное обеспечение ID с веб-сайта <a href="https://www.id.ee/ru/artikkel/ustanovite-id-programmu/">www.id.ee</a>. Пользователи macOS могут скачать последнюю версию программного обеспечения ID-карты в магазине <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. + + + Your ID-software has expired + Вам необходимо обновить программное обеспечение ID-карты + + + To download the latest software version, go to the <a href="https://www.id.ee/en/article/install-id-software/">id.ee</a> website. macOS users can download the latest ID-software version from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. + Чтобы скачать последнюю версию программы, перейдите на сайт <a href="https://www.id.ee/ru/artikkel/ustanovite-id-programmu/">id.ee</a>. Пользователи macOS могут скачать последнюю версию программного обеспечения ID-карты в магазине <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. + + + An ID-software update has been found + Выпущено обновление для программного обеспечения ID-карты + + + To download the update, go to the <a href="https://www.id.ee/en/article/install-id-software/">id.ee</a> website. macOS users can download the update from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. + Чтобы скачать обновление, перейдите на сайт <a href="https://www.id.ee/ru/artikkel/ustanovite-id-programmu/">id.ee</a>. Пользователи macOS могут скачать обновление в магазине <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. + Close Window Закрыть окно @@ -192,18 +228,6 @@ https://www.id.ee/en/id-help/ https://www.id.ee/ru/id-pomoshh/ - - This version of ID-software on your computer is unsupported. DigiDoc4 Client cannot be used until you update ID-software. Install new ID-software from <a href="https://www.id.ee/en/article/install-id-software/">www.id.ee</a>. macOS users can download the latest ID-software version from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. - Программное обеспечение ID на вашем компьютере не поддерживается. Чтобы использовать программу DigiDoc4 клиент, вам необходимо обновить программное обеспечение ID. Установите новое программное обеспечение ID с веб-сайта <a href="https://www.id.ee/ru/artikkel/ustanovite-id-programmu/">www.id.ee</a>. Пользователи macOS могут скачать последнюю версию программного обеспечения ID-карты в магазине <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. - - - Your ID-software has expired. To download the latest software version, go to the <a href="https://www.id.ee/en/article/install-id-software/">id.ee</a> website. macOS users can download the latest ID-software version from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. - Вам необходимо обновить программное обеспечение ID-карты. Чтобы скачать последнюю версию программы, перейдите на сайт <a href="https://www.id.ee/ru/artikkel/ustanovite-id-programmu/">id.ee</a>. Пользователи macOS могут скачать последнюю версию программного обеспечения ID-карты в магазине <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. - - - An ID-software update has been found. To download the update, go to the <a href="https://www.id.ee/en/article/install-id-software/">id.ee</a> website. macOS users can download the update from the <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. - Выпущено обновление для программного обеспечения ID-карты. Чтобы скачать обновление, перейдите на сайт <a href="https://www.id.ee/ru/artikkel/ustanovite-id-programmu/">id.ee</a>. Пользователи macOS могут скачать обновление в магазине <a href="https://itunes.apple.com/ee/developer/ria/id556524921?mt=12">Mac App Store</a>. - Start downloading Начать установку @@ -218,10 +242,6 @@ CDocumentModel - - Failed to save file '%1' - Неудачное сохранение файла '%1' - Added file(s) exceeds the maximum size limit of the container (∼120MB). <a href='https://www.id.ee/en/article/encrypting-large-120-mb-files/'>Read more about it</a> Добаленные файл/ы превышают максимальный размер контейнера. <a href='https://www.id.ee/ru/artikkel/kriptovanie-fajlov-s-bolshim-obemom-120-mb/'>Точнее можно прочитать</a> @@ -360,10 +380,6 @@ Save certificate Сохранить сертификат - - Failed to save file - Не удалось сохранить файл - Close Закрыть @@ -450,20 +466,24 @@ Kонтейнер: - The document has already been signed by you. - Вы уже подписали этот документ. + The document has already been signed by you + Вы уже подписали этот документ DigiDoc4 Client DigiDoc4 клиент - In order to view Validity Confirmation Sheet there has to be at least one printer installed! - Для отображения листа подтверждения действительности цифровой подписи на компьютере должен быть установлен как минимум один принтер! + You are about to delete the last file in the container + Вы собираетесь удалить последний файл в контейнере + + + It is removed along with the container. + Он удаляется вместе с контейнером. - You are about to delete the last file in the container, it is removed along with the container. - Вы собираетесь удалить последний файл в контейнере, он удаляется вместе с контейнером. + In order to view Validity Confirmation Sheet there has to be at least one printer installed! + Для отображения листа подтверждения действительности цифровой подписи на компьютере должен быть установлен как минимум один принтер! Change @@ -549,28 +569,32 @@ Digi-ID - Failed to decrypt document - Не удалось расшифровать документ + Failed to add key + Не удалось добавить ключ - Failed to open document - Не удалось открыть документ + Please check your internet connection and network settings. + Пожалуйста, проверьте подключение к Интернету и настройки сети. - An error occurred while opening the document. - Во время открытия конверта возникла ошибка. + Failed to encrypt document + Не удалось зашифровать документ - You must enter your PIN code twice in order to decrypt the CDOC2 container. The first PIN entry is required for authentication to the key server referenced in the CDOC2 container. Second PIN entry is required to decrypt the CDOC2 container. - PIN-код необходимо ввести дважды, чтобы расшифровать конверт CDOC2. Первый ввод PIN-кода требуется для аутентификации на сервере передачи ключей, указанном в конверте CDOC2. Для расшифровки конверта CDOC2 требуется второй ввод PIN-кода. + Failed to remove key + Не удалось удалить ключ - Failed to encrypt document. Please check your internet connection and network settings. - Не удалось зашифровать документ. Пожалуйста, проверьте подключение к Интернету и настройки сети. + Failed to open document + Не удалось открыть документ - Failed to decrypt document. Please check your internet connection and network settings. - Не удалось расшифровать документ. Пожалуйста, проверьте подключение к Интернету и настройки сети. + An error occurred while opening the document + Во время открытия конверта возникла ошибка + + + You must enter your PIN code twice in order to decrypt the CDOC2 container. The first PIN entry is required for authentication to the key server referenced in the CDOC2 container. Second PIN entry is required to decrypt the CDOC2 container. + PIN-код необходимо ввести дважды, чтобы расшифровать конверт CDOC2. Первый ввод PIN-кода требуется для аутентификации на сервере передачи ключей, указанном в конверте CDOC2. Для расшифровки конверта CDOC2 требуется второй ввод PIN-кода. Don't show again @@ -702,6 +726,14 @@ Missing signature Подпись отсутствует + + Check your Time-Stamping service access settings. + Проверьте настройки доступа к меткам времени. + + + Please check your internet connection. + Пожалуйста проверьте подключение к интернету. + Cannot add signature to empty container Нельзя добавить подпись в пустой контейнер @@ -727,8 +759,20 @@ PIN заблокирован. Разблокируйте его для повторного использования PIN. - An error occurred while opening the document. - Во время открытия конверта возникла ошибка. + An error occurred while opening the document + Во время открытия конверта возникла ошибка + + + Connecting to SiVa server failed! + Ошибка при подключении с SiVa сервером! + + + Please check your internet connection and network settings. + Пожалуйста, проверьте подключение к Интернету и настройки сети. + + + Send document to SiVa + Отправить документ в SiVa Failed add file to container @@ -743,8 +787,8 @@ Не удается сохранить контейнер - Failed to sign container. Check your Time-Stamping service access settings. - Не удалось подписать контейнер. Проверьте настройки доступа к меткам времени. + Signing service URL is incorrect. + Службы URL-адрес подписи неверены. You have not granted IP-based access. Check your validity confirmation service access settings. @@ -762,50 +806,40 @@ The timestamp added to the signature must be taken before validity confirmation. Добавленная к подписи метка времени должна быть более ранней по времени, чем подтверждение действительности. - - Connecting to SiVa server failed! Please check your internet connection. - Ошибка при подключении с SiVa сервером! Пожалуйста проверьте подключение к интернету. - - - Failed to sign container. - Не удалось подписать контейнер. - This type of signed document will be transmitted to the Digital Signature Validation Service SiVa to verify the validity of the digital signature. Read more information about transmitted data to Digital Signature Validation service from <a href="https://www.id.ee/en/article/data-protection-conditions-for-the-id-software-of-the-national-information-system-authority/">here</a>.<br />Do you want to continue? Данный тип подписанного документа передается в службу валидации SiVa для проверки действительности цифровых подписей. Подробнее о данных, переданных для проверки действительности электронно-цифровых подписей, можно прочитать <a href="https://www.id.ee/ru/artikkel/usloviya-zashhity-dannyh-programmnogo-obespecheniya-id-karty-departamenta-gosudarstvennoj-infosistemy/">здесь</a>.<br />Желаете продолжить? - Connecting to SiVa server failed! Please check your internet connection and network settings. - Ошибка при подключении с SiVa сервером! Пожалуйста проверьте интернет соединение и настройки сети. + Opening + Открывается - Failed to sign container. Please check the access to signing services and network settings. - Не удалось подписать контейнер. Пожалуйста, проверьте настройки доступа и сеть для служб подписи. + Failed to sign container + Не удалось подписать контейнер + + + DocumentModel - Failed to sign container. Signing service URL is incorrect. - Не удалось подписать контейнер. Службы URL-адрес подписи неверены. + Cannot add container to same container + Невозможно добавить контейнер в тот же контейнер - Opening - Открывается + File is already in container + Файл уже в контейнере - - - DocumentModel - Cannot add container to same container -%1 - Невозможно добавить контейнер в тот же контейнер -%1 + Failed to open file + Не удалось открыть файл A file with this extension cannot be opened in the DigiDoc4 Client. Download the file to view it. Файл с таким расширением не может быть открыт в клиенте DigiDoc4. Загрузите файл, чтобы просмотреть его. - Cannot add the file to the envelope. File '%1' is already in container. - Невозможно добавить файл в контейнер. Файл '%1' уже в контейнере. + Failed remove document from container + Не удается удалить файл из контейнера Internal error @@ -816,8 +850,12 @@ Файл с названием "mimetype" нельзя добавить в контейнер. - Cannot add empty file to the container. - Пустой файл нельзя добавить в контейнер. + Cannot add empty file to the container + Пустой файл нельзя добавить в контейнер + + + Failed to add file + Не удалось добавить файл @@ -842,6 +880,10 @@ Create %1 Создайте %1 + + Failed to save files + Не удалось сохранить файлы + Documents (%1) Документы (%1) @@ -854,6 +896,10 @@ Move file Переместить файл + + Failed to save file + Не удалось сохранить файл + FileItem @@ -1376,16 +1422,12 @@ ID-картой Переделан в контейнер для зашифровывания! - Removing signature - Удаление подписи + Cannot alter container + Сохранение контейнера не удалось - Files can not be added to the signed container. The system will create a new container which shall contain the signed document and the files you wish to add. - Файлы не могут быть добавлены в подписанный контейнер. Система создаст новый контейнер, в который будет добавлен подписанный документ и выбранные вами файлы. - - - Files can not be added to the cryptocontainer. The system will create a new container which shall contain the cypto-document and the files you wish to add. - Файлы не могут быть добавлены в криптоконтейнер. Система создаст новый контейнер, в который будет добавлен зашифрованный документ и выбранные вами файлы. + Removing signature + Удаление подписи Connect the card reader to your computer and insert your ID card into the reader @@ -1460,6 +1502,22 @@ ID-картой Save Сохранить + + Files can not be added to the signed container + Файлы не могут быть добавлены в подписанный контейнер + + + Files can not be added to the cryptocontainer + Файлы не могут быть добавлены в криптоконтейнер + + + The system will create a new container which shall contain the signed document and the files you wish to add. + Система создаст новый контейнер, в который будет добавлен подписанный документ и выбранные вами файлы. + + + The system will create a new container which shall contain the cypto-document and the files you wish to add. + Система создаст новый контейнер, в который будет добавлен зашифрованный документ и выбранные вами файлы. + Continue Продолжить @@ -1582,10 +1640,22 @@ ID-картой mobile-ID mobiil-ID + + Your Smart-ID transaction has expired or user account not found. + Срок действия вашей операции Smart-ID истек или учетная запись не найдена. + Smart-ID Smart-ID + + Check your %1 service access settings. <a href="https://www.id.ee/en/article/for-organisations-that-sign-large-quantities-of-documents-using-digidoc4-client/">Additional information</a> + Проверьте настройки доступа услуги %1 <a href="https://www.id.ee/ru/artikkel/dlya-uchrezhdenij-v-kotoryh-v-bolshom-obeme-podpisyvayutsya-dokumenty-s-pomoshhyu-digidoc4-klienta/">Дополнительная информация</a> + + + You need to update your Smart-ID application to sign documents in DigiDoc4 Client. + Для подписания с помощью Smart-ID в программе DigiDoc4 клиент нужно обновить приложение Smart-ID. + Service result: Ответ/результат услуги: @@ -1594,10 +1664,6 @@ ID-картой Make sure control code matches with one in phone screen and enter Smart-ID PIN2-code. Убедитесь в правильности контрольного кодa и введите PIN2-код для Smart-ID. - - Failed to sign container. Check your %1 service access settings. <a href="https://www.id.ee/en/article/for-organisations-that-sign-large-quantities-of-documents-using-digidoc4-client/">Additional information</a> - Не удалось подписать контейнер. Проверьте настройки доступа услуги %1 <a href="https://www.id.ee/ru/artikkel/dlya-uchrezhdenij-v-kotoryh-v-bolshom-obeme-podpisyvayutsya-dokumenty-s-pomoshhyu-digidoc4-klienta/">Дополнительная информация</a> - Your Smart-ID certificate level must be qualified to sign documents in DigiDoc4 Client. Для подписания в DigiDoc4 клиенте Ваш Smart-ID должен соответствовать более высокому уровню. @@ -1662,14 +1728,6 @@ ID-картой Failed to send request. The number of unsuccesful request from this IP address has been exceeded. Please try again later. Не удалось отправить запрос. Превышено количество неудачных запросов с этого IP-адреса. Пожалуйста, попробуйте позже. - - Failed to sign container. Your Smart-ID transaction has expired or user account not found. - Не удалось подписать контейнер. Срок действия вашей операции Smart-ID истек или учетная запись не найдена. - - - Failed to sign container. You need to update your Smart-ID application to sign documents in DigiDoc4 Client. - Не удалось подписать контейнер. Для подписания с помощью Smart-ID в программе DigiDoc4 клиент нужно обновить приложение Smart-ID. - Failed to send request. A valid session is associated with this personal code. It is not possible to start a new signing before the current session expires. Please try again later. Не удалось отправить запрос. С данным персональным номером связана действующая сессия. До истечения действующей сессии невозможно начать новое подписание. Пожалуйста, попробуйте позже. @@ -2150,13 +2208,6 @@ ID-картой Отмена - - SDocumentModel - - Failed remove document from container - Не удается удалить файл из контейнера - - SettingsDialog @@ -2219,6 +2270,18 @@ ID-картой Checking updates has failed. Ошибка проверки обновлений. + + Restart DigiDoc4 Client to activate logging + Перезапустите клиент DigiDoc4, чтобы активировать ведение журнала + + + Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. + Подробнее читайте <a href="https://www.id.ee/ru/artikkel/generirovanie-log-fajla-v-kliente-digidoc4/">здесь</a>. + + + Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. Restart now? + Подробнее читайте <a href="https://www.id.ee/ru/artikkel/generirovanie-log-fajla-v-kliente-digidoc4/">здесь</a>. Перезапустить приложение? + Please try again. Пожалуйста, попробуйте еще раз. @@ -2332,14 +2395,6 @@ Additional licenses and components Save log Сохранить лог-файл - - Restart DigiDoc4 Client to activate logging. Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. Restart now? - Перезапустите клиент DigiDoc4, чтобы активировать ведение журнала. Подробнее читайте <a href="https://www.id.ee/ru/artikkel/generirovanie-log-fajla-v-kliente-digidoc4/">здесь</a>. Перезапустить приложение? - - - Restart DigiDoc4 Client to activate logging. Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. - Перезапустите клиент DigiDoc4, чтобы активировать ведение журнала. Подробнее читайте <a href="https://www.id.ee/ru/artikkel/generirovanie-log-fajla-v-kliente-digidoc4/">здесь</a>. - The project is supported by the European Regional Development Fund Проект поддерживается Европейским фондом регионального развития @@ -2622,10 +2677,6 @@ Additional licenses and components time время - - Remove signature %1? - Удалить подпись %1? - Remove signature accessible @@ -2773,18 +2824,6 @@ Additional licenses and components PUK code is blocked because the PUK code has been entered 3 times incorrectly.<br/>You can not unblock the PUK code yourself.<br/>As long as the PUK code is blocked, all eID options can be used, except PUK-code.<br/> PUK заблокирован, потому что PUK введен неверно 3 раза.<br/>PUK невозможно разблокировать самому.<br/>Пока PUK-код заблокирован, можно использовать все возможности eID, кроме тех которые требуют PUK.<br/> - - Certificate status is unknown. A valid certificate is required for electronic use. - Статус сертификата неизвестен. Для электронного использования требуется действующий сертификат. - - - Your ID-card signing certificate status is unknown. You need valid certificates to use your ID-card electronically. - Статус сертификата подписи вашей ID-карты неизвестен. Для электронного использования вашей ID-карты необходимы действующие сертификаты. - - - Your ID-card authentication certificate status is unknown. You need valid certificates to use your ID-card electronically. - Статус сертификата идентификации вашей ID-карты неизвестен. Для электронного использования вашей ID-карты необходимы действующие сертификаты. - Please visit the service center to obtain new codes.<br/><a href="https://www.politsei.ee/en/instructions/applying-for-an-id-card-for-an-adult/reminders-for-id-card-holders/">Additional information</a>. Для получения нового PUK-кода для своей ID-карты, посетите центр обслуживания, где вы сможете получить конверт с кодами.<br/><a href="https://www.politsei.ee/ru/instruktsii/hodataystvo-o-vydache-id-karty-vzroslomu/pamyatka-dlya-polzovatelya-id-karti/">Дополнительная информация</a>. @@ -2838,52 +2877,76 @@ Additional licenses and components Сертификат шифрования - PIN%1 has been blocked because PIN%1 code has been entered incorrectly 3 times. - PIN%1 заблокирован, потому что PIN%1-код был введен неверно 3 раза. + Certificate is valid + Сертификат действителен - Unblock to reuse PIN%1. - Разблокируйте его для повторного использования PIN%1. + Your ID-card signing certificate is valid + Сертификат подписи в вашей ID-карте действителен - Check certificate status - Проверить статус сертификата + Your ID-card authentication certificate is valid + Сертификат идентификации личности в вашей ID-карте действителен - Your ID-card authentication certificate is valid. - Сертификат идентификации личности в вашей ID-карте действителен. + Certificate is not valid + Сертификат недействителен - Your ID-card signing certificate is valid. - Сертификат подписи в вашей ID-карте действителен. + A valid certificate is required for electronic use. + Для электронного использования необходим действующий сертификат. - Your ID-card signing certificate is not valid. You need valid certificates to use your ID-card electronically. - Сертификат подписи вашей ID-карты недействителен. Для электронного использования ID-карты требуются действующие сертификаты. + Your ID-card signing certificate is not valid + Сертификат подписи вашей ID-карты недействителен - Your ID-card authentication certificate is not valid. You need valid certificates to use your ID-card electronically. - Сертификат идентификации личности в вашей ID-карте недействителен. Для электронного использования ID-карты требуются действующие сертификаты. + You need valid certificates to use your ID-card electronically. + Для электронного использования ID-карты требуются действующие сертификаты. - Read more <a href="https://www.id.ee/en/article/validity-of-id-card-certificates/">here</a>. - Подробнее читайте <a href="https://www.id.ee/ru/artikkel/dejstvitelnost-sertifikatov-id-karty/">здесь</a>. + Your ID-card authentication certificate is not valid + Сертификат идентификации личности в вашей ID-карте недействителен - Certificate is valid. - Сертификат действителен. + Certificate status is unknown + Статус сертификата неизвестен - Certificate is not valid. A valid certificate is required for electronic use. - Сертификат недействителен. Для электронного использования необходим действующий сертификат. + Your ID-card signing certificate status is unknown + Статус сертификата подписи вашей ID-карты неизвестен - PIN%1 can not be used because the certificate has expired. - PIN%1 не может быть использован, так как срок действия сертификата истек. + Your ID-card authentication certificate status is unknown + Статус сертификата идентификации вашей ID-карты неизвестен - Certificate status check failed. Please check your internet connection. - Проверка статуса сертификата не удалась. Пожалуйста проверьте подключение к интернету. + Certificate status check failed + Проверка статуса сертификата не удалась + + + Please check your internet connection. + Пожалуйста проверьте подключение к интернету. + + + PIN%1 has been blocked because PIN%1 code has been entered incorrectly 3 times. + PIN%1 заблокирован, потому что PIN%1-код был введен неверно 3 раза. + + + Unblock to reuse PIN%1. + Разблокируйте его для повторного использования PIN%1. + + + Check certificate status + Проверить статус сертификата + + + Read more <a href="https://www.id.ee/en/article/validity-of-id-card-certificates/">here</a>. + Подробнее читайте <a href="https://www.id.ee/ru/artikkel/dejstvitelnost-sertifikatov-id-karty/">здесь</a>. + + + PIN%1 can not be used because the certificate has expired. + PIN%1 не может быть использован, так как срок действия сертификата истек. diff --git a/client/widgets/ContainerPage.cpp b/client/widgets/ContainerPage.cpp index b1c5aa6d7..f6aa539f7 100644 --- a/client/widgets/ContainerPage.cpp +++ b/client/widgets/ContainerPage.cpp @@ -182,8 +182,9 @@ void ContainerPage::handleAction(int type) return signatureItem->isSelfSigned(code); })) { - auto *dlg = new WarningDialog(tr("The document has already been signed by you."), this); - dlg->addButton(tr("Continue signing"), QMessageBox::Ok); + auto *dlg = WarningDialog::create(this) + ->withTitle(tr("The document has already been signed by you")) + ->addButton(tr("Continue signing"), QMessageBox::Ok); if(dlg->exec() != QMessageBox::Ok) return; } @@ -209,10 +210,12 @@ void ContainerPage::deleteConfirm(C *c, int index) ui->leftPane->removeItem(index); return; } - auto *dlg = new WarningDialog(tr("You are about to delete the last file in the container, it is removed along with the container."), this); - dlg->setCancelText(WarningDialog::Cancel); - dlg->resetCancelStyle(false); - dlg->addButton(WarningDialog::Remove, QMessageBox::Ok, true); + auto *dlg = WarningDialog::create(this) + ->withTitle(tr("You are about to delete the last file in the container")) + ->withText(tr("It is removed along with the container.")) + ->setCancelText(WarningDialog::Cancel) + ->resetCancelStyle(false) + ->addButton(WarningDialog::Remove, QMessageBox::Ok, true); if (dlg->exec() != QMessageBox::Ok) return; window()->setWindowFilePath({}); @@ -318,7 +321,7 @@ void ContainerPage::transition(CryptoDoc *container, const QSslCertificate &cert isSupported = container->state() & UnencryptedContainer || container->canDecrypt(cert); setHeader(container->fileName()); ui->leftPane->init(fileName, QT_TRANSLATE_NOOP("ItemList", "Encrypted files")); - ui->rightPane->init(ItemAddress, QT_TRANSLATE_NOOP("ItemList", "Recipients")); + ui->rightPane->init(ItemList::ItemAddress, QT_TRANSLATE_NOOP("ItemList", "Recipients")); bool hasUnsupported = false; for(CKey &key: container->keys()) { @@ -346,8 +349,9 @@ void ContainerPage::transition(DigiDoc* container) #ifdef Q_OS_WIN if( QPrinterInfo::availablePrinterNames().isEmpty() ) { - WarningDialog::show(this, - tr("In order to view Validity Confirmation Sheet there has to be at least one printer installed!")); + WarningDialog::create(this) + ->withText(tr("In order to view Validity Confirmation Sheet there has to be at least one printer installed!")) + ->open(); return; } #endif @@ -459,7 +463,7 @@ void ContainerPage::updatePanes(ContainerState state) cancelText = QT_TR_NOOP("Start"); ui->changeLocation->show(); - ui->rightPane->init(ItemSignature, QT_TRANSLATE_NOOP("ItemList", "Container is not signed")); + ui->rightPane->init(ItemList::ItemSignature, QT_TRANSLATE_NOOP("ItemList", "Container is not signed")); ui->summary->setVisible(Settings::SHOW_PRINT_SUMMARY); setButtonsVisible({ ui->saveAs, ui->email }, true); break; @@ -467,7 +471,7 @@ void ContainerPage::updatePanes(ContainerState state) cancelText = QT_TR_NOOP("Start"); ui->changeLocation->hide(); - ui->rightPane->init(ItemSignature, QT_TRANSLATE_NOOP("ItemList", "Container signatures")); + ui->rightPane->init(ItemList::ItemSignature, QT_TRANSLATE_NOOP("ItemList", "Container signatures")); ui->summary->setVisible(Settings::SHOW_PRINT_SUMMARY); setButtonsVisible({ ui->saveAs, ui->email }, true); break; diff --git a/client/widgets/FileList.cpp b/client/widgets/FileList.cpp index 4156ace78..6130ba498 100644 --- a/client/widgets/FileList.cpp +++ b/client/widgets/FileList.cpp @@ -155,32 +155,35 @@ void FileList::saveAll() QString dest = dir + QDir::separator() + FileDialog::safeName(documentModel->data(i)); if( QFile::exists( dest ) ) { - if( b == QMessageBox::YesToAll ) + if(b == QMessageBox::YesToAll) { - QFile::remove( dest ); - documentModel->save( i, dest ); - continue; - } - auto *dlg = new WarningDialog(tr("%1 already exists.
Do you want replace it?").arg( dest ), this); - dlg->setCancelText(WarningDialog::Cancel); - dlg->addButton(WarningDialog::YES, QMessageBox::Yes); - dlg->addButton(WarningDialog::NO, QMessageBox::No); - dlg->addButton(tr("Save with other name"), QMessageBox::Save); - dlg->addButton(tr("Replace all"), QMessageBox::YesToAll); - b = dlg->exec(); - - if(b == QDialog::Rejected) - break; - if(b == QMessageBox::No) + QFile::remove( dest ); + documentModel->save( i, dest ); continue; - if(b == QMessageBox::Save) + } + b = WarningDialog::create(this) + ->withTitle(FileDialog::tr("Failed to save files")) + ->withText(tr("%1 already exists.
Do you want replace it?").arg(dest)) + ->setCancelText(WarningDialog::Cancel) + ->addButton(WarningDialog::YES, QMessageBox::Yes) + ->addButton(WarningDialog::NO, QMessageBox::No) + ->addButton(tr("Save with other name"), QMessageBox::Save) + ->addButton(tr("Replace all"), QMessageBox::YesToAll) + ->exec(); + + switch(b) { - dest = FileDialog::getSaveFileName(this, FileDialog::tr("Save file"), dest); - if( dest.isEmpty() ) + case QDialog::Rejected: + return; + case QMessageBox::No: + continue; + case QMessageBox::Save: + if(dest = FileDialog::getSaveFileName(this, FileDialog::tr("Save file"), dest); dest.isEmpty()) continue; + break; + default: + QFile::remove(dest); } - else - QFile::remove( dest ); } documentModel->save( i, dest ); } diff --git a/client/widgets/ItemList.cpp b/client/widgets/ItemList.cpp index 67b2d124e..c151afa1c 100644 --- a/client/widgets/ItemList.cpp +++ b/client/widgets/ItemList.cpp @@ -51,14 +51,9 @@ ItemList::~ItemList() void ItemList::addHeader(const char *label) { headerText = label; - header = new QLabel(tr(label), this); - header->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); - header->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - header->setFocusPolicy(Qt::TabFocus); - header->resize(415, 64); - header->setFixedHeight(64); - header->setStyleSheet(QStringLiteral("border-bottom: 1px solid #E7EAEF; color: #003168;")); + header->setAlignment(Qt::AlignCenter); + header->setStyleSheet(QStringLiteral("border-bottom: 1px solid #E7EAEF; color: #003168; font-size: 22px; padding: 16px 0px;")); ui->itemLayout->insertWidget(0, header); setTabOrder(this, header); setTabOrder(header, ui->header); @@ -143,12 +138,14 @@ int ItemList::index(Item *item) const return items.indexOf(item); } -void ItemList::init(ItemType item, const char *header) +void ItemList::init(ListType item, const char *header) { ui->listHeader->setText(tr(title = header)); switch(item) { + case AddedAdresses: + break; case ToAddAdresses: addTitle = QT_TR_NOOP("Add all"); ui->findGroup->show(); @@ -177,8 +174,6 @@ void ItemList::init(ItemType item, const char *header) case ItemSignature: ui->add->hide(); break; - default: - break; } ui->add->setText(tr(addTitle)); } diff --git a/client/widgets/ItemList.h b/client/widgets/ItemList.h index bd533de57..51bc701a5 100644 --- a/client/widgets/ItemList.h +++ b/client/widgets/ItemList.h @@ -37,10 +37,18 @@ class ItemList : public QScrollArea Q_OBJECT public: + enum ListType : unsigned char { + ItemFile, + ItemSignature, + ItemAddress, + ToAddAdresses, + AddedAdresses, + }; + explicit ItemList(QWidget *parent = {}); ~ItemList() override; - void init(ria::qdigidoc4::ItemType itemType, const char *header); + void init(ListType itemType, const char *header); void addHeader(const char *label); void addHeaderWidget(Item *widget); void addWidget(Item *widget); diff --git a/client/widgets/ItemList.ui b/client/widgets/ItemList.ui index 0ba5f67b5..cb63ee874 100644 --- a/client/widgets/ItemList.ui +++ b/client/widgets/ItemList.ui @@ -56,7 +56,7 @@ border: none; color: #2F70B6; border: 1px solid #2F70B6; } -#add:hover { +#add:hover, #add:focus { background-color: #EAF1F8; border-color: #EAF1F8; } @@ -98,7 +98,7 @@ font-size: 22px; 24 - 32 + 16 24 @@ -116,7 +116,7 @@ font-size: 22px; 8 - 1 + 16 8 @@ -292,7 +292,7 @@ color: #ffffff; font-weight: 700; background-color: #2F70B6; } -QPushButton:hover { +QPushButton:hover, QPushButton:focus { background-color: #2B66A6; } QPushButton:pressed { diff --git a/client/widgets/SignatureItem.cpp b/client/widgets/SignatureItem.cpp index 1ffcacf83..3c425176b 100644 --- a/client/widgets/SignatureItem.cpp +++ b/client/widgets/SignatureItem.cpp @@ -53,11 +53,12 @@ SignatureItem::SignatureItem(DigiDocSignature s, QWidget *parent) ui->remove->setVisible(ui->signature.container()->isSupported()); connect(ui->remove, &QToolButton::clicked, this, [this]{ const SslCertificate c = ui->signature.cert(); - auto *dlg = new WarningDialog(tr("Remove signature %1?") - .arg(c.toString(c.showCN() ? QStringLiteral("CN serialNumber") : QStringLiteral("GN SN serialNumber"))), this); - dlg->setCancelText(WarningDialog::Cancel); - dlg->resetCancelStyle(false); - dlg->addButton(WarningDialog::Remove, QMessageBox::Ok, true); + auto *dlg = WarningDialog::create(this) + ->withTitle(tr("Remove signature")) + ->withText(c.toString(c.showCN() ? QStringLiteral("CN serialNumber") : QStringLiteral("GN SN serialNumber"))) + ->setCancelText(WarningDialog::Cancel) + ->resetCancelStyle(false) + ->addButton(WarningDialog::Remove, QMessageBox::Ok, true); connect(dlg, &WarningDialog::finished, this, [this](int result) { if(result == QMessageBox::Ok) emit remove(this); diff --git a/client/widgets/VerifyCert.cpp b/client/widgets/VerifyCert.cpp index cec31fbfe..d55bf91fc 100644 --- a/client/widgets/VerifyCert.cpp +++ b/client/widgets/VerifyCert.cpp @@ -49,37 +49,45 @@ VerifyCert::VerifyCert(QWidget *parent) pinType == QSmartCardData::Pin1Type ? QStringLiteral("-auth") : QStringLiteral("-sign")); }); connect(ui->checkCert, &QPushButton::clicked, this, [this]{ - QString msg = tr("Read more here."); + auto *dlg = WarningDialog::create(this); + QString readMore = tr("Read more here."); switch(c.validateOnline()) { case SslCertificate::Good: if(SslCertificate::CertType::TempelType == c.type()) - msg.prepend(tr("Certificate is valid. ")); + dlg->withTitle(tr("Certificate is valid")); else if(c.keyUsage().contains(SslCertificate::NonRepudiation)) - msg.prepend(tr("Your ID-card signing certificate is valid. ")); + dlg->withTitle(tr("Your ID-card signing certificate is valid")); else - msg.prepend(tr("Your ID-card authentication certificate is valid. ")); + dlg->withTitle(tr("Your ID-card authentication certificate is valid")); break; case SslCertificate::Revoked: if(SslCertificate::CertType::TempelType == c.type()) - msg.prepend(tr("Certificate is not valid. A valid certificate is required for electronic use. ")); + dlg->withTitle(tr("Certificate is not valid")) + ->withText(tr("A valid certificate is required for electronic use. ") + readMore); else if(c.keyUsage().contains(SslCertificate::NonRepudiation)) - msg.prepend(tr("Your ID-card signing certificate is not valid. You need valid certificates to use your ID-card electronically. ")); + dlg->withTitle(tr("Your ID-card signing certificate is not valid")) + ->withText(tr("You need valid certificates to use your ID-card electronically. ") + readMore); else - msg.prepend(tr("Your ID-card authentication certificate is not valid. You need valid certificates to use your ID-card electronically. ")); + dlg->withTitle(tr("Your ID-card authentication certificate is not valid")) + ->withText(tr("You need valid certificates to use your ID-card electronically. ") + readMore); break; case SslCertificate::Unknown: if(SslCertificate::CertType::TempelType == c.type()) - msg.prepend(tr("Certificate status is unknown. A valid certificate is required for electronic use. ")); + dlg->withTitle(tr("Certificate status is unknown")) + ->withText(tr("A valid certificate is required for electronic use. ") + readMore); else if(c.keyUsage().contains(SslCertificate::NonRepudiation)) - msg.prepend(tr("Your ID-card signing certificate status is unknown. You need valid certificates to use your ID-card electronically. ")); + dlg->withTitle(tr("Your ID-card signing certificate status is unknown")) + ->withText(tr("You need valid certificates to use your ID-card electronically. ") + readMore); else - msg.prepend(tr("Your ID-card authentication certificate status is unknown. You need valid certificates to use your ID-card electronically. ")); + dlg->withTitle(tr("Your ID-card authentication certificate status is unknown")) + ->withText(tr("You need valid certificates to use your ID-card electronically. ") + readMore); break; default: - msg = tr("Certificate status check failed. Please check your internet connection."); + dlg->withTitle(tr("Certificate status check failed")) + ->withText(tr("Please check your internet connection.")); } - WarningDialog::show(this, msg); + dlg->open(); }); clear();