diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0b692af99c672242b91d8f270a7267ad0bd0ae26..1f99fd690a1364e154cb4b791480381cc783f509 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -401,6 +401,7 @@ void init_default_trans_args() { default_trans_args.insert("SECOND_LIFE"); // World default_trans_args.insert("CURRENT_GRID"); + default_trans_args.insert("GRID_ADMIN"); default_trans_args.insert("APP_NAME"); default_trans_args.insert("CAPITALIZED_APP_NAME"); default_trans_args.insert("SECOND_LIFE_GRID"); diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index 733128616de99a5ee8b075e9011b0e6fe2294476..7adc438346cb36d1504352877a19c56a43b42263 100755 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -66,6 +66,8 @@ const std::string GRID_PLATFORM = "platform"; const std::string GRID_GATEKEEPER = "gatekeeper"; /// a grid's uas service address const std::string GRID_UAS = "uas"; +/// a grid's operating agent (optional) +const std::string GRID_ADMIN = "administrator"; /// internal data on whether a grid was added manually or temporarily const std::string GRID_TEMPORARY = "temporary"; @@ -190,6 +192,7 @@ void LLGridManager::initialize(const std::string& grid_file) "http://secondlife.com/account/request.php", "http://join.secondlife.com/?sourceid=AlchemyViewer", SL_UPDATE_QUERY_URL, + "Linden Lab", "secondlife", "Agni"); addSystemGrid("Second Life Beta", @@ -200,6 +203,7 @@ void LLGridManager::initialize(const std::string& grid_file) "http://secondlife.com/account/request.php", "http://join.secondlife.com/?sourceid=AlchemyViewer", SL_UPDATE_QUERY_URL, + "Linden Lab", "secondlife", "Aditi"); @@ -423,6 +427,7 @@ void LLGridManager::addSystemGrid(const std::string& label, const std::string& password_url, const std::string& register_url, const std::string& update_url_base, + const std::string& administrator, const std::string& platform, const std::string& login_id) { @@ -459,6 +464,10 @@ void LLGridManager::addSystemGrid(const std::string& label, { grid[GRID_SLURL_BASE] = llformat(SYSTEM_GRID_SLURL_BASE, grid[GRID_ID_VALUE].asString().c_str()); } + if (!administrator.empty()) + { + grid[GRID_ADMIN] = administrator; + } addGrid(grid); } @@ -528,6 +537,11 @@ void LLGridManager::gridInfoResponderCallback(LLSD& grid, LLXMLNodePtr root_node grid[GRID_LABEL_VALUE] = node->getTextContents(); LL_DEBUGS("GridManager") << "[\"gridname\"]: " << grid[GRID_LABEL_VALUE] << LL_ENDL; } + else if (node->hasName("administrator")) + { + grid[GRID_ADMIN] = node->getTextContents(); + LL_DEBUGS("GridManager") << "[\"administrator\" " << grid[GRID_ADMIN] << LL_ENDL; + } else if (node->hasName("gatekeeper")) { LLURI gatekeeper(node->getTextContents()); @@ -637,6 +651,7 @@ void LLGridManager::setGridChoice(const std::string& grid) mGrid = grid_name; gSavedSettings.setString("CurrentGrid", grid_name); LLTrans::setDefaultArg("CURRENT_GRID", getGridLabel()); + LLTrans::setDefaultArg("GRID_ADMIN", getGridAdministrator()); updateIsInProductionGrid(); } @@ -738,6 +753,24 @@ std::string LLGridManager::getGridId(const std::string& grid) const return grid_id; } +std::string LLGridManager::getGridAdministrator(const std::string& grid) const +{ + std::string admininstrator = "Linden Lab"; // gotta default to something + std::string grid_name = getGrid(grid); + if(!grid_name.empty() && mGridList.has(grid)) + { + if (mGridList[grid].has(GRID_ADMIN)) + { + admininstrator = mGridList[grid][GRID_ADMIN].asString(); + } + else if (mGridList[grid].has(GRID_LABEL_VALUE)) + { + admininstrator = mGridList[grid][GRID_LABEL_VALUE].asString(); + } + } + return admininstrator; +} + void LLGridManager::getLoginURIs(const std::string& grid, std::vector<std::string>& uris) const { uris.clear(); diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h index 5c8aacd21ad5fd64bc3b2baaf9b7ef66a37e710e..5ee816d6da32249f0a7f677b69bd337206532e95 100755 --- a/indra/newview/llviewernetwork.h +++ b/indra/newview/llviewernetwork.h @@ -108,6 +108,12 @@ class LLGridManager : public LLSingleton<LLGridManager> /// Get the user-friendly long form descriptor for the selected grid std::string getGridLabel() const { return getGridLabel(mGrid); } + /// Get the grid administrator for a given grid + std::string getGridAdministrator(const std::string& grid) const; + + /// Get the grid administrator for the selected grid + std::string getGridAdministrator() const {return getGridAdministrator(mGrid); } + /// Returns gridInfo for a given grid as an LLSD map LLSD getGridInfo(const std::string& grid) const; @@ -278,6 +284,7 @@ private: const std::string& password_url, const std::string& register_url, const std::string& update_url_base, + const std::string& administrator, const std::string& platform, const std::string& login_id = ""); diff --git a/indra/newview/skins/default/xui/en/panel_edit_profile.xml b/indra/newview/skins/default/xui/en/panel_edit_profile.xml index 55cde0c3df4691d900b297d7604838f6997c0f52..17947122c4b38939e6bc65114c44573763bdd70d 100755 --- a/indra/newview/skins/default/xui/en/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_profile.xml @@ -30,7 +30,7 @@ value="Charter Member" /> <string name="AcctTypeEmployee" - value="[CURRENT_GRID] Employee" /> + value="[GRID_ADMIN] Employee" /> <string name="PaymentInfoUsed" value="Payment Info Used" /> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index cb434942d413794180721019506270c194da8a6d..15dfb9f4ded326c0c7dcd2533ab57b1392d8536f 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -11,7 +11,10 @@ <string name="CAPITALIZED_APP_NAME">ALCHEMY</string> <string name="SECOND_LIFE_GRID">[CURRENT_GRID] Grid</string> <string name="SUPPORT_SITE">Support Portal</string> - <string name="CURRENT_GRID"/> <!-- Set in LLViewerNetwork --> + + <!-- Default Args set in LLViewerNetwork --> + <string name="CURRENT_GRID"/> + <string name="GRID_ADMIN"/> <!-- starting up --> @@ -119,7 +122,7 @@ We are very sorry for the inconvenience.</string> Please go to your account page and answer the security question to reset your password. We are very sorry for the inconvenience.</string> <string name="LoginFailedEmployeesOnly">[CURRENT_GRID] is temporarily closed for maintenance. -Logins are currently restricted to employees only.</string> +Logins are currently restricted to [GRID_ADMIN] employees only.</string> <string name="LoginFailedPremiumOnly">[CURRENT_GRID] logins are temporarily restricted in order to make sure that those in-world have the best possible experience. Freetards with free accounts will not be able to access [CURRENT_GRID] during this time, to make room for those who have paid for [CURRENT_GRID].</string> @@ -2599,7 +2602,7 @@ This feature is currently in Beta. Please add your name to this [http://goo.gl/f <string name="AcctTypeResident">Resident</string> <string name="AcctTypeTrial">Trial</string> <string name="AcctTypeCharterMember">Charter Member</string> - <string name="AcctTypeEmployee">[CURRENT_GRID] Employee</string> + <string name="AcctTypeEmployee">[GRID_ADMIN] Employee</string> <string name="PaymentInfoUsed">Payment Info Used</string> <string name="PaymentInfoOnFile">Payment Info On File</string> <string name="NoPaymentInfoOnFile">No Payment Info On File</string> @@ -2769,7 +2772,7 @@ This feature is currently in Beta. Please add your name to this [http://goo.gl/f <!-- Region/Estate Covenant --> <string name="RegionNoCovenant">There is no Covenant provided for this Estate.</string> - <string name="RegionNoCovenantOtherOwner">There is no Covenant provided for this Estate. The land on this estate is being sold by the Estate owner, not [CURRENT_GRID]. Please contact the Estate Owner for sales details.</string> + <string name="RegionNoCovenantOtherOwner">There is no Covenant provided for this Estate. The land on this estate is being sold by the Estate owner, not [GRID_ADMIN]. Please contact the Estate Owner for sales details.</string> <string name="covenant_last_modified" value="Last Modified: " /> <!-- use value="" to keep the trailing space --> <string name="none_text" value=" (none) " /> <string name="never_text" value=" (never) " />