diff options
author | Ira Rice <irarice@gmail.com> | 2009-02-05 14:19:44 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-05 14:19:44 -0700 |
commit | f001a53b494e8b357eba6f7c0cad9afe3258dda8 (patch) | |
tree | df9022247ff6a3a26d01c66c0389a9c386b636c2 /src/net/inventoryhandler.cpp | |
parent | 69d6f5fce3ee7ac1888c537e8e222431f8fc45da (diff) | |
download | mana-f001a53b494e8b357eba6f7c0cad9afe3258dda8.tar.gz mana-f001a53b494e8b357eba6f7c0cad9afe3258dda8.tar.bz2 mana-f001a53b494e8b357eba6f7c0cad9afe3258dda8.tar.xz mana-f001a53b494e8b357eba6f7c0cad9afe3258dda8.zip |
Exposed some more strings I found to be translatable.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/net/inventoryhandler.cpp')
-rw-r--r-- | src/net/inventoryhandler.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/net/inventoryhandler.cpp b/src/net/inventoryhandler.cpp index 3ce0899a..46f03e28 100644 --- a/src/net/inventoryhandler.cpp +++ b/src/net/inventoryhandler.cpp @@ -35,6 +35,8 @@ #include "../resources/iteminfo.h" +#include "../utils/gettext.h" +#include "../utils/strprintf.h" #include "../utils/tostring.h" InventoryHandler::InventoryHandler() @@ -139,13 +141,13 @@ void InventoryHandler::handleMessage(MessageIn *msg) itemType = msg->readInt8(); if (msg->readInt8() > 0) { - chatWindow->chatLog("Unable to pick up item", BY_SERVER); + chatWindow->chatLog(_("Unable to pick up item"), BY_SERVER); } else { const ItemInfo &itemInfo = ItemDB::get(itemId); const std::string amountStr = (amount > 1) ? toString(amount) : "a"; - chatWindow->chatLog("You picked up " + amountStr + " " + - itemInfo.getName(), BY_SERVER); + chatWindow->chatLog(strprintf(_("You picked up %s %s"), + amountStr.c_str(), itemInfo.getName().c_str()), BY_SERVER); if (Item *item = inventory->getItem(index)) { item->setId(itemId); @@ -182,7 +184,7 @@ void InventoryHandler::handleMessage(MessageIn *msg) amount = msg->readInt16(); if (msg->readInt8() == 0) { - chatWindow->chatLog("Failed to use item", BY_SERVER); + chatWindow->chatLog(_("Failed to use item"), BY_SERVER); } else { if (Item *item = inventory->getItem(index)) item->setQuantity(amount); |