From 98a4d472bed18e11d71631e7c0cc9abd29b9a5d2 Mon Sep 17 00:00:00 2001
From: Lynx Linden <lynx@lindenlab.com>
Date: Wed, 3 Feb 2010 13:44:13 +0000
Subject: [PATCH] EXT-4898: Changed English language code to "en" on Mac.

Now LLUI::getLanguage() returns a result that is consistent on Mac,
Windows, and Linux. Also, cleaned up some legacy language code.
---
 indra/newview/English.lproj/language.txt |  2 +-
 indra/newview/llmediactrl.cpp            |  4 ++--
 indra/newview/llviewermenu.cpp           | 20 +-------------------
 3 files changed, 4 insertions(+), 22 deletions(-)

diff --git a/indra/newview/English.lproj/language.txt b/indra/newview/English.lproj/language.txt
index bc0aa577f97..2c4c454fdd2 100644
--- a/indra/newview/English.lproj/language.txt
+++ b/indra/newview/English.lproj/language.txt
@@ -1 +1 @@
-en-us
\ No newline at end of file
+en
\ No newline at end of file
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index d464862eedc..3c34d26692d 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -542,9 +542,9 @@ void LLMediaCtrl::navigateToLocalPage( const std::string& subdir, const std::str
 
 	if (! gDirUtilp->fileExists(expanded_filename))
 	{
-		if (language != "en-us")
+		if (language != "en")
 		{
-			expanded_filename = gDirUtilp->findSkinnedFilename("html", "en-us", filename);
+			expanded_filename = gDirUtilp->findSkinnedFilename("html", "en", filename);
 			if (! gDirUtilp->fileExists(expanded_filename))
 			{
 				llwarns << "File " << subdir << delim << filename_in << "not found" << llendl;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index f7f30a51365..3e23ac4a1c8 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -7179,25 +7179,7 @@ void handle_buy_currency_test(void*)
 	LLStringUtil::format_map_t replace;
 	replace["[AGENT_ID]"] = gAgent.getID().asString();
 	replace["[SESSION_ID]"] = gAgent.getSecureSessionID().asString();
-
-	// *TODO: Replace with call to LLUI::getLanguage() after windows-setup
-	// branch merges in. JC
-	std::string language = "en";
-	language = gSavedSettings.getString("Language");
-	if (language.empty() || language == "default")
-	{
-		language = gSavedSettings.getString("InstallLanguage");
-	}
-	if (language.empty() || language == "default")
-	{
-		language = gSavedSettings.getString("SystemLanguage");
-	}
-	if (language.empty() || language == "default")
-	{
-		language = "en";
-	}
-
-	replace["[LANGUAGE]"] = language;
+	replace["[LANGUAGE]"] = LLUI::getLanguage();
 	LLStringUtil::format(url, replace);
 
 	llinfos << "buy currency url " << url << llendl;
-- 
GitLab