summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Guslisty <pguslisty@productengine.com>2010-04-23 07:46:34 +0300
committerPaul Guslisty <pguslisty@productengine.com>2010-04-23 07:46:34 +0300
commit9166e7a8a0e7bf741836c9fa41bca6368f26ec0f (patch)
treea01151fb3ee98bc25a776c684f97bf150a42bfc1
parent52582f2e3eaa175a537d9bd04ee27688d67ae4a8 (diff)
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
-rw-r--r--indra/newview/llviewermessage.cpp19
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml4
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<<OFFER_THROTTLE_TIME;
+
+ arg["APP_NAME"] = LLAppViewer::instance()->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
</string>
+ <!-- System Messages -->
+ <string name="ItemsComingInTooFastFrom">[APP_NAME]: Items coming in too fast from [FROM_NAME], automatic preview disabled for [TIME] seconds</string>
+ <string name="ItemsComingInTooFast">[APP_NAME]: Items coming in too fast, automatic preview disabled for [TIME] seconds</string>
+
<!-- IM system messages -->
<string name="IM_logging_string">-- Instant message logging enabled --</string>
<string name="IM_typing_start_string">[NAME] is typing...</string>