EXT-4898: Convert "en-us" to "en" for url substitutions.

The correct and general fix is to change English.lproj/language.txt.
This fix here is a more targeted and less risky fix at this stage
of the release cycle.
master
Lynx Linden 2010-02-04 09:21:02 +00:00
parent c788986c9e
commit f7120956f5
1 changed files with 10 additions and 1 deletions

View File

@ -145,11 +145,20 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url,
substitution["VERSION_PATCH"] = LLVersionInfo::getPatch();
substitution["VERSION_BUILD"] = LLVersionInfo::getBuild();
substitution["CHANNEL"] = LLVersionInfo::getChannel();
substitution["LANGUAGE"] = LLUI::getLanguage();
substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel();
substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
substitution["SESSION_ID"] = gAgent.getSessionID();
// work out the current language
std::string lang = LLUI::getLanguage();
if (lang == "en-us")
{
// *HACK: the correct fix is to change English.lproj/language.txt,
// but we're late in the release cycle and this is a less risky fix
lang = "en";
}
substitution["LANGUAGE"] = lang;
// find the region ID
LLUUID region_id;
LLViewerRegion *region = gAgent.getRegion();