FIRE-16709: Bypass FSEnabledLanguages for llGetAgentLanguage
parent
d693d7247c
commit
d051a4afeb
|
|
@ -293,7 +293,10 @@ void LLUI::getMousePositionLocal(const LLView* viewp, S32 *x, S32 *y)
|
|||
// language follows the OS language. In all cases the user can override
|
||||
// the language manually in preferences. JC
|
||||
// static
|
||||
std::string LLUI::getLanguage()
|
||||
// <FS:Ansariel> FIRE-16709: Bypass FSEnabledLanguages for llGetAgentLanguage
|
||||
//std::string LLUI::getLanguage()
|
||||
std::string LLUI::getLanguage(bool ignore_enabled_languages /*= false*/)
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
std::string language = "en";
|
||||
if (sSettingGroups["config"])
|
||||
|
|
@ -313,6 +316,11 @@ std::string LLUI::getLanguage()
|
|||
}
|
||||
|
||||
// <FS:Ansariel> Limit available languages
|
||||
if (ignore_enabled_languages)
|
||||
{
|
||||
return language;
|
||||
}
|
||||
|
||||
bool language_enabled = false;
|
||||
LLSD enabled_languages = sSettingGroups["config"]->getLLSD("FSEnabledLanguages");
|
||||
for (LLSD::array_const_iterator it = enabled_languages.beginArray(); it != enabled_languages.endArray(); ++it)
|
||||
|
|
|
|||
|
|
@ -262,7 +262,10 @@ public:
|
|||
|
||||
// Return the ISO639 language name ("en", "ko", etc.) for the viewer UI.
|
||||
// http://www.loc.gov/standards/iso639-2/php/code_list.php
|
||||
static std::string getLanguage();
|
||||
// <FS:Ansariel> FIRE-16709: Bypass FSEnabledLanguages for llGetAgentLanguage
|
||||
//static std::string getLanguage();
|
||||
static std::string getLanguage(bool ignore_enabled_languages = false);
|
||||
// </FS:Ansariel>
|
||||
|
||||
//helper functions (should probably move free standing rendering helper functions here)
|
||||
static LLView* getRootView() { return sRootView; }
|
||||
|
|
|
|||
|
|
@ -66,7 +66,10 @@ bool LLAgentLanguage::update()
|
|||
|
||||
if (!url.empty())
|
||||
{
|
||||
std::string language = LLUI::getLanguage();
|
||||
// <FS:Ansariel> FIRE-16709: Bypass FSEnabledLanguages for llGetAgentLanguage
|
||||
//std::string language = LLUI::getLanguage();
|
||||
std::string language = LLUI::getLanguage(true);
|
||||
// </FS:Ansariel>
|
||||
|
||||
body["language"] = language;
|
||||
body["language_is_public"] = gSavedSettings.getBOOL("LanguageIsPublic");
|
||||
|
|
|
|||
Loading…
Reference in New Issue