From 77cc1fdda700c3580890856187876780e16910d7 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 3 May 2009 11:59:05 +0200 Subject: Made the new present player count translatable --- src/gui/chat.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/gui/chat.cpp') diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index e37bdf78..f7acda04 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -294,7 +294,7 @@ void ChatWindow::addTab(ChatTab *tab) logic(); } -void ChatWindow::removeWhisper(std::string nick) +void ChatWindow::removeWhisper(const std::string &nick) { mWhispers.erase(nick); } @@ -309,8 +309,8 @@ void ChatWindow::doPresent() { const Beings &beings = beingManager->getAll(); std::string response = ""; - unsigned short playercount = 0; - char cpc[25]; + int playercount = 0; + for (Beings::const_iterator bi = beings.begin(), be = beings.end(); bi != be; ++bi) { @@ -324,7 +324,9 @@ void ChatWindow::doPresent() ++playercount; } } - sprintf(cpc,"%u players are present.",playercount); + + std::string cpc = strprintf(_("%d players are present."), playercount); + if (mRecorder->isRecording()) { // Get the current system time @@ -339,7 +341,6 @@ void ChatWindow::doPresent() << (int) ((t / 60) % 60) << "] "; - mRecorder->record(timeStr.str() + _("Present: ") + response + _("; ") + cpc); getFocused()->chatLog(_("Attendance written to record log."), BY_SERVER, true); -- cgit v1.2.3-70-g09d2