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 | |
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')
-rw-r--r-- | src/gui/chat.cpp | 11 | ||||
-rw-r--r-- | src/gui/chat.h | 2 |
2 files changed, 7 insertions, 6 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); diff --git a/src/gui/chat.h b/src/gui/chat.h index 88dabb89..e4865ed8 100644 --- a/src/gui/chat.h +++ b/src/gui/chat.h @@ -186,7 +186,7 @@ class ChatWindow : public Window, /** Add the tab to the window */ void addTab(ChatTab *tab); - void removeWhisper(std::string nick); + void removeWhisper(const std::string &nick); void adjustTabSize(); |