From 8b0a65f00c0e5afb2c177462acd30013afa99b64 Mon Sep 17 00:00:00 2001 From: Kess Vargavind Date: Fri, 17 Jul 2009 14:31:36 +0200 Subject: 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 --- src/gui/unregisterdialog.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/gui/unregisterdialog.cpp') diff --git a/src/gui/unregisterdialog.cpp b/src/gui/unregisterdialog.cpp index 048239c5..32bc732f 100644 --- a/src/gui/unregisterdialog.cpp +++ b/src/gui/unregisterdialog.cpp @@ -102,24 +102,23 @@ UnRegisterDialog::action(const gcn::ActionEvent &event) logger->log("UnregisterDialog::unregistered, Username is %s", username.c_str()); - std::stringstream errorMsg; + std::stringstream errorMessage; bool error = false; // Check password if (password.length() < LEN_MIN_PASSWORD) { // Pass too short - errorMsg << "The password needs to be at least " - << LEN_MIN_PASSWORD - << " characters long."; + errorMessage << strprintf(_("The password needs to be at least %d " + "characters long."), LEN_MIN_PASSWORD); error = true; } - else if (password.length() > LEN_MAX_PASSWORD - 1 ) + else if (password.length() > LEN_MAX_PASSWORD - 1) { // Pass too long - errorMsg << "The password needs to be less than " - << LEN_MAX_PASSWORD - << " characters long."; + errorMessage << strprintf(_("The password needs to be less than " + "%d characters long."), + LEN_MAX_PASSWORD); error = true; } @@ -127,7 +126,7 @@ UnRegisterDialog::action(const gcn::ActionEvent &event) { mWrongDataNoticeListener->setTarget(this->mPasswordField); - OkDialog *dlg = new OkDialog("Error", errorMsg.str()); + OkDialog *dlg = new OkDialog(_("Error"), errorMessage.str()); dlg->addActionListener(mWrongDataNoticeListener); } else -- cgit v1.2.3-70-g09d2