summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorYuri Chebotarev <ychebotarev@productengine.com>2010-03-15 12:04:30 +0200
committerYuri Chebotarev <ychebotarev@productengine.com>2010-03-15 12:04:30 +0200
commitbc1f01c9488cb56a97156d0ff69ce73f3f5684e6 (patch)
treed3efa79b6f53f6e317eebaf567212f29a91d3dbe /indra/newview
parent641757e7c1b2bae59b3901d3f0bfd33ce2166f23 (diff)
fix for EXT-5989 [HARD CODED]. ".... paid you...... L$... " - message needs translation
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-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>