diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-05-03 11:59:05 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-05-03 12:03:08 +0200 |
commit | 77cc1fdda700c3580890856187876780e16910d7 (patch) | |
tree | 049bec195d1c9bb9330f3e5e43cb6f4bddbf1254 /src/gui/chat.cpp | |
parent | ec98056c4262b6a491e2467ca0accb85ed8f0788 (diff) | |
download | mana-77cc1fdda700c3580890856187876780e16910d7.tar.gz mana-77cc1fdda700c3580890856187876780e16910d7.tar.bz2 mana-77cc1fdda700c3580890856187876780e16910d7.tar.xz mana-77cc1fdda700c3580890856187876780e16910d7.zip |
Made the new present player count translatable
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r-- | src/gui/chat.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
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); |