From a7c723b681ddefdcaa84cb9b16681c65818d7110 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 3 May 2013 12:35:22 +0300 Subject: add comments for translators --- src/gui/unregisterdialog.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/gui/unregisterdialog.cpp') 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); -- cgit v1.2.3-70-g09d2