diff -r e59aaade1113 -r cc7a5905634f indra/newview/llfloaterbuyland.cpp --- a/indra/newview/llfloaterbuyland.cpp Sun Jul 24 15:55:44 2011 -0500 +++ b/indra/newview/llfloaterbuyland.cpp Mon Jul 25 23:46:28 2011 +0300 @@ -529,7 +529,7 @@ void LLFloaterBuyLandUI::updateCovenantI LLTextBox* region_type = getChild("region_type_text"); if (region_type) { - region_type->setText(region->getSimProductName()); + region_type->setText(region->getLocalizedSimProductName()); } LLTextBox* resellable_clause = getChild("resellable_clause"); diff -r e59aaade1113 -r cc7a5905634f indra/newview/llfloaterland.cpp --- a/indra/newview/llfloaterland.cpp Sun Jul 24 15:55:44 2011 -0500 +++ b/indra/newview/llfloaterland.cpp Mon Jul 25 23:46:28 2011 +0300 @@ -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("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("region_maturity_text"); if (region_maturity) diff -r e59aaade1113 -r cc7a5905634f indra/newview/llfloaterregioninfo.cpp --- a/indra/newview/llfloaterregioninfo.cpp Sun Jul 24 15:55:44 2011 -0500 +++ b/indra/newview/llfloaterregioninfo.cpp Mon Jul 25 23:46:28 2011 +0300 @@ -336,7 +336,7 @@ void LLFloaterRegionInfo::processRegionI 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::processRegionI 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::refreshFromR } LLTextBox* region_landtype = getChild("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 -r e59aaade1113 -r cc7a5905634f indra/newview/llpanelplaceprofile.cpp --- a/indra/newview/llpanelplaceprofile.cpp Sun Jul 24 15:55:44 2011 -0500 +++ b/indra/newview/llpanelplaceprofile.cpp Mon Jul 25 23:46:28 2011 +0300 @@ -434,7 +434,7 @@ void LLPanelPlaceProfile::displaySelecte } mRegionNameText->setText(region->getName()); - mRegionTypeText->setText(region->getSimProductName()); + mRegionTypeText->setText(region->getLocalizedSimProductName()); // Determine parcel owner if (parcel->isPublic()) diff -r e59aaade1113 -r cc7a5905634f indra/newview/llviewerregion.h --- a/indra/newview/llviewerregion.h Sun Jul 24 15:55:44 2011 -0500 +++ b/indra/newview/llviewerregion.h Mon Jul 25 23:46:28 2011 +0300 @@ -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); diff -r e59aaade1113 -r cc7a5905634f indra/newview/llviewerregion.cpp --- a/indra/newview/llviewerregion.cpp Sun Jul 24 15:55:44 2011 -0500 +++ b/indra/newview/llviewerregion.cpp Mon Jul 25 23:46:28 2011 +0300 @@ -558,6 +558,11 @@ const std::string LLViewerRegion::getSim 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)