diff --git a/indra/newview/hippogridmanager.cpp b/indra/newview/hippogridmanager.cpp index 9447a557c..b38cf0646 100644 --- a/indra/newview/hippogridmanager.cpp +++ b/indra/newview/hippogridmanager.cpp @@ -58,6 +58,7 @@ HippoGridInfo::HippoGridInfo(const std::string& gridName) : mAutoUpdate(false), mMaxAgentGroups(-1), mCurrencySymbol("OS$"), + mCurrencyText("OS Dollars"), mRealCurrencySymbol("US$"), mDirectoryFee(30), mUPCSupported(false) @@ -172,6 +173,11 @@ const std::string& HippoGridInfo::getCurrencySymbol() const return mCurrencySymbol; } +const std::string& HippoGridInfo::getCurrencyText() const +{ + return mCurrencyText; +} + const std::string& HippoGridInfo::getRealCurrencySymbol() const { return mRealCurrencySymbol; @@ -188,6 +194,7 @@ void HippoGridInfo::setPlatform(Platform platform) if (mPlatform == PLATFORM_SECONDLIFE) { mCurrencySymbol = "L$"; + mCurrencyText = "Linden Dollars"; } } @@ -319,6 +326,11 @@ void HippoGridInfo::setCurrencySymbol(const std::string& sym) mCurrencySymbol = sym.substr(0, 3); } +void HippoGridInfo::setCurrencyText(const std::string& text) +{ + mCurrencyText = text; +} + void HippoGridInfo::setRealCurrencySymbol(const std::string& sym) { mRealCurrencySymbol = sym.substr(0, 3); diff --git a/indra/newview/hippogridmanager.h b/indra/newview/hippogridmanager.h index 147ab0816..1e637e521 100644 --- a/indra/newview/hippogridmanager.h +++ b/indra/newview/hippogridmanager.h @@ -61,6 +61,7 @@ public: int getMaxAgentGroups() const { return mMaxAgentGroups; } const std::string& getCurrencySymbol() const; + const std::string& getCurrencyText() const; const std::string& getRealCurrencySymbol() const; std::string getUploadFee() const; std::string getGroupCreationFee() const; @@ -87,6 +88,7 @@ public: bool getUPCSupported(); void setCurrencySymbol(const std::string& sym); + void setCurrencyText(const std::string& text); void setRealCurrencySymbol(const std::string& sym); void setDirectoryFee(int fee); bool supportsInvLinks(); @@ -124,6 +126,7 @@ private: int mMaxAgentGroups; std::string mCurrencySymbol; + std::string mCurrencyText; std::string mRealCurrencySymbol; int mDirectoryFee; std::string mGridMessage; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 44a0a45db..d276909d3 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1002,6 +1002,7 @@ bool idle_startup() if(!gHippoGridManager->getConnectedGrid()->isSecondLife()) { LLTrans::setDefaultArg("[CURRENCY]",gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); //replace [CURRENCY] with OS$, not L$ for instance. + LLTrans::setDefaultArg("[CURRENCY_TEXT]",gHippoGridManager->getConnectedGrid()->getCurrencyText()); //replace [CURRENCYTEXT] with OS DOllars, not Linden Dollars for instance. LLTrans::setDefaultArg("[SECOND_LIFE]", gHippoGridManager->getConnectedGrid()->getGridName()); LLTrans::setDefaultArg("[SECOND_LIFE_GRID]", gHippoGridManager->getConnectedGrid()->getGridName() + " Grid"); LLTrans::setDefaultArg("[GRID_OWNER]", gHippoGridManager->getConnectedGrid()->getGridOwner()); @@ -4378,6 +4379,8 @@ bool process_login_success_response(std::string& password) if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSearchUrl(tmp); tmp = response["currency"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setCurrencySymbol(tmp); + tmp = response["currency_text"].asString(); + if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setCurrencyText(tmp); tmp = response["real_currency"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRealCurrencySymbol(tmp); tmp = response["directory_fee"].asString();