summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-04 15:44:31 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-04 16:24:42 +0300
commitbc2c095db69be01837d07af1151b0f0a3061713f (patch)
tree98009b4483d873f45f7b4f2897a4a7ba5118d39e /src/gui/windows
parent9b5b48739b62fca4bb30cd04be1031ac3f80095d (diff)
downloadmanaplus-bc2c095db69be01837d07af1151b0f0a3061713f.tar.gz
manaplus-bc2c095db69be01837d07af1151b0f0a3061713f.tar.bz2
manaplus-bc2c095db69be01837d07af1151b0f0a3061713f.tar.xz
manaplus-bc2c095db69be01837d07af1151b0f0a3061713f.zip
Add missing TRANSLATORS comments to translation strings.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/bankwindow.cpp3
-rw-r--r--src/gui/windows/buydialog.cpp2
-rw-r--r--src/gui/windows/charselectdialog.cpp9
-rw-r--r--src/gui/windows/chatwindow.cpp5
-rw-r--r--src/gui/windows/editserverdialog.cpp2
-rw-r--r--src/gui/windows/equipmentwindow.cpp1
-rw-r--r--src/gui/windows/inventorywindow.cpp2
-rw-r--r--src/gui/windows/mailviewwindow.cpp18
-rw-r--r--src/gui/windows/ministatuswindow.cpp4
-rw-r--r--src/gui/windows/quitdialog.cpp1
-rw-r--r--src/gui/windows/shopwindow.cpp53
-rw-r--r--src/gui/windows/skilldialog.cpp5
-rw-r--r--src/gui/windows/socialwindow.cpp3
-rw-r--r--src/gui/windows/updaterwindow.cpp1
14 files changed, 87 insertions, 22 deletions
diff --git a/src/gui/windows/bankwindow.cpp b/src/gui/windows/bankwindow.cpp
index e13fdc399..5f93dc2d8 100644
--- a/src/gui/windows/bankwindow.cpp
+++ b/src/gui/windows/bankwindow.cpp
@@ -43,8 +43,8 @@ BankWindow::BankWindow() :
Window(_("Bank"), Modal_false, nullptr, "bank.xml"),
ActionListener(),
BankListener(),
- // TRANSLATORS: bank window money label
mBankMoneyLabel(new Label(this, strprintf(
+ // TRANSLATORS: bank window money label
_("Money in bank: %s"), " "))),
mInputMoneyTextField(new IntTextField(this, 0, 0, 2147483647)),
// TRANSLATORS: bank window button
@@ -87,6 +87,7 @@ void BankWindow::widgetShown(const Event &event)
void BankWindow::bankMoneyChanged(const int money)
{
+ // TRANSLATORS: bank window money label
mBankMoneyLabel->setCaption(strprintf(_("Money in bank: %s"),
Units::formatCurrency(money).c_str()));
}
diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp
index 2e143dbcc..644e8c5ce 100644
--- a/src/gui/windows/buydialog.cpp
+++ b/src/gui/windows/buydialog.cpp
@@ -260,8 +260,8 @@ void BuyDialog::init()
mQuantityLabel = new Label(this, strprintf(
"%d / %d", mAmountItems, mMaxItems));
mQuantityLabel->setAlignment(Graphics::CENTER);
- // TRANSLATORS: buy dialog label
mMoneyLabel = new Label(this, strprintf(
+ // TRANSLATORS: buy dialog label
_("Price: %s / Total: %s"), "", ""));
mAmountField = new IntTextField(this, 1, 1, 123);
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 21c84cdb4..ac5f3b291 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -102,7 +102,11 @@ CharSelectDialog::CharSelectDialog(LoginData &data) :
n ++;
if (serverFeatures->haveCharRename())
{
- mRenameButton = new Button(this, _("Rename"), "rename", this);
+ mRenameButton = new Button(this,
+ // TRANSLATORS: character rename button
+ _("Rename"),
+ "rename",
+ this);
placer(n, 0, mRenameButton);
n ++;
}
@@ -296,8 +300,9 @@ void CharSelectDialog::action(const ActionEvent &event)
else
{
CREATEWIDGET(OkDialog,
- // TRANSLATORS: error message
+ // TRANSLATORS: error header
_("Error"),
+ // TRANSLATORS: error message
_("Incorrect password"),
// TRANSLATORS: ok dialog button
_("OK"),
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index bdd772ea1..1435a59e9 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -2193,9 +2193,14 @@ void ChatWindow::joinRoom(const bool isJoin)
{
std::string name;
if (isJoin)
+ {
name = PlayerInfo::getRoomName();
+ }
else
+ {
+ // TRANSLATORS: chat tab name
name = _("General");
+ }
tab->setCaption(name);
}
}
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp
index 0d18da6a5..e456533cb 100644
--- a/src/gui/windows/editserverdialog.cpp
+++ b/src/gui/windows/editserverdialog.cpp
@@ -206,8 +206,8 @@ void EditServerDialog::action(const ActionEvent &event)
if (mServerAddressField->getText().empty()
|| mPortField->getText().empty())
{
- // TRANSLATORS: edit server dialog error header
OkDialog *const dlg = CREATEWIDGETR(OkDialog,
+ // TRANSLATORS: edit server dialog error header
_("Error"),
// TRANSLATORS: edit server dialog error message
_("Please at least type both the address and the port "
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index 575315e01..a32f80c3e 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -666,6 +666,7 @@ void EquipmentWindow::addDefaultPage()
if (!mHaveDefaultPage)
{
mHaveDefaultPage = true;
+ // TRANSLATORS: equipment window tab
addPage(_("default"));
}
}
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 8b5e69708..f1b76a2d1 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -693,6 +693,7 @@ void InventoryWindow::mouseMoved(MouseEvent &event)
const Rect &rect = mDimension;
if (src == mSlotsBar || src == mWeightBar)
{
+ // TRANSLATORS: money label
textPopup->show(rect.x + x, rect.y + y, strprintf(_("Money: %s"),
Units::formatCurrency(PlayerInfo::getAttribute(
Attributes::MONEY)).c_str()));
@@ -777,6 +778,7 @@ void InventoryWindow::updateButtons(const Item *item)
if (str.empty())
{
mUseButton->setEnabled(false);
+ // TRANSLATORS: default use button name
mUseButton->setCaption(_("Use"));
}
else
diff --git a/src/gui/windows/mailviewwindow.cpp b/src/gui/windows/mailviewwindow.cpp
index bb0031160..8ae2fb76f 100644
--- a/src/gui/windows/mailviewwindow.cpp
+++ b/src/gui/windows/mailviewwindow.cpp
@@ -117,19 +117,29 @@ MailViewWindow::MailViewWindow(const MailMessage *const message) :
mIcon = new Icon(this, image);
if (message->itemAmount != 1)
{
- mItemLabel = new Label(this, std::string(_("Item:")).append(
- " (").append(toString(message->itemAmount)).append(") "));
+ mItemLabel = new Label(this, std::string(
+ // TRANSLATORS: mail view item label
+ _("Item:")).append(
+ " (").append(
+ toString(message->itemAmount)).append(
+ ") "));
}
else
{
- mItemLabel = new Label(this, std::string(_("Item:")).append(" "));
+ mItemLabel = new Label(this,
+ // TRANSLATORS: mail view item label
+ std::string(_("Item:")).append(" "));
}
placer(0, n, mItemLabel);
placer(1, n++, mIcon);
}
if (message->money || message->itemId)
{
- mGetAttachButton = new Button(this, _("Get attach"), "attach", this);
+ mGetAttachButton = new Button(this,
+ // TRANSLATORS: mail view attach button
+ _("Get attach"),
+ "attach",
+ this);
placer(0, n++, mGetAttachButton);
}
ContainerPlacer placer2;
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp
index 4ed6203ab..98a45effc 100644
--- a/src/gui/windows/ministatuswindow.cpp
+++ b/src/gui/windows/ministatuswindow.cpp
@@ -65,9 +65,9 @@ MiniStatusWindow::MiniStatusWindow() :
mBars(),
mBarNames(),
mIcons(),
- // TRANSLATORS: status bar name
mHpBar(createBar(0, 100, 0, ThemeColorId::HP_BAR, ProgressColorId::PROG_HP,
"hpprogressbar.xml", "hpprogressbar_fill.xml",
+ // TRANSLATORS: status bar name
"hp bar", _("health bar"))),
mMpBar(createBar(0, 100, 0, playerHandler->canUseMagic()
? ThemeColorId::MP_BAR : ThemeColorId::NO_MP_BAR,
@@ -132,8 +132,8 @@ MiniStatusWindow::MiniStatusWindow() :
mJobBar = createBar(0, 100, 0,
ThemeColorId::JOB_BAR,
ProgressColorId::PROG_JOB,
- // TRANSLATORS: status bar name
"jobprogressbar.xml", "jobprogressbar_fill.xml",
+ // TRANSLATORS: status bar name
"job bar", _("job bar"));
StatusWindow::updateJobBar(mJobBar);
}
diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp
index bc0bf2366..1ef878aae 100644
--- a/src/gui/windows/quitdialog.cpp
+++ b/src/gui/windows/quitdialog.cpp
@@ -100,6 +100,7 @@ QuitDialog::QuitDialog(QuitDialog **const pointerToMe) :
if (config.getBoolValue("rated") == false
&& config.getIntValue("gamecount") > 3)
{
+ // TRANSLATORS: rate button
mRate = new RadioButton(this, _("Rate in google play"), "quitdialog");
placeOption(placer, mRate);
mOptions[mOptions.size() - 1]->setSelected(true);
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index 570163f15..c6388c50e 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -430,9 +430,15 @@ void ShopWindow::updateButtonsAndLabels()
if (mPublishButton)
{
if (mEnableBuyingStore)
+ {
+ // TRANSLATORS: unpublish shop button
mPublishButton->setCaption(_("Unpublish"));
+ }
else
+ {
+ // TRANSLATORS: publish shop button
mPublishButton->setCaption(_("Publish"));
+ }
mPublishButton->adjustSize();
if (mBuyShopSize > 0)
mPublishButton->setEnabled(true);
@@ -449,9 +455,15 @@ void ShopWindow::updateButtonsAndLabels()
if (mPublishButton)
{
if (mEnableVending)
+ {
+ // TRANSLATORS: unpublish shop button
mPublishButton->setCaption(_("Unpublish"));
+ }
else
+ {
+ // TRANSLATORS: publish shop button
mPublishButton->setCaption(_("Publish"));
+ }
mPublishButton->adjustSize();
if (sellNotEmpty
&& mSellShopSize > 0
@@ -788,7 +800,8 @@ void ShopWindow::giveList(const std::string &nick, const int mode)
}
void ShopWindow::sendMessage(const std::string &nick,
- std::string data, const bool random)
+ std::string data,
+ const bool random)
{
if (!chatWindow)
return;
@@ -898,7 +911,10 @@ void ShopWindow::processRequest(const std::string &nick, std::string data,
if (!mTradeNick.empty())
{
- sendMessage(nick, "error: player busy ", true);
+ sendMessage(nick,
+ // TRANSLATORS: error buy/sell shop request
+ _("error: player busy") + std::string(" "),
+ true);
return;
}
@@ -908,7 +924,6 @@ void ShopWindow::processRequest(const std::string &nick, std::string data,
std::string part2;
std::string part3;
std::stringstream ss(data);
- std::string msg;
int id;
int price;
int amount;
@@ -938,20 +953,24 @@ void ShopWindow::processRequest(const std::string &nick, std::string data,
if (!item2 || item2->getQuantity() < amount
|| !findShopItem(mTradeItem, SELL))
{
- sendMessage(nick, "error: Can't sell this item ", true);
+ sendMessage(nick,
+ // TRANSLATORS: error buy/sell shop request
+ _("error: Can't sell this item") + std::string(" "),
+ true);
return;
}
- msg = "buy";
mTradeMoney = 0;
}
else
{
if (!findShopItem(mTradeItem, BUY))
{
- sendMessage(nick, "error: Can't buy this item ", true);
+ sendMessage(nick,
+ // TRANSLATORS: error buy/sell shop request
+ _("error: Can't buy this item") + std::string(" "),
+ true);
return;
}
- msg = "sell";
mTradeMoney = mTradeItem->getPrice() * mTradeItem->getQuantity();
}
@@ -964,12 +983,26 @@ void ShopWindow::processRequest(const std::string &nick, std::string data,
}
else
{
+ std::string msg;
+ if (mode == BUY)
+ {
+ // TRANSLATORS: buy shop request (nick, item)
+ msg = strprintf(_("%s wants to buy %s do you accept?"),
+ nick.c_str(),
+ mTradeItem->getInfo().getName().c_str());
+ }
+ else
+ {
+ // TRANSLATORS: sell shop request (nick, item)
+ msg = strprintf(_("%s wants to sell %s do you accept?"),
+ nick.c_str(),
+ mTradeItem->getInfo().getName().c_str());
+ }
+
ConfirmDialog *const confirmDlg = CREATEWIDGETR(ConfirmDialog,
// TRANSLATORS: shop window dialog
_("Request for Trade"),
- strprintf(_("%s wants to %s %s do you accept?"),
- nick.c_str(), msg.c_str(),
- mTradeItem->getInfo().getName().c_str()),
+ msg,
SOUND_REQUEST,
true);
confirmDlg->addActionListener(this);
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index e8d1836f8..b80f6d5fe 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -161,6 +161,7 @@ void SkillDialog::action(const ActionEvent &event)
{
mUseButton->setEnabled(false);
mIncreaseButton->setEnabled(false);
+ // TRANSLATORS: skills dialog button
mUseButton->setCaption(_("Use"));
}
}
@@ -333,6 +334,7 @@ void SkillDialog::loadXmlFile(const std::string &fileName)
skill->model = model;
skill->update();
skill->useButton = XML::getProperty(
+ // TRANSLATORS: skills dialog button
node, "useButton", _("Use"));
skill->owner = parseOwner(XML::getProperty(
node, "owner", "player"));
@@ -507,7 +509,9 @@ void SkillDialog::addSkill(const SkillOwner::Type owner,
skill->range = range;
skill->sp = sp;
skill->update();
+ // TRANSLATORS: skills dialog button
skill->useButton = _("Use");
+ // TRANSLATORS: skill error message
skill->errorText = strprintf(_("Failed skill: %s"), name.c_str());
mDefaultModel->addSkill(skill);
@@ -592,6 +596,7 @@ void SkillDialog::updateTabSelection()
else
{
mUseButton->setEnabled(false);
+ // TRANSLATORS: inventory button
mUseButton->setCaption(_("Use"));
}
}
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index ec5ca90fa..8498b6316 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -496,8 +496,8 @@ void SocialWindow::showPartyInvite(const std::string &restrict partyName,
localChatTab->chatLog(msg, ChatMsgType::BY_SERVER);
// show invite
- // TRANSLATORS: party invite message
CREATEWIDGETV(mPartyAcceptDialog, ConfirmDialog,
+ // TRANSLATORS: party invite message
_("Accept Party Invite"),
msg,
SOUND_REQUEST,
@@ -519,6 +519,7 @@ void SocialWindow::showPartyCreate()
CREATEWIDGET(OkDialog,
// TRANSLATORS: party creation message
_("Create Party"),
+ // TRANSLATORS: party creation error
_("Cannot create party. You are already in a party"),
// TRANSLATORS: ok dialog button
_("OK"),
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index b38bb2546..bf4814a03 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -407,6 +407,7 @@ void UpdaterWindow::loadNews()
if (cnt > maxNews)
{
mBrowserBox->addRow("");
+ // TRANSLATORS: updater window checkbox
mBrowserBox->addRow("news", _("Show all news (can be slow)"));
mBrowserBox->addRow("");
}