From f001a53b494e8b357eba6f7c0cad9afe3258dda8 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Thu, 5 Feb 2009 14:19:44 -0700 Subject: Exposed some more strings I found to be translatable. Signed-off-by: Ira Rice --- src/net/inventoryhandler.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/net/inventoryhandler.cpp') 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); -- cgit v1.2.3-70-g09d2