diff options
| author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-09-18 20:39:31 +0300 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-09-19 16:19:27 +0300 |
| commit | acd879477508e8389607d5eeb0e91531fd7703e9 (patch) | |
| tree | a98524ef1b819e044a9cdf679bb157a265ec88c7 /indra | |
| parent | 0fb6dc22ff925ff56b99d137221f3936e51ae34f (diff) | |
#4671 Some locales are missing AM/PM labels
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llstartup.cpp | 21 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/de/strings.xml | 4 |
2 files changed, 22 insertions, 3 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) ; diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index f0945234a6..d7b2ee57a8 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -5074,10 +5074,10 @@ Bitte überprüfen Sie http://status.secondlifegrid.net, um herauszufinden, ob e [MDAY] </string> <string name="dateTimeAM"> - Uhr + AM </string> <string name="dateTimePM"> - Uhr + PM </string> <string name="LocalEstimateUSD"> [AMOUNT] US$ |
