From 25b140643566c251d89cc83261b90171b768abbe Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 2 Mar 2015 12:14:21 +0300 Subject: Translate item name in links if item name was added by client. --- src/gui/widgets/browserbox.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/gui/widgets/browserbox.cpp') 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)); -- cgit v1.2.3-60-g2f50