diff options
Diffstat (limited to 'indra/newview/llstartup.cpp')
| -rw-r--r-- | indra/newview/llstartup.cpp | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index cec34635f6..59d97943e3 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -458,6 +458,32 @@ bool idle_startup() LLStringOps::sAM = LLTrans::getString("dateTimeAM"); LLStringOps::sPM = LLTrans::getString("dateTimePM"); } + else + { + std::wstring utf16str = ll_convert<std::wstring>(val); + if (utf16str.size() > 4) + { + LL_DEBUGS("InitInfo") << "Current locale \"" << locale << "\" " + << "has impracitcally long AM/PM time format" << LL_ENDL; + // fallback to declarations in strings.xml + LLStringOps::sAM = LLTrans::getString("dateTimeAM"); + LLStringOps::sPM = LLTrans::getString("dateTimePM"); + } + } + } + + // Some locales (as well some of our own dateTimeAM/PM) return long + // strings for AM/PM which aren't practical to display in the UI. + // Hardcode to "AM"/"PM" in those cases. + std::wstring utf16str = ll_convert<std::wstring>(LLStringOps::sAM); + if (utf16str.size() > 4) + { + LLStringOps::sAM = "AM"; + } + utf16str = ll_convert<std::wstring>(LLStringOps::sPM); + if (utf16str.size() > 4) + { + LLStringOps::sPM = "PM"; } } @@ -2560,9 +2586,9 @@ void release_notes_coro(const std::string url) LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("releaseNotesCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("releaseNotesCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setHeadersOnly(true); // only making sure it isn't 404 or something like that |
