summaryrefslogtreecommitdiff
path: root/src/gui/logindialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-03 12:35:22 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-03 12:51:43 +0300
commita7c723b681ddefdcaa84cb9b16681c65818d7110 (patch)
tree3c7100a90db00c3eacc41977cdb5bbae99e6ca40 /src/gui/logindialog.cpp
parent04fbf07c41bf78dea11aa9b7098c80f0da3801e3 (diff)
downloadmanaverse-a7c723b681ddefdcaa84cb9b16681c65818d7110.tar.gz
manaverse-a7c723b681ddefdcaa84cb9b16681c65818d7110.tar.bz2
manaverse-a7c723b681ddefdcaa84cb9b16681c65818d7110.tar.xz
manaverse-a7c723b681ddefdcaa84cb9b16681c65818d7110.zip
add comments for translators
Diffstat (limited to 'src/gui/logindialog.cpp')
-rw-r--r--src/gui/logindialog.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/gui/logindialog.cpp b/src/gui/logindialog.cpp
index baecf5f27..61a31af61 100644
--- a/src/gui/logindialog.cpp
+++ b/src/gui/logindialog.cpp
@@ -72,8 +72,11 @@ struct OpenUrlListener : public gcn::ActionListener
const char *UPDATE_TYPE_TEXT[3] =
{
+ // TRANSLATORS: update type
N_("Normal"),
+ // TRANSLATORS: update type
N_("Auto Close"),
+ // TRANSLATORS: update type
N_("Skip"),
};
@@ -96,8 +99,7 @@ class UpdateTypeModel final : public gcn::ListModel
virtual std::string getElementAt(int i)
{
if (i >= getNumberOfElements() || i < 0)
- return _("???");
-
+ return "???";
return gettext(UPDATE_TYPE_TEXT[i]);
}
};
@@ -126,31 +128,38 @@ class UpdateListModel final : public gcn::ListModel
virtual std::string getElementAt(int i)
{
if (!mLoginData || i >= getNumberOfElements() || i < 0)
- return _("???");
-
+ return "???";
return mLoginData->updateHosts[i];
}
+
protected:
LoginData *mLoginData;
};
LoginDialog::LoginDialog(LoginData *const data, std::string serverName,
std::string *const updateHost):
+ // TRANSLATORS: login dialog name
Window(_("Login"), false, nullptr, "login.xml"),
gcn::ActionListener(),
gcn::KeyListener(),
mLoginData(data),
mUserField(new TextField(this, mLoginData->username)),
mPassField(new PasswordField(this, mLoginData->password)),
+ // TRANSLATORS: login dialog label
mKeepCheck(new CheckBox(this, _("Remember username"),
mLoginData->remember)),
+ // TRANSLATORS: login dialog label
mUpdateTypeLabel(new Label(this, _("Update:"))),
mUpdateHostLabel(nullptr),
mUpdateTypeModel(new UpdateTypeModel),
mUpdateTypeDropDown(new DropDown(this, mUpdateTypeModel)),
+ // TRANSLATORS: login dialog button
mServerButton(new Button(this, _("Change Server"), "server", this)),
+ // TRANSLATORS: login dialog button
mLoginButton(new Button(this, _("Login"), "login", this)),
+ // TRANSLATORS: login dialog button
mRegisterButton(new Button(this, _("Register"), "register", this)),
+ // TRANSLATORS: login dialog checkbox
mCustomUpdateHost(new CheckBox(this, _("Custom update host"),
mLoginData->updateType & LoginData::Upd_Custom, this, "customhost")),
mUpdateHostText(new TextField(this, serverConfig.getValue(
@@ -164,13 +173,17 @@ LoginDialog::LoginDialog(LoginData *const data, std::string serverName,
Net::getCharServerHandler()->clear();
+ // TRANSLATORS: login dialog label
Label *const serverLabel1 = new Label(this, _("Server:"));
Label *const serverLabel2 = new Label(this, serverName);
serverLabel2->adjustSize();
+ // TRANSLATORS: login dialog label
Label *const userLabel = new Label(this, _("Name:"));
+ // TRANSLATORS: login dialog label
Label *const passLabel = new Label(this, _("Password:"));
if (mLoginData && mLoginData->updateHosts.size() > 1)
{
+ // TRANSLATORS: login dialog label
mUpdateHostLabel = new Label(this, strprintf(_("Update host: %s"),
mLoginData->updateHost.c_str()));
mUpdateListModel = new UpdateListModel(mLoginData);
@@ -280,6 +293,7 @@ void LoginDialog::action(const gcn::ActionEvent &event)
{
const std::string &url = mLoginData->registerUrl;
urlListener.url = url;
+ // TRANSLATORS: question dialog
ConfirmDialog *const confirmDlg = new ConfirmDialog(
_("Open register url"), url, false, true);
confirmDlg->addActionListener(&urlListener);