From 978d62e9e75d52a3443db36fd02062c3dbf4040a Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Thu, 8 Apr 2010 18:56:02 +0300 Subject: Fixed normal bug EXT-6751 (Wrong "You paid" text in notification when creating a classified). - Bug was caused by absence of localizable string for "You paid..." notifications without name and reason simultaneously. Added such string("you_paid_ldollars_no_info") to strings.xml and used it in code. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/206/ --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 7 ++++--- indra/newview/skins/default/xui/en/strings.xml | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 2b41a83ba5..ef3ee32f11 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4714,11 +4714,12 @@ void process_money_balance_reply( LLMessageSystem* msg, void** ) if(boost::regex_match(desc, matches, expr)) { // Name of full localizable notification string - // there are three types of this string- with name of receiver and reason of payment, - // without name and without reason (but not simultaneously) + // there are four types of this string- with name of receiver and reason of payment, + // without name and without reason (both may also be absent simultaneously). // example of string without name - You paid L$100 to create a group. // example of string without reason - You paid Smdby Linden L$100. // example of string with reason and name - You paid Smbdy Linden L$100 for a land access pass. + // example of string with no info - You paid L$50. std::string line = "you_paid_ldollars_no_name"; // arguments of string which will be in notification @@ -4739,7 +4740,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** ) std::string reason = std::string(matches[3]); if (reason.empty()) { - line = "you_paid_ldollars_no_reason"; + line = name.empty() ? "you_paid_ldollars_no_info" : "you_paid_ldollars_no_reason"; } else { diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 0c73b8d769..27d11ead7e 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3056,6 +3056,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. [NAME] paid you L$[AMOUNT] You paid [NAME] L$[AMOUNT] [REASON]. + You paid L$[AMOUNT]. You paid [NAME] L$[AMOUNT]. You paid L$[AMOUNT] [REASON]. for a parcel of land -- cgit v1.2.3