diff options
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r-- | src/gui/popupmenu.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index f308bbfd..9b1ce409 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -42,6 +42,9 @@ #include "../resources/iteminfo.h" #include "../resources/itemdb.h" +#include "../utils/gettext.h" +#include "../utils/strprintf.h" + extern std::string tradePartnerName; PopupMenu::PopupMenu(): @@ -74,9 +77,9 @@ void PopupMenu::showPopup(int x, int y, Being *being) // Players can be traded with. Later also attack, follow and // add as buddy will be options in this menu. const std::string &name = mBeing->getName(); - mBrowserBox->addRow("@@trade|Trade With " + name + "@@"); + mBrowserBox->addRow(strprintf(_("@@trade|Trade With %s@@"), name.c_str())); - mBrowserBox->addRow("@@attack|Attack " + name + "@@"); + mBrowserBox->addRow(strprintf(_("@@attack|Attack %s@@"), name.c_str())); //mBrowserBox->addRow("@@follow|Follow " + name + "@@"); //mBrowserBox->addRow("@@buddy|Add " + name + " to Buddy List@@"); } @@ -85,7 +88,7 @@ void PopupMenu::showPopup(int x, int y, Being *being) case Being::NPC: // NPCs can be talked to (single option, candidate for removal // unless more options would be added) - mBrowserBox->addRow("@@talk|Talk To NPC@@"); + mBrowserBox->addRow(_("@@talk|Talk To NPC@@")); break; default: @@ -95,7 +98,7 @@ void PopupMenu::showPopup(int x, int y, Being *being) //browserBox->addRow("@@look|Look To@@"); mBrowserBox->addRow("##3---"); - mBrowserBox->addRow("@@cancel|Cancel@@"); + mBrowserBox->addRow(_("@@cancel|Cancel@@")); showPopup(x, y); } @@ -107,11 +110,11 @@ void PopupMenu::showPopup(int x, int y, FloorItem *floorItem) // Floor item can be picked up (single option, candidate for removal) std::string name = ItemDB::get(mFloorItem->getItemId()).getName(); - mBrowserBox->addRow("@@pickup|Pick Up " + name + "@@"); + mBrowserBox->addRow(strprintf(_("@@pickup|Pick Up %s@@"), name.c_str())); //browserBox->addRow("@@look|Look To@@"); mBrowserBox->addRow("##3---"); - mBrowserBox->addRow("@@cancel|Cancel@@"); + mBrowserBox->addRow(_("@@cancel|Cancel@@")); showPopup(x, y); } @@ -214,15 +217,15 @@ void PopupMenu::showPopup(int x, int y, Item *item) if (item->isEquipment()) { - mBrowserBox->addRow("@@use|Equip@@"); + mBrowserBox->addRow(_("@@use|Equip@@")); } else - mBrowserBox->addRow("@@use|Use@@"); + mBrowserBox->addRow(_("@@use|Use@@")); - mBrowserBox->addRow("@@drop|Drop@@"); - mBrowserBox->addRow("@@description|Description@@"); + mBrowserBox->addRow(_("@@drop|Drop@@")); + mBrowserBox->addRow(_("@@description|Description@@")); mBrowserBox->addRow("##3---"); - mBrowserBox->addRow("@@cancel|Cancel@@"); + mBrowserBox->addRow(_("@@cancel|Cancel@@")); showPopup(x, y); } |