From 218a7c1db6c83dd178e8efb3ce905c8b743edbec Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Wed, 21 Dec 2022 12:59:02 +0200 Subject: [PATCH] Update texts (#1136) IB-7546 Signed-off-by: Raul Metsma Signed-off-by: Raul Metsma --- client/CryptoDoc.cpp | 7 ++++--- client/dialogs/AddRecipients.cpp | 15 +++++++-------- client/dialogs/WarningDialog.cpp | 5 ----- client/dialogs/WarningDialog.h | 1 - client/translations/en.ts | 8 ++++---- client/translations/et.ts | 8 ++++---- client/translations/ru.ts | 8 ++++---- client/widgets/VerifyCert.cpp | 2 +- common | 2 +- 9 files changed, 25 insertions(+), 31 deletions(-) diff --git a/client/CryptoDoc.cpp b/client/CryptoDoc.cpp index 346b3fa73..e7adec0a7 100644 --- a/client/CryptoDoc.cpp +++ b/client/CryptoDoc.cpp @@ -818,12 +818,13 @@ bool CDocumentModel::addFile(const QString &file, const QString &mime) QFileInfo info(file); if(info.size() == 0) { - WarningDialog(tr("Cannot add empty file to the container."), qApp->mainWindow()).exec(); + WarningDialog::show(qApp->activeWindow(), tr("Cannot add empty file to the container.")); return false; } if(info.size() > 120*1024*1024) { - WarningDialog(tr("Added file(s) exceeds the maximum size limit of the container(120MB)."), qApp->activeWindow()).exec(); + WarningDialog::show(qApp->activeWindow(), tr("Added file(s) exceeds the maximum size limit of the container (∼120MB). " + "Read more about it")); return false; } @@ -833,7 +834,7 @@ bool CDocumentModel::addFile(const QString &file, const QString &mime) qDebug() << containerFile.name << " vs " << file; if(containerFile.name == fileName) { - d->setLastError(DocumentModel::tr("Cannot add the file to the envelope. File '%1' is already in container.") + WarningDialog::show(qApp->activeWindow(), DocumentModel::tr("Cannot add the file to the envelope. File '%1' is already in container.") .arg(FileDialog::normalized(fileName))); return false; } diff --git a/client/dialogs/AddRecipients.cpp b/client/dialogs/AddRecipients.cpp index 2daac0bae..d99052764 100644 --- a/client/dialogs/AddRecipients.cpp +++ b/client/dialogs/AddRecipients.cpp @@ -158,7 +158,7 @@ void AddRecipients::addRecipientFromFile() QFile f( file ); if( !f.open( QIODevice::ReadOnly ) ) { - WarningDialog::warning(this, tr("Failed to read certificate")); + WarningDialog::show(this, tr("Failed to read certificate")); return; } @@ -170,18 +170,17 @@ void AddRecipients::addRecipientFromFile() } if( cert.isNull() ) { - WarningDialog::warning( this, tr("Failed to read certificate")); + WarningDialog::show( this, tr("Failed to read certificate")); } else if( !SslCertificate( cert ).keyUsage().contains( SslCertificate::KeyEncipherment ) && !SslCertificate( cert ).keyUsage().contains( SslCertificate::KeyAgreement ) ) { - WarningDialog::warning( this, tr("This certificate cannot be used for encryption")); + WarningDialog::show( this, tr("This certificate cannot be used for encryption")); } else if(AddressItem *item = addRecipientToLeftPane(cert)) { addRecipientToRightPane(item, true); } - f.close(); } void AddRecipients::addRecipientFromHistory() @@ -409,7 +408,7 @@ void AddRecipients::search(const QString &term, bool select, const QString &type if(!IKValidator::isValid(cleanTerm)) { QApplication::restoreOverrideCursor(); - WarningDialog::warning(this, tr("Personal code is not valid!")); + WarningDialog::show(this, tr("Personal code is not valid!")); return; } userData["personSearch"] = true; @@ -427,7 +426,7 @@ void AddRecipients::search(const QString &term, bool select, const QString &type void AddRecipients::showError( const QString &msg, const QString &details ) { QApplication::restoreOverrideCursor(); - WarningDialog(msg, details, this).exec(); + WarningDialog::show(this, msg, details); } void AddRecipients::showResult(const QList &result, int resultCount, const QVariantMap &userData) @@ -454,8 +453,8 @@ void AddRecipients::showResult(const QList &result, int resultC else if(isEmpty) { showError(tr("Person or company does not own a valid certificate.
" - "It is necessary to have a valid certificate for encryption.
" - "In case of questions please contact our support via id.ee.")); + "It is necessary to have a valid certificate for encryption.
" + "Read more about it.")); } QApplication::restoreOverrideCursor(); } diff --git a/client/dialogs/WarningDialog.cpp b/client/dialogs/WarningDialog.cpp index a8e998c36..73b51025c 100644 --- a/client/dialogs/WarningDialog.cpp +++ b/client/dialogs/WarningDialog.cpp @@ -118,8 +118,3 @@ void WarningDialog::show(QWidget *parent, const QString &text, const QString &de dlg->setAttribute(Qt::WA_DeleteOnClose); dlg->open(); } - -void WarningDialog::warning(QWidget *parent, const QString& text) -{ - WarningDialog(text, {}, parent).exec(); -} diff --git a/client/dialogs/WarningDialog.h b/client/dialogs/WarningDialog.h index c96d65724..d3293f12e 100644 --- a/client/dialogs/WarningDialog.h +++ b/client/dialogs/WarningDialog.h @@ -42,7 +42,6 @@ class WarningDialog : public QDialog void resetCancelStyle(); void setText(const QString& text); static void show(QWidget *parent, const QString &text, const QString &details = {}); - static void warning(QWidget *parent, const QString& text); private: Ui::WarningDialog *ui; diff --git a/client/translations/en.ts b/client/translations/en.ts index b6ed68834..107330293 100644 --- a/client/translations/en.ts +++ b/client/translations/en.ts @@ -77,8 +77,8 @@ 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 />In case of questions please contact our support via <a href="https://www.id.ee/en/">id.ee</a>. - Person or company does not own a valid certificate.<br />It is necessary to have a valid certificate for encryption.<br />In case of questions please contact our support via <a href="https://www.id.ee/en/">id.ee</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.<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>. Certificates (*.cer *.crt *.pem) @@ -265,8 +265,8 @@ Cannot add empty file to the container. - Added file(s) exceeds the maximum size limit of the container(120MB). - Added file(s) exceeds the maximum size limit of the container (~120MB). + 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> diff --git a/client/translations/et.ts b/client/translations/et.ts index ae25fbf85..ce9919858 100644 --- a/client/translations/et.ts +++ b/client/translations/et.ts @@ -77,8 +77,8 @@ Isikukood pole korrektne! - Person or company does not own a valid certificate.<br />It is necessary to have a valid certificate for encryption.<br />In case of questions please contact our support via <a href="https://www.id.ee/en/">id.ee</a>. - Isikul või asutusel puudub kehtiv sertifikaat.<br />Krüpteerimiseks on vaja kehtivat sertifikaati.<br />Küsimuste korral võta ühendust <a href="https://www.id.ee/">ID-abikeskusega</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>. + 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>. Certificates (*.cer *.crt *.pem) @@ -265,8 +265,8 @@ Tühja faili ei saa lisada ümbrikusse. - Added file(s) exceeds the maximum size limit of the container(120MB). - Lisatud fail(id) ületab turvaümbriku maksimaalset suurust (~120MB). + 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> diff --git a/client/translations/ru.ts b/client/translations/ru.ts index 105e1c03f..38aaeb1d7 100644 --- a/client/translations/ru.ts +++ b/client/translations/ru.ts @@ -77,8 +77,8 @@ Личный код недействителен! - Person or company does not own a valid certificate.<br />It is necessary to have a valid certificate for encryption.<br />In case of questions please contact our support via <a href="https://www.id.ee/en/">id.ee</a>. - У лица или учреждения отсутствует действующий сертификат.<br />Для зашифровывания необходим действующий сертификат.<br />Если у вас возникнут вопросы, пожалуйста, обратитесь за помощью через <a href="https://www.id.ee/ru/">id.ee</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>. + У человека или предприятия отсутствует действующий сертификат.<br />Для шифрования нужен действующий сертификат.<br /><a href='https://www.id.ee/ru/artikkel/shifrovanie-i-deshifrovka-dokumentov/'>Точнее можно прочитать</a> Certificates (*.cer *.crt *.pem) @@ -265,8 +265,8 @@ Пустой файл нельзя добавить в контейнер. - Added file(s) exceeds the maximum size limit of the container(120MB). - Вложенные файл(ы) превышают размер контейнера безопасности (~120 МБ). + 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> diff --git a/client/widgets/VerifyCert.cpp b/client/widgets/VerifyCert.cpp index 752aaa8bc..e86b22ea9 100644 --- a/client/widgets/VerifyCert.cpp +++ b/client/widgets/VerifyCert.cpp @@ -57,7 +57,7 @@ VerifyCert::VerifyCert(QWidget *parent) default: msg = tr("Certificate status check failed. Please check your internet connection."); } - WarningDialog::warning(this, msg); + WarningDialog::show(this, msg); }); ui->nameIcon->hide(); diff --git a/common b/common index e653783e3..58780f1bd 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit e653783e334b13005384876d73e886a854aa763e +Subproject commit 58780f1bd14d578ad51974e7e2cab35b19fafcb6