FIRE-29977: Previous changes would lead to hilarious "OS$free" display - assume OS users are smart enough to comprehend "OS$ 0" means it's free

master
Ansariel 2020-08-05 16:33:31 +02:00
parent 1b78cb7123
commit 4f3271f028
10 changed files with 21 additions and 116 deletions

View File

@ -1015,8 +1015,10 @@ void FSAreaSearch::matchObject(FSObjectProperties& details, LLViewerObject* obje
cell_params.column = "price";
if (details.sale_info.isForSale())
{
S32 price = details.sale_info.getSalePrice();
cell_params.value = price > 0 ? llformat("%s%d", "L$", details.sale_info.getSalePrice()) : LLTrans::getString("free");
LLStringUtil::format_map_t args;
args["COST"] = llformat("%d", details.sale_info.getSalePrice());
std::string cost_label = LLTrans::getString("FSAreaSearch_Cost_Label", args);
cell_params.value = cost_label;
}
else
{
@ -1026,7 +1028,7 @@ void FSAreaSearch::matchObject(FSObjectProperties& details, LLViewerObject* obje
cell_params.column = "land_impact";
F32 cost = objectp->getLinksetCost();
if (cost > 0.001)
if (cost > F_ALMOST_ZERO)
{
cell_params.value = cost;
}

View File

@ -327,32 +327,9 @@ BOOL LLPanelMainInventory::postBuild()
mGearMenuButton = getChild<LLMenuButton>("options_gear_btn");
initListCommandsHandlers();
// <FS:AW opensim currency support>
//const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost());
//const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost());
//const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost());
S32 texture_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
S32 sound_upload_cost = LLAgentBenefitsMgr::current().getSoundUploadCost();
S32 animation_upload_cost = LLAgentBenefitsMgr::current().getAnimationUploadCost();
std::string texture_upload_cost_str;
std::string sound_upload_cost_str;
std::string animation_upload_cost_str;
#ifdef OPENSIM
if (LLGridManager::getInstance()->isInOpenSim())
{
texture_upload_cost_str = texture_upload_cost > 0 ? llformat("%s%d", "L$", texture_upload_cost) : LLTrans::getString("free");
sound_upload_cost_str = sound_upload_cost > 0 ? llformat("%s%d", "L$", sound_upload_cost) : LLTrans::getString("free");
animation_upload_cost_str = animation_upload_cost > 0 ? llformat("%s%d", "L$", animation_upload_cost) : LLTrans::getString("free");
}
else
#endif
{
texture_upload_cost_str = "L$" + llformat("%d", texture_upload_cost);
sound_upload_cost_str = "L$" + llformat("%d", sound_upload_cost);
animation_upload_cost_str = "L$" + llformat("%d", animation_upload_cost);
}
// </FS:AW opensim currency support>
const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost());
const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost());
const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost());
LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get();
if (menu)
@ -2075,31 +2052,9 @@ void LLPanelMainInventory::setUploadCostIfNeeded()
LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get();
if(mNeedUploadCost && menu)
{
// <FS:AW opensim currency support>
//const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost());
//const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost());
//const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost());
S32 texture_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
S32 sound_upload_cost = LLAgentBenefitsMgr::current().getSoundUploadCost();
S32 animation_upload_cost = LLAgentBenefitsMgr::current().getAnimationUploadCost();
std::string texture_upload_cost_str;
std::string sound_upload_cost_str;
std::string animation_upload_cost_str;
#ifdef OPENSIM
if (LLGridManager::getInstance()->isInOpenSim())
{
texture_upload_cost_str = texture_upload_cost > 0 ? llformat("%d", texture_upload_cost) : LLTrans::getString("free");
sound_upload_cost_str = sound_upload_cost > 0 ? llformat("%d", sound_upload_cost) : LLTrans::getString("free");
animation_upload_cost_str = animation_upload_cost > 0 ? llformat("%d", animation_upload_cost) : LLTrans::getString("free");
}
else
#endif
{
texture_upload_cost_str = llformat("%d", texture_upload_cost);
sound_upload_cost_str = llformat("%d", sound_upload_cost);
animation_upload_cost_str = llformat("%d", animation_upload_cost);
}
// </FS:AW opensim currency support>
const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost());
const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost());
const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost());
menu->getChild<LLView>("Upload Image")->setLabelArg("[COST]", texture_upload_cost_str);
menu->getChild<LLView>("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str);
menu->getChild<LLView>("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str);

View File

@ -627,32 +627,10 @@ void init_menus()
gViewerWindow->setMenuBackgroundColor(false,
!LLGridManager::getInstance()->isInSLBeta());
// <FS:AW opensim currency support>
// *TODO:Also fix cost in llfolderview.cpp for Inventory menus
//const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost());
//const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost());
//const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost());
S32 texture_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
S32 sound_upload_cost = LLAgentBenefitsMgr::current().getSoundUploadCost();
S32 animation_upload_cost = LLAgentBenefitsMgr::current().getAnimationUploadCost();
std::string texture_upload_cost_str;
std::string sound_upload_cost_str;
std::string animation_upload_cost_str;
#ifdef OPENSIM
if (LLGridManager::getInstance()->isInOpenSim())
{
texture_upload_cost_str = texture_upload_cost > 0 ? llformat("%s%d", "L$", texture_upload_cost) : LLTrans::getString("free");
sound_upload_cost_str = sound_upload_cost > 0 ? llformat("%s%d", "L$", sound_upload_cost) : LLTrans::getString("free");
animation_upload_cost_str = animation_upload_cost > 0 ? llformat("%s%d", "L$", animation_upload_cost) : LLTrans::getString("free");
}
else
#endif
{
texture_upload_cost_str = "L$" + llformat("%d", texture_upload_cost);
sound_upload_cost_str = "L$" + llformat("%d", sound_upload_cost);
animation_upload_cost_str = "L$" + llformat("%d", animation_upload_cost);
}
// </FS:AW opensim currency support>
const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost());
const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost());
const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost());
gMenuHolder->childSetLabelArg("Upload Image", "[COST]", texture_upload_cost_str);
gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", sound_upload_cost_str);
gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", animation_upload_cost_str);
@ -11067,13 +11045,6 @@ void LLUploadCostCalculator::calculateCost(const std::string& asset_type_str)
{
LL_WARNS() << "Unable to find upload cost for asset_type_str " << asset_type_str << LL_ENDL;
}
#ifdef OPENSIM // <FS:AW optional opensim support>
if (LLGridManager::getInstance()->isInOpenSim())
{
mCostStr = upload_cost > 0 ? llformat("%s%d", "L$", upload_cost) : LLTrans::getString("free");
}
else
#endif // OPENSIM // <FS:AW optional opensim support>
mCostStr = std::to_string(upload_cost);
}

View File

@ -6893,16 +6893,9 @@ void process_economy_data(LLMessageSystem *msg, void** /*user_data*/)
{
LLGlobalEconomy::processEconomyData(msg, LLGlobalEconomy::getInstance());
S32 texture_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
S32 sound_upload_cost = LLAgentBenefitsMgr::current().getSoundUploadCost();
S32 animation_upload_cost = LLAgentBenefitsMgr::current().getAnimationUploadCost();
std::string texture_upload_cost_str;
std::string sound_upload_cost_str;
std::string animation_upload_cost_str;
texture_upload_cost_str = texture_upload_cost > 0 ? llformat("%s%d", "L$", texture_upload_cost) : LLTrans::getString("free");
sound_upload_cost_str = sound_upload_cost > 0 ? llformat("%s%d", "L$", sound_upload_cost) : LLTrans::getString("free");
animation_upload_cost_str = animation_upload_cost > 0 ? llformat("%s%d", "L$", animation_upload_cost) : LLTrans::getString("free");
const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost());
const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost());
const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost());
gMenuHolder->getChild<LLUICtrl>("Upload Image")->setLabelArg("[COST]", texture_upload_cost_str);
gMenuHolder->getChild<LLUICtrl>("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str);
gMenuHolder->getChild<LLUICtrl>("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str);

View File

@ -5356,11 +5356,6 @@ Falls der Fehler weiterhin auftritt, überprüfen Sie bitte Ihre Netzwerk- und F
<string name="LocalEstimateUSD">
[AMOUNT] US$
</string>
<!-- FS:AW opensim currency support -->
<string name="free">
kostenlos
</string>
<!-- /FS:AW opensim currency support -->
<string name="Group Ban">
Gruppen-Bann
</string>
@ -7099,4 +7094,7 @@ Ihre aktuelle Position: [AVATAR_POS]
<string name="unknown_script">
(Unbekanntes Skript)
</string>
<string name="FSAreaSearch_Cost_Label">
[COST] L$
</string>
</strings>

View File

@ -2439,9 +2439,6 @@ If you continue to experience problems, please check your network and firewall s
<!-- currency formatting -->
<string name="LocalEstimateUSD">US$ [AMOUNT]</string>
<!-- FS:AW opensim currency support -->
<string name="free">free</string>
<!-- Group Profile roles and powers -->
<string name="Group Ban">Group Ban</string>
<string name="Membership">Membership</string>
@ -3192,4 +3189,5 @@ Your current position: [AVATAR_POS]
<string name="FSUrlEntryWearLabel">Wear inventory folder</string>
<string name="TexturePickerOutfitHeader">Picture for Outfit</string>
<string name="unknown_script">(Unknown script)</string>
<string name="FSAreaSearch_Cost_Label">L$[COST]</string>
</strings>

View File

@ -5107,9 +5107,6 @@ Visita https://secondlife-status.statuspage.io para ver si hay alguna incidencia
<string name="LocalEstimateUSD">
[AMOUNT] US$
</string>
<string name="free">
gratis
</string>
<string name="Group Ban">
Expulsión de grupo
</string>

View File

@ -5131,9 +5131,6 @@ Segnala abuso
<string name="LocalEstimateUSD">
US$ [AMOUNT]
</string>
<string name="free">
gratis
</string>
<string name="Group Ban">
Espulsione da gruppo
</string>

View File

@ -5039,9 +5039,6 @@ Jeśli problemy będą występowały nadal, proszę sprawdź sieć i ustawienia
<string name="LocalEstimateUSD">
[AMOUNT] US$
</string>
<string name="free">
darmowe
</string>
<string name="Group Ban">
Bany grupowe
</string>

View File

@ -5320,9 +5320,6 @@ http://www.firestormviewer.org/support за помощь в решении эт
<string name="LocalEstimateUSD">
US$ [AMOUNT]
</string>
<string name="free">
бесплатно
</string>
<string name="Group Ban">
Бан группы
</string>