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/localplayer.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/localplayer.cpp') diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 18bc77b0..970204d0 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -869,15 +869,24 @@ void LocalPlayer::pickedUp(const ItemInfo &itemInfo, int amount) } else { - // TRANSLATORS: Used as in "You picked up a ...", when picking up - // only one item. const std::string amountStr = (amount > 1) ? toString(amount) : _("a"); if (config.getValue("showpickupchat", 1)) { - localChatTab->chatLog(strprintf(_("You picked up %s [@@%d|%s@@]."), - amountStr.c_str(), itemInfo.getId(), - itemInfo.getName().c_str()), BY_SERVER); + if (amount == 1) + { + // TRANSLATORS: Used as in "You picked up a [Candy]", when + // picking up only one item. + localChatTab->chatLog(strprintf(_("You picked up a [@@%d|%s@@]."), + itemInfo.getId(), itemInfo.getName().c_str()), BY_SERVER); + } + else + { + // TRANSLATORS: Used as in "You picked up 4 [Candy]", when + // picking up more than one item. + localChatTab->chatLog(strprintf(_("You picked up %d [@@%d|%s@@]."), + amount, itemInfo.getId(), itemInfo.getName().c_str()), BY_SERVER); + } } if (mMap && config.getValue("showpickupparticle", 0)) -- cgit v1.2.3-70-g09d2