diff options
author | Oz Linden <oz@lindenlab.com> | 2011-07-29 11:08:00 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-07-29 11:08:00 -0400 |
commit | b4df9fd2028e39186291a7829234ff3ba0f87cd0 (patch) | |
tree | 992846ef7668c85b490c5e249d2059f7b23065be /indra | |
parent | 58ff6b5033e514381a3e9e54d0d6fa681dcc1205 (diff) | |
parent | 7e405ef0e3efce400db53ddc16d367680da659c9 (diff) |
merge changes for storm-1220
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloaterbuyland.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llfloaterland.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llfloaterregioninfo.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llpanelplaceprofile.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerregion.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llviewerregion.h | 2 |
6 files changed, 13 insertions, 20 deletions
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 610142b5a9..5cfdd69f7b 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -529,7 +529,7 @@ void LLFloaterBuyLandUI::updateCovenantInfo() LLTextBox* region_type = getChild<LLTextBox>("region_type_text"); if (region_type) { - region_type->setText(region->getSimProductName()); + region_type->setText(region->getLocalizedSimProductName()); } LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause"); diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 9b7593ce61..4746f93009 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -566,10 +566,7 @@ void LLPanelLandGeneral::refresh() if (regionp) { insert_maturity_into_textbox(mContentRating, gFloaterView->getParentFloater(this), MATURITY); - - std::string land_type; - bool is_land_type_localized = LLTrans::findString(land_type, regionp->getSimProductName()); - mLandType->setText(is_land_type_localized ? land_type : regionp->getSimProductName()); + mLandType->setText(regionp->getLocalizedSimProductName()); } // estate owner/manager cannot edit other parts of the parcel @@ -2883,13 +2880,7 @@ void LLPanelLandCovenant::refresh() } LLTextBox* region_landtype = getChild<LLTextBox>("region_landtype_text"); - if (region_landtype) - { - std::string land_type; - bool is_land_type_localized = LLTrans::findString(land_type, region->getSimProductName()); - - region_landtype->setText(is_land_type_localized ? land_type : region->getSimProductName()); - } + region_landtype->setText(region->getLocalizedSimProductName()); LLTextBox* region_maturity = getChild<LLTextBox>("region_maturity_text"); if (region_maturity) diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 538c5e3b88..9a99417e93 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -336,7 +336,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) LLViewerRegion* region = gAgent.getRegion(); BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); - // *TODO: Replace parcing msg with accessing the region info model. + // *TODO: Replace parsing msg with accessing the region info model. LLRegionInfoModel& region_info = LLRegionInfoModel::instance(); // extract message @@ -368,6 +368,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) msg->getSize("RegionInfo2", "ProductName") > 0) { msg->getString("RegionInfo2", "ProductName", sim_type); + LLTrans::findString(sim_type, sim_type); // try localizing sim product name } // GENERAL PANEL @@ -2409,11 +2410,7 @@ bool LLPanelEstateCovenant::refreshFromRegion(LLViewerRegion* region) } LLTextBox* region_landtype = getChild<LLTextBox>("region_landtype_text"); - if (region_landtype) - { - region_landtype->setText(region->getSimProductName()); - } - + region_landtype->setText(region->getLocalizedSimProductName()); // let the parent class handle the general data collection. bool rv = LLPanelRegionInfo::refreshFromRegion(region); diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index f82e86ef08..ce8057eead 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -463,7 +463,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, } mRegionNameText->setText(region->getName()); - mRegionTypeText->setText(region->getSimProductName()); + mRegionTypeText->setText(region->getLocalizedSimProductName()); // Determine parcel owner if (parcel->isPublic()) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index bb7170e0f7..d4e0831c33 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -558,6 +558,11 @@ const std::string LLViewerRegion::getSimAccessString() const return accessToString(mSimAccess); } +std::string LLViewerRegion::getLocalizedSimProductName() const +{ + std::string localized_spn; + return LLTrans::findString(localized_spn, mProductName) ? localized_spn : mProductName; +} // static std::string LLViewerRegion::regionFlagsToString(U32 flags) diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index f68b51ea65..a105ff625d 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -192,7 +192,7 @@ public: S32 getSimCPURatio() const { return mCPURatio; } const std::string& getSimColoName() const { return mColoName; } const std::string& getSimProductSKU() const { return mProductSKU; } - const std::string& getSimProductName() const { return mProductName; } + std::string getLocalizedSimProductName() const; // Returns "Sandbox", "Expensive", etc. static std::string regionFlagsToString(U32 flags); |