summaryrefslogtreecommitdiff
path: root/src/gui/widgets/browserbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-02 12:14:21 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-02 12:14:21 +0300
commit25b140643566c251d89cc83261b90171b768abbe (patch)
tree320a82b4885b4290c4d2dc04f132635db80b6407 /src/gui/widgets/browserbox.cpp
parent7d85a497741c422c711b04a8df2995c7bf2d2aa6 (diff)
downloadmanaplus-25b140643566c251d89cc83261b90171b768abbe.tar.gz
manaplus-25b140643566c251d89cc83261b90171b768abbe.tar.bz2
manaplus-25b140643566c251d89cc83261b90171b768abbe.tar.xz
manaplus-25b140643566c251d89cc83261b90171b768abbe.zip
Translate item name in links if item name was added by client.
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r--src/gui/widgets/browserbox.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 647013889..37abf7d0a 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -43,6 +43,7 @@
#include "utils/stringutils.h"
#include "utils/timer.h"
+#include "utils/translation/podict.h"
#include "gui/cliprect.h"
@@ -250,9 +251,14 @@ void BrowserBox::addRow(const std::string &row, const bool atTop)
{
const int id = atoi(bLink.link.c_str());
if (id)
- bLink.caption = ItemDB::get(id).getName();
+ {
+ bLink.caption = translator->getStr(
+ ItemDB::get(id).getName());
+ }
else
- bLink.caption = bLink.link;
+ {
+ bLink.caption = translator->getStr(bLink.link);
+ }
}
newRow.append(tmp.substr(0, idx1));