Remove sender name from gift offer text.

This commit is contained in:
John Preston
2026-02-27 14:37:09 +04:00
parent f1199852a2
commit d343431e75
3 changed files with 5 additions and 14 deletions
+1 -1
View File
@@ -2418,7 +2418,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_action_gift_premium_about" = "Subscription for exclusive Telegram features."; "lng_action_gift_premium_about" = "Subscription for exclusive Telegram features.";
"lng_action_gift_refunded" = "This gift was downgraded because a request to refund the payment related to this gift was made, and the money was returned."; "lng_action_gift_refunded" = "This gift was downgraded because a request to refund the payment related to this gift was made, and the money was returned.";
"lng_action_gift_got_ton" = "Use TON to suggest posts to channels."; "lng_action_gift_got_ton" = "Use TON to suggest posts to channels.";
"lng_action_gift_offer" = "{user} offered you {cost} for {name}."; "lng_action_gift_offer_incoming" = "An offer to buy this gift for {amount}.";
"lng_action_gift_offer_you" = "You offered {cost} for {name}."; "lng_action_gift_offer_you" = "You offered {cost} for {name}.";
"lng_action_gift_offer_state_expires" = "This offer expires in {time}."; "lng_action_gift_offer_state_expires" = "This offer expires in {time}.";
"lng_action_gift_offer_time_large" = "{hours} h"; "lng_action_gift_offer_time_large" = "{hours} h";
@@ -6582,15 +6582,10 @@ void HistoryItem::setServiceMessageByAction(const MTPmessageAction &action) {
giftName, giftName,
tr::marked); tr::marked);
} else { } else {
result.links.push_back(fromLink()); result.text = tr::lng_action_gift_offer_incoming(
result.text = tr::lng_action_gift_offer(
tr::now, tr::now,
lt_user, lt_amount,
fromLinkText(),
lt_cost,
cost, cost,
lt_name,
giftName,
tr::marked); tr::marked);
} }
}, [](const MTPDstarGift &) { }, [](const MTPDstarGift &) {
@@ -656,14 +656,10 @@ TextWithEntities GiftServiceBox::subtitle() {
giftName, giftName,
tr::marked)); tr::marked));
} else { } else {
text.append(tr::lng_action_gift_offer( text.append(tr::lng_action_gift_offer_incoming(
tr::now, tr::now,
lt_user, lt_amount,
tr::bold(_parent->data()->from()->shortName()),
lt_cost,
cost, cost,
lt_name,
giftName,
tr::marked)); tr::marked));
} }
text.append(u"\n\n"_q); text.append(u"\n\n"_q);