From 9166e7a8a0e7bf741836c9fa41bca6368f26ec0f Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Fri, 23 Apr 2010 07:46:34 +0300 Subject: Fixed normal bug EXT-6651 ([HARDCODE] System message in Nearby Chat window appears in EN) - Added instead of hardcoded string two strings to the strings.xml Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/294/ --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 19 ++++++++++++------- indra/newview/skins/default/xui/en/strings.xml | 4 ++++ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d75e55f259..ec5eb658f6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1035,21 +1035,26 @@ bool check_offer_throttle(const std::string& from_name, bool check_only) { // Use the name of the last item giver, who is probably the person // spamming you. - std::ostringstream message; - message << LLAppViewer::instance()->getSecondLifeTitle(); + + LLStringUtil::format_map_t arg; + std::string log_msg; + std::ostringstream time ; + time<getSecondLifeTitle(); + arg["TIME"] = time.str(); + if (!from_name.empty()) { - message << ": Items coming in too fast from " << from_name; + arg["FROM_NAME"] = from_name; + log_msg = LLTrans::getString("ItemsComingInTooFastFrom", arg); } else { - message << ": Items coming in too fast"; + log_msg = LLTrans::getString("ItemsComingInTooFast", arg); } - message << ", automatic preview disabled for " - << OFFER_THROTTLE_TIME << " seconds."; //this is kinda important, so actually put it on screen - std::string log_msg = message.str(); LLSD args; args["MESSAGE"] = log_msg; LLNotificationsUtil::add("SystemMessage", args); diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 023aba8d7b..ec41703979 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2933,6 +2933,10 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Failed to start viewer + + [APP_NAME]: Items coming in too fast from [FROM_NAME], automatic preview disabled for [TIME] seconds + [APP_NAME]: Items coming in too fast, automatic preview disabled for [TIME] seconds + -- Instant message logging enabled -- [NAME] is typing... -- cgit v1.2.3