From bfd1d1bcc2a6ecd7efe301bfbf22a1e9b9188706 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Tue, 6 Jan 2009 13:52:30 +0100 Subject: Added support for internationalization Merged from the mainline client. Originally implemented by Guillaume Melquiond, starting with commit 1828eee6a6d91fd385ad1e69d93044516493aa91. --- src/gui/login.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/gui/login.cpp') diff --git a/src/gui/login.cpp b/src/gui/login.cpp index 06a5f9f0..5a748b52 100644 --- a/src/gui/login.cpp +++ b/src/gui/login.cpp @@ -34,21 +34,23 @@ #include "passwordfield.h" #include "textfield.h" +#include "../utils/gettext.h" + LoginDialog::LoginDialog(LoginData *loginData): - Window("Login"), mLoginData(loginData) + Window(_("Login")), mLoginData(loginData) { - gcn::Label *userLabel = new gcn::Label("Name:"); - gcn::Label *passLabel = new gcn::Label("Password:"); - gcn::Label *serverLabel = new gcn::Label("Server:"); + gcn::Label *userLabel = new gcn::Label(_("Name:")); + gcn::Label *passLabel = new gcn::Label(_("Password:")); + gcn::Label *serverLabel = new gcn::Label(_("Server:")); mUserField = new TextField(mLoginData->username); mPassField = new PasswordField(mLoginData->password); mServerField = new TextField(mLoginData->hostname); - mKeepCheck = new CheckBox("Keep", mLoginData->remember); - mOkButton = new Button("OK", "ok", this); - mCancelButton = new Button("Cancel", "cancel", this); - mRegisterButton = new Button("Register", "register", this); + mKeepCheck = new CheckBox(_("Remember Username"), mLoginData->remember); + mOkButton = new Button(_("Ok"), "ok", this); + mCancelButton = new Button(_("Cancel"), "cancel", this); + mRegisterButton = new Button(_("Register"), "register", this); - const int width = 220; + const int width = 250; const int height = 100; setContentSize(width, height); -- cgit v1.2.3-70-g09d2