summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorKess Vargavind <vargavind@gmail.com>2009-08-04 12:28:32 +0200
committerKess Vargavind <vargavind@gmail.com>2009-08-04 12:28:32 +0200
commit7681c909322c65356bac25a334c16650dddde687 (patch)
tree45cb7ac6cb6983f85c6f00e42b20ef56b1830b86 /src/localplayer.cpp
parent8fde3eb9fd6b7635eb00c1c2f165f445a16353bc (diff)
downloadmana-client-7681c909322c65356bac25a334c16650dddde687.tar.gz
mana-client-7681c909322c65356bac25a334c16650dddde687.tar.bz2
mana-client-7681c909322c65356bac25a334c16650dddde687.tar.xz
mana-client-7681c909322c65356bac25a334c16650dddde687.zip
Gettext plural support, step one
Step two (updating the headers in all po files) should preferably wait till importing from Launchpad and updating the po files.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 18510f49..57dc8981 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -918,24 +918,14 @@ void LocalPlayer::pickedUp(const ItemInfo &itemInfo, int amount)
}
else
{
- const std::string amountStr = (amount > 1) ? toString(amount) : _("a");
-
if (config.getValue("showpickupchat", 1))
{
- 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);
- }
+ // TRANSLATORS: This sentence may be translated differently
+ // for different grammatical numbers (singular, plural, ...)
+ localChatTab->chatLog(strprintf(ngettext("You picked up %d "
+ "[@@%d|%s@@].", "You picked up %d [@@%d|%s@@].", amount),
+ amount, itemInfo.getId(), itemInfo.getName().c_str()),
+ BY_SERVER);
}
if (mMap && config.getValue("showpickupparticle", 0))