summaryrefslogtreecommitdiff
path: root/src/gui/buydialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-03 12:35:22 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-03 12:51:43 +0300
commita7c723b681ddefdcaa84cb9b16681c65818d7110 (patch)
tree3c7100a90db00c3eacc41977cdb5bbae99e6ca40 /src/gui/buydialog.cpp
parent04fbf07c41bf78dea11aa9b7098c80f0da3801e3 (diff)
downloadmv-a7c723b681ddefdcaa84cb9b16681c65818d7110.tar.gz
mv-a7c723b681ddefdcaa84cb9b16681c65818d7110.tar.bz2
mv-a7c723b681ddefdcaa84cb9b16681c65818d7110.tar.xz
mv-a7c723b681ddefdcaa84cb9b16681c65818d7110.zip
add comments for translators
Diffstat (limited to 'src/gui/buydialog.cpp')
-rw-r--r--src/gui/buydialog.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/gui/buydialog.cpp b/src/gui/buydialog.cpp
index 3930ae715..e19a0a8f1 100644
--- a/src/gui/buydialog.cpp
+++ b/src/gui/buydialog.cpp
@@ -51,12 +51,19 @@
static const char *SORT_NAME_BUY[7] =
{
+ // TRANSLATORS: buy dialog sort type.
N_("unsorted"),
+ // TRANSLATORS: buy dialog sort type.
N_("by price"),
+ // TRANSLATORS: buy dialog sort type.
N_("by name"),
+ // TRANSLATORS: buy dialog sort type.
N_("by id"),
+ // TRANSLATORS: buy dialog sort type.
N_("by weight"),
+ // TRANSLATORS: buy dialog sort type.
N_("by amount"),
+ // TRANSLATORS: buy dialog sort type.
N_("by type")
};
@@ -72,8 +79,7 @@ public:
virtual std::string getElementAt(int i)
{
if (i >= getNumberOfElements() || i < 0)
- return _("???");
-
+ return "???";
return gettext(SORT_NAME_BUY[i]);
}
};
@@ -183,6 +189,7 @@ class SortItemTypeFunctor final
BuyDialog::DialogList BuyDialog::instances;
BuyDialog::BuyDialog(const int npcId) :
+ // TRANSLATORS: buy dialog name
Window(_("Buy"), false, nullptr, "buy.xml"),
gcn::ActionListener(),
gcn::SelectionListener(),
@@ -194,6 +201,7 @@ BuyDialog::BuyDialog(const int npcId) :
}
BuyDialog::BuyDialog(std::string nick) :
+ // TRANSLATORS: buy dialog name
Window(_("Buy"), false, nullptr, "buy.xml"),
gcn::ActionListener(),
gcn::SelectionListener(),
@@ -226,6 +234,7 @@ void BuyDialog::init()
mQuantityLabel = new Label(this, strprintf(
"%d / %d", mAmountItems, mMaxItems));
mQuantityLabel->setAlignment(gcn::Graphics::CENTER);
+ // TRANSLATORS: buy dialog label
mMoneyLabel = new Label(this, strprintf(
_("Price: %s / Total: %s"), "", ""));
@@ -235,6 +244,7 @@ void BuyDialog::init()
mAmountField->setSendAlwaysEvents(true);
mAmountField->setEnabled(false);
+ // TRANSLATORS: buy dialog label
mAmountLabel = new Label(this, _("Amount:"));
mAmountLabel->adjustSize();
@@ -244,8 +254,11 @@ void BuyDialog::init()
// TRANSLATORS: This is a narrow symbol used to denote 'decreasing'.
// You may change this symbol if your language uses another.
mDecreaseButton = new Button(this, _("-"), "dec", this);
+ // TRANSLATORS: buy dialog button
mBuyButton = new Button(this, _("Buy"), "buy", this);
+ // TRANSLATORS: buy dialog button
mQuitButton = new Button(this, _("Quit"), "quit", this);
+ // TRANSLATORS: buy dialog button
mAddMaxButton = new Button(this, _("Max"), "max", this);
mDecreaseButton->adjustSize();
@@ -499,6 +512,7 @@ void BuyDialog::updateButtonsAndLabels()
// Update quantity and money labels
mQuantityLabel->setCaption(strprintf("%d / %d", mAmountItems, mMaxItems));
+ // TRANSLATORS: buy dialog label
mMoneyLabel->setCaption(strprintf(_("Price: %s / Total: %s"),
Units::formatCurrency(price).c_str(),
Units::formatCurrency(mMoney - price).c_str()));