summaryrefslogtreecommitdiff
path: root/src/gui/unregisterdialog.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/unregisterdialog.cpp
parent04fbf07c41bf78dea11aa9b7098c80f0da3801e3 (diff)
downloadmv-a7c723b681ddefdcaa84cb9b16681c65818d7110.tar.gz
mv-a7c723b681ddefdcaa84cb9b16681c65818d7110.tar.bz2
mv-a7c723b681ddefdcaa84cb9b16681c65818d7110.tar.xz
mv-a7c723b681ddefdcaa84cb9b16681c65818d7110.zip
add comments for translators
Diffstat (limited to 'src/gui/unregisterdialog.cpp')
-rw-r--r--src/gui/unregisterdialog.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gui/unregisterdialog.cpp b/src/gui/unregisterdialog.cpp
index 49db5175c..eabf13633 100644
--- a/src/gui/unregisterdialog.cpp
+++ b/src/gui/unregisterdialog.cpp
@@ -43,17 +43,22 @@
#include "debug.h"
-UnRegisterDialog::UnRegisterDialog(LoginData *const data):
+UnRegisterDialog::UnRegisterDialog(LoginData *const data) :
+ // TRANSLATORS: unregister dialog name
Window(_("Unregister"), true, nullptr, "unregister.xml"),
gcn::ActionListener(),
mLoginData(data),
mPasswordField(new PasswordField(this, mLoginData->password)),
+ // TRANSLATORS: unregister dialog. button.
mUnRegisterButton(new Button(this, _("Unregister"), "unregister", this)),
+ // TRANSLATORS: unregister dialog. button.
mCancelButton(new Button(this, _("Cancel"), "cancel", this)),
mWrongDataNoticeListener(new WrongDataNoticeListener)
{
+ // TRANSLATORS: unregister dialog. label.
Label *const userLabel = new Label(this, strprintf(_("Name: %s"),
mLoginData->username.c_str()));
+ // TRANSLATORS: unregister dialog. label.
Label *const passwordLabel = new Label(this, _("Password:"));
const int width = 210;
@@ -115,17 +120,16 @@ void UnRegisterDialog::action(const gcn::ActionEvent &event)
const unsigned int max = Net::getLoginHandler()
->getMaxPasswordLength();
- // Check password
if (password.length() < min)
{
- // Pass too short
+ // TRANSLATORS: unregister dialog. error message.
errorMsg << strprintf(_("The password needs to be at least %u "
"characters long."), min);
error = true;
}
else if (password.length() > max - 1)
{
- // Pass too long
+ // TRANSLATORS: unregister dialog. error message.
errorMsg << strprintf(_("The password needs to be less than "
"%u characters long."), max);
error = true;
@@ -135,6 +139,7 @@ void UnRegisterDialog::action(const gcn::ActionEvent &event)
{
mWrongDataNoticeListener->setTarget(this->mPasswordField);
+ // TRANSLATORS: unregister dialog. error message.
OkDialog *const dlg = new OkDialog(_("Error"),
errorMsg.str(), DIALOG_ERROR);
dlg->addActionListener(mWrongDataNoticeListener);