Name crafted with a separate lang key.

This commit is contained in:
John Preston
2026-02-03 13:04:00 +04:00
parent 026b4df014
commit b2169ff7d7
4 changed files with 10 additions and 3 deletions
+1
View File
@@ -2350,6 +2350,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_action_gift_self_auction" = "You've successfully bought a gift in the auction for {cost}.";
"lng_action_gift_auction_won" = "You won the auction with a bid of {cost}.";
"lng_action_gift_self_subtitle" = "Saved Gift";
"lng_action_gift_crafted_subtitle" = "Crafted Gift";
"lng_action_gift_self_about#one" = "Display this gift on your page or convert it to **{count}** Star.";
"lng_action_gift_self_about#other" = "Display this gift on your page or convert it to **{count}** Stars.";
"lng_action_gift_self_about_unique" = "You can display this gift on your page or turn it into unique collectible and send to others.";
+3 -1
View File
@@ -481,7 +481,9 @@ auto GenerateGiftMedia(
tr::bold);
}, [&](const GiftTypeStars &gift) {
return recipient->isSelf()
? tr::lng_action_gift_self_subtitle(tr::now, tr::bold)
? ((gift.info.unique && gift.info.unique->crafted)
? tr::lng_action_gift_crafted_subtitle(tr::now, tr::bold)
: tr::lng_action_gift_self_subtitle(tr::now, tr::bold))
: tr::lng_action_gift_got_subtitle(
tr::now,
lt_user,
@@ -361,7 +361,9 @@ auto GenerateUniqueGiftMedia(
const auto peer = parent->history()->peer;
pushText(
tr::bold(peer->isSelf()
? tr::lng_action_gift_self_subtitle(tr::now)
? (gift->crafted
? tr::lng_action_gift_crafted_subtitle(tr::now)
: tr::lng_action_gift_self_subtitle(tr::now))
: peer->isServiceUser()
? tr::lng_gift_link_label_gift(tr::now)
: (outgoing
@@ -1648,7 +1648,9 @@ void GenericCreditsEntryBody(
: (isStarGift && !starGiftCanManage)
? tr::lng_gift_link_label_gift(tr::now)
: giftToSelf
? tr::lng_action_gift_self_subtitle(tr::now)
? ((uniqueGift && uniqueGift->crafted)
? tr::lng_action_gift_crafted_subtitle(tr::now)
: tr::lng_action_gift_self_subtitle(tr::now))
: e.gift
? tr::lng_credits_box_history_entry_gift_name(tr::now)
: (peer && !e.reaction)