summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-06-02 16:16:35 -0700
committerJames Cook <james@lindenlab.com>2010-06-02 16:16:35 -0700
commit2d7302f9cb2269e7fe22cb927634d99aa5c7a1bb (patch)
treeefa72ea9a9acb9ecbe3e61cebd7830ce0aed23de
parentb34eee98d1cd542777a9fc28b1e1d2e3a0de24e5 (diff)
DEV-50467 You paid (nobody) message when creating group and classified
Also fixes DEV-50470, Attempting to create a group with insufficient funds generates nobody paid you L$-1 notice. Needed to be more clever about which strings to show when partial information is available about the transaction. Reviewed with Leyla.
-rw-r--r--indra/newview/llviewermessage.cpp29
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml3
2 files changed, 29 insertions, 3 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index e4b04b5d4f..9fa9ac626f 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4976,6 +4976,9 @@ static std::string reason_from_transaction_type(S32 transaction_type,
case TRANS_UPLOAD_CHARGE:
return LLTrans::getString("to upload");
+
+ case TRANS_CLASSIFIED_CHARGE:
+ return LLTrans::getString("to publish a classified ad");
// These have no reason to display, but are expected and should not
// generate warnings
@@ -5040,6 +5043,12 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
<< " type " << transaction_type
<< " item " << item_description << LL_ENDL;
+ if (source_id.isNull() && dest_id.isNull())
+ {
+ // this is a pure balance update, no notification required
+ return;
+ }
+
const char* source_type = (is_source_group ? "group" : "agent");
std::string source_slurl =
LLSLURL( source_type, source_id, "inspect").getSLURLString();
@@ -5072,11 +5081,27 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
name_id = dest_id;
if (!reason.empty())
{
- message = LLTrans::getString("you_paid_ldollars", args);
+ if (dest_id.notNull())
+ {
+ message = LLTrans::getString("you_paid_ldollars", args);
+ }
+ else
+ {
+ // transaction fee to the system, eg, to create a group
+ message = LLTrans::getString("you_paid_ldollars_no_name", args);
+ }
}
else
{
- message = LLTrans::getString("you_paid_ldollars_no_reason", args);
+ if (dest_id.notNull())
+ {
+ message = LLTrans::getString("you_paid_ldollars_no_reason", args);
+ }
+ else
+ {
+ // no target, no reason, you just paid money
+ message = LLTrans::getString("you_paid_ldollars_no_info", args);
+ }
}
final_args["MESSAGE"] = message;
notification = "PaymentSent";
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 614b681853..695c6d0793 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3103,7 +3103,8 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="to create a group">to create a group</string>
<string name="to join a group">to join a group</string>
<string name="to upload">to upload</string>
-
+ <string name="to publish a classified ad">to publish a classified ad</string>
+
<string name="giving">Giving L$ [AMOUNT]</string>
<string name="uploading_costs">Uploading costs L$ [AMOUNT]</string>
<string name="this_costs">This costs L$ [AMOUNT]</string>