diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-05-07 00:55:38 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-05-07 00:56:54 +0200 |
commit | 504222b812b41d37b5a1b28393f66fd292bf9f87 (patch) | |
tree | d97679d8052f6914c95cc36705bab5820d8d872c /src/net/tmwserv/loginhandler.cpp | |
parent | 574ef501d32c7735d2aed022f2a3761d053bbe7c (diff) | |
download | mana-504222b812b41d37b5a1b28393f66fd292bf9f87.tar.gz mana-504222b812b41d37b5a1b28393f66fd292bf9f87.tar.bz2 mana-504222b812b41d37b5a1b28393f66fd292bf9f87.tar.xz mana-504222b812b41d37b5a1b28393f66fd292bf9f87.zip |
Made error strings in tmwserv login handler translatable
Diffstat (limited to 'src/net/tmwserv/loginhandler.cpp')
-rw-r--r-- | src/net/tmwserv/loginhandler.cpp | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/src/net/tmwserv/loginhandler.cpp b/src/net/tmwserv/loginhandler.cpp index c8db624c..40842658 100644 --- a/src/net/tmwserv/loginhandler.cpp +++ b/src/net/tmwserv/loginhandler.cpp @@ -32,6 +32,8 @@ #include "logindata.h" #include "main.h" +#include "utils/gettext.h" + Net::LoginHandler *loginHandler; extern Net::Connection *accountServerConnection; @@ -75,16 +77,16 @@ void LoginHandler::handleMessage(MessageIn &msg) { switch (errMsg) { case ERRMSG_INVALID_ARGUMENT: - errorMessage = "Wrong magic_token"; + errorMessage = _("Wrong magic_token"); break; case ERRMSG_FAILURE: - errorMessage = "Already logged in"; + errorMessage = _("Already logged in"); break; case LOGIN_SERVER_FULL: - errorMessage = "Server is full"; + errorMessage = _("Server is full"); break; default: - errorMessage = "Unknown error"; + errorMessage = _("Unknown error"); break; } state = STATE_ERROR; @@ -105,16 +107,16 @@ void LoginHandler::handleMessage(MessageIn &msg) { switch (errMsg) { case ERRMSG_INVALID_ARGUMENT: - errorMessage = "New password incorrect"; + errorMessage = _("New password incorrect"); break; case ERRMSG_FAILURE: - errorMessage = "Old password incorrect"; + errorMessage = _("Old password incorrect"); break; case ERRMSG_NO_LOGIN: - errorMessage = "Account not connected. Please login first."; + errorMessage = _("Account not connected. Please login first."); break; default: - errorMessage = "Unknown error"; + errorMessage = _("Unknown error"); break; } state = STATE_ACCOUNTCHANGE_ERROR; @@ -135,19 +137,19 @@ void LoginHandler::handleMessage(MessageIn &msg) { switch (errMsg) { case ERRMSG_INVALID_ARGUMENT: - errorMessage = "New email address incorrect"; + errorMessage = _("New email address incorrect"); break; case ERRMSG_FAILURE: - errorMessage = "Old email address incorrect"; + errorMessage = _("Old email address incorrect"); break; case ERRMSG_NO_LOGIN: - errorMessage = "Account not connected. Please login first."; + errorMessage = _("Account not connected. Please login first."); break; case ERRMSG_EMAIL_ALREADY_EXISTS: - errorMessage = "The new Email Address already exists."; + errorMessage = _("The new Email Address already exists."); break; default: - errorMessage = "Unknown error"; + errorMessage = _("Unknown error"); break; } state = STATE_ACCOUNTCHANGE_ERROR; @@ -171,19 +173,19 @@ void LoginHandler::handleLoginResponse(MessageIn &msg) { switch (errMsg) { case LOGIN_INVALID_VERSION: - errorMessage = "Client version is too old"; + errorMessage = _("Client version is too old"); break; case ERRMSG_INVALID_ARGUMENT: - errorMessage = "Wrong username or password"; + errorMessage = _("Wrong username or password"); break; case ERRMSG_FAILURE: - errorMessage = "Already logged in"; + errorMessage = _("Already logged in"); break; case LOGIN_SERVER_FULL: - errorMessage = "Server is full"; + errorMessage = _("Server is full"); break; default: - errorMessage = "Unknown error"; + errorMessage = _("Unknown error"); break; } state = STATE_LOGIN_ERROR; @@ -203,19 +205,19 @@ void LoginHandler::handleRegisterResponse(MessageIn &msg) { switch (errMsg) { case REGISTER_INVALID_VERSION: - errorMessage = "Client version is too old"; + errorMessage = _("Client version is too old"); break; case ERRMSG_INVALID_ARGUMENT: - errorMessage = "Wrong username, password or email address"; + errorMessage = _("Wrong username, password or email address"); break; case REGISTER_EXISTS_USERNAME: - errorMessage = "Username already exists"; + errorMessage = _("Username already exists"); break; case REGISTER_EXISTS_EMAIL: - errorMessage = "Email address already exists"; + errorMessage = _("Email address already exists"); break; default: - errorMessage = "Unknown error"; + errorMessage = _("Unknown error"); break; } state = STATE_LOGIN_ERROR; |