summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-01-13 22:34:12 +0200
committerAndrei Karas <akaras@inbox.ru>2011-01-13 22:34:12 +0200
commit0b3368c1675e774954068de6427d0fad282a9293 (patch)
treec2d36a9a748f5007626515f790e753ef67d881c8 /src
parentac2233b42284ad96f83419971892786593879927 (diff)
downloadmv-0b3368c1675e774954068de6427d0fad282a9293.tar.gz
mv-0b3368c1675e774954068de6427d0fad282a9293.tar.bz2
mv-0b3368c1675e774954068de6427d0fad282a9293.tar.xz
mv-0b3368c1675e774954068de6427d0fad282a9293.zip
Add new strings to translations (from inventory).
Rebuild lang files. Update russian translation.
Diffstat (limited to 'src')
-rw-r--r--src/gui/inventorywindow.cpp6
-rw-r--r--src/gui/widgets/inventoryfilter.cpp9
-rw-r--r--src/gui/widgets/inventoryfilter.h2
3 files changed, 12 insertions, 5 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index dfa7ce11f..978bfcecf 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -107,9 +107,9 @@ InventoryWindow::InventoryWindow(Inventory *inventory):
for (unsigned f = 0; f < tags.size(); f ++)
mFilter->add(tags[f]);
- mSorter->add("na");
- mSorter->add("az");
- mSorter->add("id");
+ mSorter->add(_("na"), "na");
+ mSorter->add(_("az"), "az");
+ mSorter->add(_("id"), "id");
if (isMainInventory())
{
diff --git a/src/gui/widgets/inventoryfilter.cpp b/src/gui/widgets/inventoryfilter.cpp
index aa2f2a5e4..7de7457ea 100644
--- a/src/gui/widgets/inventoryfilter.cpp
+++ b/src/gui/widgets/inventoryfilter.cpp
@@ -33,10 +33,15 @@ InventoryFilter::InventoryFilter(std::string group, int height, int spacing):
void InventoryFilter::add(std::string tag)
{
- if (tag.empty())
+ add(tag, tag);
+}
+
+void InventoryFilter::add(std::string text, std::string tag)
+{
+ if (text.empty() || tag.empty())
return;
- RadioButton *radio = new RadioButton(tag, mGroup, mCount == 0);
+ RadioButton *radio = new RadioButton(text, mGroup, mCount == 0);
radio->adjustSize();
radio->setActionEventId(mActionEventId + tag);
radio->addActionListener(this);
diff --git a/src/gui/widgets/inventoryfilter.h b/src/gui/widgets/inventoryfilter.h
index 42f51c895..aa71bb419 100644
--- a/src/gui/widgets/inventoryfilter.h
+++ b/src/gui/widgets/inventoryfilter.h
@@ -40,6 +40,8 @@ class InventoryFilter : public HorizontContainer, public gcn::ActionListener
void add(std::string tag);
+ void add(std::string text, std::string tag);
+
void action(const gcn::ActionEvent &event);
private: