From eacd9a30bb971b9f84222c67dc54af111cb7918a Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 16 Jul 2021 18:08:08 +0300 Subject: SL-15574 If login response provides ISO8601 time, convert to local --- indra/newview/llstartup.cpp | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index c5d5be3509..3cbcdce042 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1075,11 +1075,37 @@ bool idle_startup() std::string message_id = response["message_id"]; std::string message; // actual string to show the user - if(!message_id.empty() && LLTrans::findString(message, message_id, response["message_args"])) - { - // message will be filled in with the template and arguments - } - else if(!message_response.empty()) + bool localized_by_id = false; + if(!message_id.empty()) + { + LLSD message_args = response["message_args"]; + if (message_args.has("TIME") + && (message_id == "LoginFailedAcountSuspended" + || message_id == "LoginFailedAccountMaintenance")) + { + LLDate date; + std::string time_string; + if (date.fromString(message_args["TIME"].asString())) + { + LLSD args; + args["datetime"] = (S32)date.secondsSinceEpoch(); + LLTrans::findString(time_string, "LocalTime", args); + } + else + { + time_string = message_args["TIME"].asString() + " " + LLTrans::getString("PacificTime"); + } + + message_args["TIME"] = time_string; + } + // message will be filled in with the template and arguments + if (LLTrans::findString(message, message_id, message_args)) + { + localized_by_id = true; + } + } + + if(!localized_by_id && !message_response.empty()) { // *HACK: "no_inventory_host" sent as the message itself. // Remove this clause when server is sending message_id as well. -- cgit v1.2.3 From 8a14d895826e6f9465da2ae3d7a007401b430041 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 19 Jul 2021 21:54:49 +0300 Subject: SL-15592 Emergency login failure dialog Server message by id "LoginFailure" was pulling in header instead of a message --- indra/newview/llstartup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 3cbcdce042..5ae1d09007 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1062,7 +1062,7 @@ bool idle_startup() { // Generic failure message std::ostringstream emsg; - emsg << LLTrans::getString("LoginFailed") << "\n"; + emsg << LLTrans::getString("LoginFailedHeader") << "\n"; if(LLLoginInstance::getInstance()->authFailure()) { LL_INFOS("LLStartup") << "Login failed, LLLoginInstance::getResponse(): " -- cgit v1.2.3 From 3c215ee885f846f4ab4923c03b51f1b2203394af Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Thu, 5 May 2022 18:57:03 +0300 Subject: SL-17356 Viewer changes for Premium Plus support --- indra/newview/llstartup.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index dda2bfa4f1..2c0382309d 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -3345,12 +3345,6 @@ bool init_benefits(LLSD& response) succ = false; } - // FIXME PREMIUM - for testing if login does not yet provide Premium Plus. Should be removed thereafter. - //if (succ && !LLAgentBenefitsMgr::has("Premium Plus")) - //{ - // LLAgentBenefitsMgr::init("Premium Plus", packages_sd["Premium"]["benefits"]); - // llassert(LLAgentBenefitsMgr::has("Premium Plus")); - //} return succ; } -- cgit v1.2.3