summaryrefslogtreecommitdiff
path: root/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-12-04 13:11:22 +0800
committerErik Kundiman <erik@megapahit.org>2025-12-04 13:11:22 +0800
commitd9d932f6375df28dbc59088fc09cd986043651d0 (patch)
tree0dae07bf66d2e8b3ad25a1a9ec994b303a5f01f8 /indra/newview/llstartup.cpp
parentdcc927e1d29b2b927ae27f8f50a1dcadb4488c80 (diff)
parent780b5c3bd9a2a97790efc1169817f1fc574f3387 (diff)
Merge branch '2025.08'
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r--indra/newview/llstartup.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index eca5ba82ac..c3c7945763 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -446,7 +446,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) ;