summaryrefslogtreecommitdiff
path: root/src/gui/changepassworddialog.cpp
diff options
context:
space:
mode:
authorKess Vargavind <vargavind@gmail.com>2009-07-17 14:31:36 +0200
committerKess Vargavind <vargavind@gmail.com>2009-07-17 15:21:53 +0200
commit8b0a65f00c0e5afb2c177462acd30013afa99b64 (patch)
treee34427ff57870c0e96065ccdacd296e9dddd445a /src/gui/changepassworddialog.cpp
parent18aaa873abcaa617bbd296f73138d062423662b8 (diff)
downloadmana-client-8b0a65f00c0e5afb2c177462acd30013afa99b64.tar.gz
mana-client-8b0a65f00c0e5afb2c177462acd30013afa99b64.tar.bz2
mana-client-8b0a65f00c0e5afb2c177462acd30013afa99b64.tar.xz
mana-client-8b0a65f00c0e5afb2c177462acd30013afa99b64.zip
Various gettext fixes
* Merged a few split strings * Fixed some spellings and wordings * Turned a couple of std::cout and std::cerr into logger messages
Diffstat (limited to 'src/gui/changepassworddialog.cpp')
-rw-r--r--src/gui/changepassworddialog.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/gui/changepassworddialog.cpp b/src/gui/changepassworddialog.cpp
index 4be92b15..9d66d13a 100644
--- a/src/gui/changepassworddialog.cpp
+++ b/src/gui/changepassworddialog.cpp
@@ -96,36 +96,35 @@ void ChangePasswordDialog::action(const gcn::ActionEvent &event)
logger->log("ChangePasswordDialog::Password change, Username is %s",
username.c_str());
- std::stringstream errorMsg;
+ std::stringstream errorMessage;
int error = 0;
// Check old Password
if (oldPassword.empty())
{
// No old password
- errorMsg << "Enter the old Password first.";
+ errorMessage << _("Enter the old password first.");
error = 1;
}
else if (newFirstPass.length() < LEN_MIN_PASSWORD)
{
// First password too short
- errorMsg << "The new password needs to be at least "
- << LEN_MIN_PASSWORD
- << " characters long.";
+ errorMessage << strprintf(_("The new password needs to be at least "
+ "%d characters long."), LEN_MIN_PASSWORD);
error = 2;
}
else if (newFirstPass.length() > LEN_MAX_PASSWORD - 1 )
{
// First password too long
- errorMsg << "The new password needs to be less than "
- << LEN_MAX_PASSWORD
- << " characters long.";
+ errorMessage << strprintf(_("The new password needs to be less "
+ "than %d characters long."),
+ LEN_MAX_PASSWORD);
error = 2;
}
else if (newFirstPass != newSecondPass)
{
// Second Pass mismatch
- errorMsg << "The new password entries mismatch.";
+ errorMessage << _("The new password entries mismatch.");
error = 3;
}
@@ -144,7 +143,7 @@ void ChangePasswordDialog::action(const gcn::ActionEvent &event)
mWrongDataNoticeListener->setTarget(this->mSecondPassField);
}
- OkDialog *dlg = new OkDialog("Error", errorMsg.str());
+ OkDialog *dlg = new OkDialog(_("Error"), errorMessage.str());
dlg->addActionListener(mWrongDataNoticeListener);
}
else