diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-01-04 15:44:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-04 16:24:42 +0300 |
commit | bc2c095db69be01837d07af1151b0f0a3061713f (patch) | |
tree | 98009b4483d873f45f7b4f2897a4a7ba5118d39e /src/gui/windows/shopwindow.cpp | |
parent | 9b5b48739b62fca4bb30cd04be1031ac3f80095d (diff) | |
download | manaplus-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/shopwindow.cpp')
-rw-r--r-- | src/gui/windows/shopwindow.cpp | 53 |
1 files changed, 43 insertions, 10 deletions
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); |