summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Litovchuk <slitovchuk@productengine.com>2010-03-18 19:42:38 +0200
committerSergei Litovchuk <slitovchuk@productengine.com>2010-03-18 19:42:38 +0200
commitc74f87015118a6da7036623d026fc512f46af9d5 (patch)
tree81ae353a65072ecaadf9dd7124b67da15ed7eca6
parent2f9223dc1472dace57095be1ba0a88e4e0e53695 (diff)
(EXT-5982) [FRAGMENTATION] L$ kaufen window (Buy L$)
- Moved hardcoded strings in LLFloaterBuyCurrency::buyCurrency() calls to strings.xml Reviewed by Vadim Savchuk https://codereview.productengine.com/secondlife/r/56/ --HG-- branch : product-engine
-rw-r--r--indra/newview/llassetuploadresponders.cpp5
-rw-r--r--indra/newview/llfloaterbuycurrency.cpp3
-rw-r--r--indra/newview/llpanelobjectinventory.cpp4
-rw-r--r--indra/newview/llpanelplaceprofile.cpp8
-rw-r--r--indra/newview/llviewermenu.cpp8
-rw-r--r--indra/newview/llviewermenufile.cpp12
-rw-r--r--indra/newview/llviewermessage.cpp4
-rw-r--r--indra/newview/skins/default/xui/en/floater_buy_currency.xml2
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml13
9 files changed, 38 insertions, 21 deletions
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index 80cf8f1d61..8441796219 100644
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -182,7 +182,10 @@ void LLAssetUploadResponder::uploadFailure(const LLSD& content)
// deal with L$ errors
if (reason == "insufficient funds")
{
- LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("uploading_costs"), LLGlobalEconomy::Singleton::getInstance()->getPriceUpload());
+ S32 price = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
+ LLStringUtil::format_map_t args;
+ args["AMOUNT"] = llformat("%d", price);
+ LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("uploading_costs", args), price);
}
else
{
diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp
index 1642e6725e..7fddd1fc5f 100644
--- a/indra/newview/llfloaterbuycurrency.cpp
+++ b/indra/newview/llfloaterbuycurrency.cpp
@@ -234,8 +234,7 @@ void LLFloaterBuyCurrencyUI::updateUI()
if (mHasTarget)
{
childSetVisible("buy_action", true);
- childSetTextArg("buy_action", "[NAME]", mTargetName);
- childSetTextArg("buy_action", "[PRICE]", llformat("%d",mTargetPrice));
+ childSetTextArg("buy_action", "[ACTION]", mTargetName);
}
}
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 69b8571bfb..c43cbf5819 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -609,7 +609,9 @@ void LLTaskInvFVBridge::performAction(LLFolderView* folder, LLInventoryModel* mo
{
if (price > 0 && price > gStatusBar->getBalance())
{
- LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("this_costs"), price);
+ LLStringUtil::format_map_t args;
+ args["AMOUNT"] = llformat("%d", price);
+ LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("this_costs", args), price);
}
else
{
diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp
index cdd79b1559..1a1650c38b 100644
--- a/indra/newview/llpanelplaceprofile.cpp
+++ b/indra/newview/llpanelplaceprofile.cpp
@@ -567,9 +567,13 @@ void LLPanelPlaceProfile::onForSaleBannerClick()
if(parcel->getLocalID() == mSelectedParcelID &&
mLastSelectedRegionID ==selected_region->getRegionID())
{
- if(parcel->getSalePrice() - gStatusBar->getBalance() > 0)
+ S32 price = parcel->getSalePrice();
+
+ if(price - gStatusBar->getBalance() > 0)
{
- LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("buying_selected_land"), parcel->getSalePrice());
+ LLStringUtil::format_map_t args;
+ args["AMOUNT"] = llformat("%d", price);
+ LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("buying_selected_land", args), price);
}
else
{
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 5c40d02f8d..dc8185c770 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -3274,7 +3274,9 @@ void handle_buy_object(LLSaleInfo sale_info)
if (price > 0 && price > gStatusBar->getBalance())
{
- LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("this_object_costs"), price);
+ LLStringUtil::format_map_t args;
+ args["AMOUNT"] = llformat("%d", price);
+ LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("this_object_costs", args), price);
return;
}
@@ -4404,8 +4406,10 @@ void handle_buy_or_take()
}
else
{
+ LLStringUtil::format_map_t args;
+ args["AMOUNT"] = llformat("%d", total_price);
LLFloaterBuyCurrency::buyCurrency(
- "Buying this costs", total_price);
+ LLTrans::getString("BuyingCosts", args), total_price);
}
}
else
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 00762894cd..dfde9a9d1d 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -811,10 +811,10 @@ void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt
if(!(can_afford_transaction(expected_upload_cost)))
{
- LLFloaterBuyCurrency::buyCurrency(
- llformat(LLTrans::getString("UploadingCosts").c_str(),
- data->mAssetInfo.getName().c_str()),
- expected_upload_cost);
+ LLStringUtil::format_map_t args;
+ args["NAME"] = data->mAssetInfo.getName();
+ args["AMOUNT"] = llformat("%d", expected_upload_cost);
+ LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("UploadingCosts", args), expected_upload_cost);
is_balance_sufficient = FALSE;
}
else if(region)
@@ -1001,7 +1001,9 @@ void upload_new_resource(const LLTransactionID &tid, LLAssetType::EType asset_ty
if (balance < expected_upload_cost)
{
// insufficient funds, bail on this upload
- LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("uploading_costs"), expected_upload_cost);
+ LLStringUtil::format_map_t args;
+ args["AMOUNT"] = llformat("%d", expected_upload_cost);
+ LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("uploading_costs", args), expected_upload_cost);
return;
}
}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index bd0012057c..210557f68f 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -272,7 +272,9 @@ void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_
}
else
{
- LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("giving"), amount);
+ LLStringUtil::format_map_t args;
+ args["AMOUNT"] = llformat("%d", amount);
+ LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("giving", args), amount);
}
}
diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency.xml b/indra/newview/skins/default/xui/en/floater_buy_currency.xml
index 961bd6b5e4..e02d32596a 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_currency.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_currency.xml
@@ -182,7 +182,7 @@
width="180"
layout="topleft"
name="buy_action">
- [NAME] L$ [PRICE]
+ [ACTION]
</text>
<text
type="string"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 934b3c8c5c..47386bd332 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2202,7 +2202,8 @@ Clears (deletes) the media and all params from the given face.
<!-- Viewer menu -->
<string name="AcquiredItems">Acquired Items</string>
<string name="Cancel">Cancel</string>
- <string name="UploadingCosts">Uploading %s costs</string>
+ <string name="UploadingCosts">Uploading [NAME] costs L$ [AMOUNT]</string>
+ <string name="BuyingCosts">Buying this costs L$ [AMOUNT]</string>
<string name="UnknownFileExtension">
Unknown file extension .%s
Expected .wav, .tga, .bmp, .jpg, .jpeg, or .bvh
@@ -3060,11 +3061,11 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="to join a group">to join a group</string>
<string name="to upload">to upload</string>
- <string name="giving">Giving</string>
- <string name="uploading_costs">Uploading costs</string>
- <string name="this_costs">This costs</string>
- <string name="buying_selected_land">Buying selected land</string>
- <string name="this_object_costs">This object costs"</string>
+ <string name="giving">Giving L$ [AMOUNT]</string>
+ <string name="uploading_costs">Uploading costs L$ [AMOUNT]</string>
+ <string name="this_costs">This costs L$ [AMOUNT]</string>
+ <string name="buying_selected_land">Buying selected land L$ [AMOUNT]</string>
+ <string name="this_object_costs">This object costs L$ [AMOUNT]</string>
<string name="group_role_everyone">Everyone</string>
<string name="group_role_officers">Officers</string>