summaryrefslogtreecommitdiff
path: root/indra/newview/llweb.cpp
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2010-02-04 09:21:02 +0000
committerLynx Linden <lynx@lindenlab.com>2010-02-04 09:21:02 +0000
commitf7120956f50afb3ffae269819ffbd7f07b1ac85b (patch)
tree9a26222dba7f7d02882e76dd8fc32c631a5cabcf /indra/newview/llweb.cpp
parentc788986c9ed282f5e8afc8b5352e61986cdbc209 (diff)
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.
Diffstat (limited to 'indra/newview/llweb.cpp')
-rw-r--r--indra/newview/llweb.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index 7866f735c5..3def17f33c 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -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();