From 384fe7067ec6628ff4e09bc8f75cc3a4a69a1d29 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Mon, 29 May 2017 19:09:12 +0300 Subject: Set up translations --- src/MatrixClient.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/MatrixClient.cc') diff --git a/src/MatrixClient.cc b/src/MatrixClient.cc index 23cbbb5e..a605623f 100644 --- a/src/MatrixClient.cc +++ b/src/MatrixClient.cc @@ -72,18 +72,18 @@ void MatrixClient::onLoginResponse(QNetworkReply *reply) int status_code = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); if (status_code == 403) { - emit loginError("Wrong username or password"); + emit loginError(tr("Wrong username or password")); return; } if (status_code == 404) { - emit loginError("Login endpoint was not found on the server"); + emit loginError(tr("Login endpoint was not found on the server")); return; } if (status_code >= 400) { qWarning() << "Login error: " << reply->errorString(); - emit loginError("An unknown error occured. Please try again."); + emit loginError(tr("An unknown error occured. Please try again.")); return; } @@ -97,7 +97,7 @@ void MatrixClient::onLoginResponse(QNetworkReply *reply) emit loginSuccess(response.getUserId(), server_.host(), response.getAccessToken()); } catch (DeserializationException &e) { qWarning() << "Malformed JSON response" << e.what(); - emit loginError("Malformed response. Possibly not a Matrix server"); + emit loginError(tr("Malformed response. Possibly not a Matrix server")); } } -- cgit 1.5.1