Browse Source

Some english fixes in followup to #2825

pull/2785/merge
tux3 10 years ago
parent
commit
12763ab54e
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
  1. 12
      src/net/toxme.cpp
  2. 2
      src/net/toxme.h

12
src/net/toxme.cpp

@ -193,14 +193,14 @@ Toxme::ExecCode Toxme::extractError(QString json)
{ {
end = json.indexOf("}"); end = json.indexOf("}");
if (end == -1) if (end == -1)
return IncorrectResponce; return IncorrectResponse;
} }
json.truncate(end); json.truncate(end);
bool ok; bool ok;
int r = json.toInt(&ok); int r = json.toInt(&ok);
if (!ok) if (!ok)
return IncorrectResponce; return IncorrectResponse;
return ExecCode(r); return ExecCode(r);
} }
@ -264,7 +264,7 @@ QString Toxme::getPass(QString json, ExecCode &code) {
int end = json.indexOf("\""); int end = json.indexOf("\"");
if (end == -1) if (end == -1)
{ {
code = IncorrectResponce; code = IncorrectResponse;
return QString(); return QString();
} }
@ -293,8 +293,8 @@ int Toxme::deleteAddress(QString server, ToxId id)
QString Toxme::getErrorMessage(int errorCode) QString Toxme::getErrorMessage(int errorCode)
{ {
switch (errorCode) { switch (errorCode) {
case IncorrectResponce: case IncorrectResponse:
return QObject::tr("Incorrect responce"); return QObject::tr("Incorrect response");
case NoPassword: case NoPassword:
return QObject::tr("No password in response"); return QObject::tr("No password in response");
case ServerError: case ServerError:
@ -322,7 +322,7 @@ QString Toxme::getErrorMessage(int errorCode)
case -31: case -31:
return QObject::tr("Tox ID not sent"); return QObject::tr("Tox ID not sent");
case -41: case -41:
return QObject::tr("Lookup failed because the other server replied with invalid data"); return QObject::tr("Lookup failed because the server replied with invalid data");
case -42: case -42:
return QObject::tr("That user does not exist"); return QObject::tr("That user does not exist");
case -43: case -43:

2
src/net/toxme.h

@ -41,7 +41,7 @@ public:
Registered = 0, Registered = 0,
Updated = 1, Updated = 1,
ServerError = 2, ServerError = 2,
IncorrectResponce = 3, IncorrectResponse = 3,
NoPassword = 4 NoPassword = 4
}; };

Loading…
Cancel
Save