summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llviewermessage.cpp21
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml3
2 files changed, 22 insertions, 2 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 361f4e2326..b90e3dcda4 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4458,20 +4458,37 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
// have missed something during an event.
// *TODO: Translate
LLSD args;
- args["MESSAGE"] = desc;
+
// this is a marker to retrieve avatar name from server message:
// "<avatar name> paid you L$"
const std::string marker = "paid you L$";
+ args["MESSAGE"] = desc;
+
// extract avatar name from system message
- std::string name = desc.substr(0, desc.find(marker, 0));
+ S32 marker_pos = desc.find(marker, 0);
+
+ std::string base_name = desc.substr(0, marker_pos);
+
+ std::string name = base_name;
LLStringUtil::trim(name);
// if name extracted and name cache contains avatar id send loggable notification
LLUUID from_id;
if(name.size() > 0 && gCacheName->getUUID(name, from_id))
{
+ //description always comes not localized. lets fix this
+
+ //ammount paid
+ std::string ammount = desc.substr(marker_pos + marker.length(),desc.length() - marker.length() - marker_pos);
+
+ //reform description
+ std::string paid_you = LLTrans::getString("paid_you_ldollars");
+ std::string new_description = base_name + paid_you + ammount;
+
+ args["MESSAGE"] = new_description;
+
args["NAME"] = name;
LLSD payload;
payload["from_id"] = from_id;
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 1eaf77c328..48fa5dd44f 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3015,4 +3015,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="unread_chat_multiple">
[SOURCES] have said something new
</string>"
+
+ <string name="paid_you_ldollars">"paid you L$"</string>"
+
</strings>