Skip to content
Snippets Groups Projects
Commit 7cc0b250 authored by Karel Slaný's avatar Karel Slaný
Browse files

Fixed some English phrasing. Also removed a forgotten line of code.

parent 83d891d1
Branches
Tags
1 merge request!232Fixed invalid MEP credentials response
This commit is part of merge request !232. Comments created here will be created in the context of that merge request.
......@@ -295,9 +295,9 @@ QString mepErrorDescription(const QByteArray &resCode) {
QString txt = "Unspecified MEP error.";
if (resCode == MEP_ERROR_USER_NOT_EXISTS) {
txt = "Wrong login credentials. Username does not exists.";
txt = "Wrong login credentials. Username doesn't exist.";
} else if (resCode == MEP_ERROR_USER_NOT_SET) {
txt = "Wrong login credentials. Username or valid communication code was not set.";
txt = "Wrong login credentials. Username or valid communication code hasn't been set.";
}
return txt;
}
......@@ -502,6 +502,9 @@ QString Isds::Connection::errorDescription(enum ErrCode errCode)
case ERR_NO_CONNECTION:
txt = tr("Internet connection is probably not available. Check your network settings.");
break;
case ERR_BAD_REQUEST:
txt = tr("Authorization failed. Server complains about a bad request.");
break;
case ERR_REPLY:
txt = tr("Error reply.");
break;
......@@ -523,9 +526,6 @@ QString Isds::Connection::errorDescription(enum ErrCode errCode)
case ERR_UNAUTHORIZED_TOTP_SMS:
txt = tr("SMS authorization failed. SMS code couldn't be sent. Your order on premium SMS has been exhausted or cancelled.");
break;
case ERR_BAD_REQUEST:
txt = tr("Authorization failed or bad request due to malformed syntax.");
break;
case ERR_UNSPECIFIED:
default:
txt = tr("An communication error. See log for more detail.");
......
......@@ -284,7 +284,6 @@ enum Isds::Type::MepResolution waitForMepReply(Isds::Session &session,
iteration, max_mep_iteration);
timer.stop();
if (Isds::waitForMep(session, rsCode) != Isds::Type::ERR_SUCCESS) {
timer.stop();
return Isds::Type::MR_UNRECOGNISED;
}
timer.start(delay_ms);
......@@ -342,7 +341,7 @@ bool Isds::Login::loginMep(Sessions &sessions, const AcntId &acntId,
errTxt = tr("MEP login was cancelled.");
break;
case Isds::Type::MR_UNRECOGNISED:
logErrorNL("MEP login was failed for '%s'.",
logErrorNL("MEP login has failed for '%s'.",
acntId.username().toUtf8().constData());
errTxt = tr("Wrong MEP login credentials. Invalid username or communication code.");
break;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment