summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-01 00:34:52 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-01 00:34:52 +0300
commitdb50e5f3c0d7a0ce5d3ae99af9d874cbe2e5caeb (patch)
tree6945c6451e430b9b729eb35c5aa131d023aefb15
parentf9d1ff9ee5239b1afae3eab7a306bc4ad3ec3331 (diff)
downloadmv-db50e5f3c0d7a0ce5d3ae99af9d874cbe2e5caeb.tar.gz
mv-db50e5f3c0d7a0ce5d3ae99af9d874cbe2e5caeb.tar.bz2
mv-db50e5f3c0d7a0ce5d3ae99af9d874cbe2e5caeb.tar.xz
mv-db50e5f3c0d7a0ce5d3ae99af9d874cbe2e5caeb.zip
Fix use menu item translation for unusable items.
-rw-r--r--src/resources/db/itemdb.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp
index da8072980..1b4296ad6 100644
--- a/src/resources/db/itemdb.cpp
+++ b/src/resources/db/itemdb.cpp
@@ -147,7 +147,11 @@ static std::string useButtonFromItemType(const ItemType::Type &type)
{
const ItemTypeMap &item = itemTypeMap[f];
if (item.type == type)
+ {
+ if (item.useButton.empty())
+ return std::string();
return gettext(item.useButton.c_str());
+ }
}
logger->log("Unknown item type");
return std::string();
@@ -160,7 +164,11 @@ static std::string useButton2FromItemType(const ItemType::Type &type)
{
const ItemTypeMap &item = itemTypeMap[f];
if (item.type == type)
+ {
+ if (item.useButton2.empty())
+ return std::string();
return gettext(item.useButton2.c_str());
+ }
}
logger->log("Unknown item type");
return std::string();