Skip to content

Commit

Permalink
Translate error (#633)
Browse files Browse the repository at this point in the history
IB-6229

Signed-off-by: Raul Metsma <raul@metsma.ee>
  • Loading branch information
metsma authored and kristelmerilain committed Jan 21, 2020
1 parent 306df3c commit b8c47c0
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 10 deletions.
2 changes: 1 addition & 1 deletion client/dialogs/MobileProgress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"};
Expand Down
9 changes: 7 additions & 2 deletions client/dialogs/SmartIDProgress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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")))
Expand Down
8 changes: 6 additions & 2 deletions client/translations/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1787,8 +1787,8 @@ Control code: %1</translation>
<translation>%1 service has encountered technical errors. Please try again later.</translation>
</message>
<message>
<source>Failed to send request </source>
<translation>Failed to send request </translation>
<source>Failed to send request. </source>
<translation>Failed to send request. </translation>
</message>
<message>
<source>Invalid content type header </source>
Expand Down Expand Up @@ -1858,6 +1858,10 @@ Control code: %1</translation>
<source>Please include correct country code.</source>
<translation>Please include correct country code.</translation>
</message>
<message>
<source>Error: an incorrect control code was chosen</source>
<translation>Error: an incorrect control code was chosen</translation>
</message>
</context>
<context>
<name>NoCardInfo</name>
Expand Down
8 changes: 6 additions & 2 deletions client/translations/et.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1787,8 +1787,8 @@ Kontrollkood: %1</translation>
<translation>%1 teenuses esinevad tehnilised tõrked. Palun proovige mõne aja pärast uuesti.</translation>
</message>
<message>
<source>Failed to send request </source>
<translation>Päringu saatmine ebaõnnestus </translation>
<source>Failed to send request. </source>
<translation>Päringu saatmine ebaõnnestus. </translation>
</message>
<message>
<source>Invalid content type header </source>
Expand Down Expand Up @@ -1858,6 +1858,10 @@ Kontrollkood: %1</translation>
<source>Please include correct country code.</source>
<translation>Telefoninumber peab sisaldama riigikoodi.</translation>
</message>
<message>
<source>Error: an incorrect control code was chosen</source>
<translation>Viga: valiti vale kontrollkood</translation>
</message>
</context>
<context>
<name>NoCardInfo</name>
Expand Down
10 changes: 7 additions & 3 deletions client/translations/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1790,8 +1790,8 @@ Kонтрольный код: %1</translation>
<translation>Технический сбой услуги %1. Пожалуйста, попробуйте позже.</translation>
</message>
<message>
<source>Failed to send request </source>
<translation>Не удалось отправить запрос </translation>
<source>Failed to send request. </source>
<translation>Не удалось отправить запрос. </translation>
</message>
<message>
<source>Invalid content type header </source>
Expand Down Expand Up @@ -1851,7 +1851,7 @@ Kонтрольный код: %1</translation>
</message>
<message>
<source>Open the Smart-ID application on your smart device and confirm device for signing.</source>
<translation type="unfinished"></translation>
<translation>Откройте приложение Smart-ID на смарт-устройстве и подтвердите это устройство для подписывания.</translation>
</message>
<message>
<source>The limit for digital signatures per month has been reached for this IP address. &lt;a href=&quot;https://www.id.ee/index.php?id=39023&quot;&gt;Additional information&lt;/a&gt;</source>
Expand All @@ -1861,6 +1861,10 @@ Kонтрольный код: %1</translation>
<source>Please include correct country code.</source>
<translation>Номер телефона должен содержать код страны.</translation>
</message>
<message>
<source>Error: an incorrect control code was chosen</source>
<translation>Ошибка: выбран неправильный контрольный код</translation>
</message>
</context>
<context>
<name>NoCardInfo</name>
Expand Down

0 comments on commit b8c47c0

Please sign in to comment.