diff options
| author | Jonathan "Geenz" Goodman <geenz@lindenlab.com> | 2025-12-03 11:50:32 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-03 11:50:32 -0500 |
| commit | bf347d15804c27348c84a55ab763f89b718e8aac (patch) | |
| tree | a112d8ef3e65581fb1fae03a093a75637d134756 /indra/newview/llstartup.cpp | |
| parent | aec7bf19ebffd9d6b60c68e31de723eabd6aa98a (diff) | |
| parent | ad6008a5880dff8691f5fce56b7fbfc5ea8b1626 (diff) | |
Merge pull request #4853 from secondlife/release/2025.08
Release/2025.08
Diffstat (limited to 'indra/newview/llstartup.cpp')
| -rw-r--r-- | indra/newview/llstartup.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index bf7c58a3cb..3786a9b160 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -439,7 +439,26 @@ bool idle_startup() system = osString.substr (begIdx, endIdx - begIdx); system += "Locale"; - LLStringUtil::setLocale (LLTrans::getString(system)); + std::string locale = LLTrans::getString(system); + if (locale != LLStringUtil::getLocale()) // is there a reason to do this on repeat? + { + LLStringUtil::setLocale(locale); + + // Not all locales have AMPM, test it + if (LLStringOps::sAM.empty()) // Might already be overriden from LLAppViewer::init() + { + LLDate datetime(0.0); + std::string val = datetime.toHTTPDateString("%p"); + if (val.empty()) + { + LL_DEBUGS("InitInfo") << "Current locale \"" << locale << "\" " + << "doesn't support AM/PM time format" << LL_ENDL; + // fallback to declarations in strings.xml + LLStringOps::sAM = LLTrans::getString("dateTimeAM"); + LLStringOps::sPM = LLTrans::getString("dateTimePM"); + } + } + } //note: Removing this line will cause incorrect button size in the login screen. -- bao. gTextureList.updateImages(0.01f) ; |
