From b8c47c0efa68a35af8c6cec7b4315b69bcca10fc Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Tue, 21 Jan 2020 15:27:25 +0200 Subject: [PATCH] Translate error (#633) IB-6229 Signed-off-by: Raul Metsma --- client/dialogs/MobileProgress.cpp | 2 +- client/dialogs/SmartIDProgress.cpp | 9 +++++++-- client/translations/en.ts | 8 ++++++-- client/translations/et.ts | 8 ++++++-- client/translations/ru.ts | 10 +++++++--- 5 files changed, 27 insertions(+), 10 deletions(-) diff --git a/client/dialogs/MobileProgress.cpp b/client/dialogs/MobileProgress.cpp index 3162cfe17..bcee1c99b 100644 --- a/client/dialogs/MobileProgress.cpp +++ b/client/dialogs/MobileProgress.cpp @@ -167,7 +167,7 @@ MobileProgress::MobileProgress(QWidget *parent) else if(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() == 400) break; else - returnError(tr("Failed to send request ") + reply->errorString()); + returnError(tr("Failed to send request. ") + reply->errorString()); return; } static const QStringList contentType{"application/json", "application/json;charset=UTF-8"}; diff --git a/client/dialogs/SmartIDProgress.cpp b/client/dialogs/SmartIDProgress.cpp index e6d0ede82..78d3021f6 100644 --- a/client/dialogs/SmartIDProgress.cpp +++ b/client/dialogs/SmartIDProgress.cpp @@ -187,7 +187,7 @@ SmartIDProgress::SmartIDProgress(QWidget *parent) returnError(tr("%1 service has encountered technical errors. Please try again later.").arg("Smart-ID")); return; default: - returnError(tr("Failed to send request ") + reply->errorString()); + returnError(tr("Failed to send request. ") + reply->errorString()); return; } } @@ -215,7 +215,12 @@ SmartIDProgress::SmartIDProgress(QWidget *parent) if(endResult == QStringLiteral("USER_REFUSED") || endResult == QStringLiteral("TIMEOUT")) d->l.exit(QDialog::Rejected); else if(endResult != QStringLiteral("OK")) - returnError(tr("Service result: ") + endResult); + { + if(endResult == QStringLiteral("WRONG_VC")) + returnError(tr("Error: an incorrect control code was chosen")); + else + returnError(tr("Service result: ") + endResult); + } else if(d->documentNumber.isEmpty()) d->documentNumber = result.value(QStringLiteral("result")).toObject().value(QStringLiteral("documentNumber")).toString(); if(result.contains(QStringLiteral("signature"))) diff --git a/client/translations/en.ts b/client/translations/en.ts index 646cecd43..73b266617 100755 --- a/client/translations/en.ts +++ b/client/translations/en.ts @@ -1787,8 +1787,8 @@ Control code: %1 %1 service has encountered technical errors. Please try again later. - Failed to send request - Failed to send request + Failed to send request. + Failed to send request. Invalid content type header @@ -1858,6 +1858,10 @@ Control code: %1 Please include correct country code. Please include correct country code. + + Error: an incorrect control code was chosen + Error: an incorrect control code was chosen + NoCardInfo diff --git a/client/translations/et.ts b/client/translations/et.ts index 9d179b436..08e3a96c4 100755 --- a/client/translations/et.ts +++ b/client/translations/et.ts @@ -1787,8 +1787,8 @@ Kontrollkood: %1 %1 teenuses esinevad tehnilised tõrked. Palun proovige mõne aja pärast uuesti. - Failed to send request - Päringu saatmine ebaõnnestus + Failed to send request. + Päringu saatmine ebaõnnestus. Invalid content type header @@ -1858,6 +1858,10 @@ Kontrollkood: %1 Please include correct country code. Telefoninumber peab sisaldama riigikoodi. + + Error: an incorrect control code was chosen + Viga: valiti vale kontrollkood + NoCardInfo diff --git a/client/translations/ru.ts b/client/translations/ru.ts index 9da2c08c2..4f917c70f 100755 --- a/client/translations/ru.ts +++ b/client/translations/ru.ts @@ -1790,8 +1790,8 @@ Kонтрольный код: %1 Технический сбой услуги %1. Пожалуйста, попробуйте позже. - Failed to send request - Не удалось отправить запрос + Failed to send request. + Не удалось отправить запрос. Invalid content type header @@ -1851,7 +1851,7 @@ Kонтрольный код: %1 Open the Smart-ID application on your smart device and confirm device for signing. - + Откройте приложение Smart-ID на смарт-устройстве и подтвердите это устройство для подписывания. The limit for digital signatures per month has been reached for this IP address. <a href="https://www.id.ee/index.php?id=39023">Additional information</a> @@ -1861,6 +1861,10 @@ Kонтрольный код: %1 Please include correct country code. Номер телефона должен содержать код страны. + + Error: an incorrect control code was chosen + Ошибка: выбран неправильный контрольный код + NoCardInfo