Improved phrases in service message for started giveaway with credits.
This commit is contained in:
parent
0982aa166a
commit
99f857fbf6
|
@ -1891,6 +1891,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_action_story_mention_unavailable" = "The story where {user} mentioned you is no longer available.";
|
"lng_action_story_mention_unavailable" = "The story where {user} mentioned you is no longer available.";
|
||||||
"lng_action_giveaway_started_group" = "{from} just started a giveaway of Telegram Premium subscriptions to its members.";
|
"lng_action_giveaway_started_group" = "{from} just started a giveaway of Telegram Premium subscriptions to its members.";
|
||||||
"lng_action_giveaway_started" = "{from} just started a giveaway of Telegram Premium subscriptions to its followers.";
|
"lng_action_giveaway_started" = "{from} just started a giveaway of Telegram Premium subscriptions to its followers.";
|
||||||
|
"lng_action_giveaway_credits_started_amount#one" = "{count} Star";
|
||||||
|
"lng_action_giveaway_credits_started_amount#other" = "{count} Stars";
|
||||||
|
"lng_action_giveaway_credits_started_group" = "{from} just started a giveaway of {amount} to its members.";
|
||||||
|
"lng_action_giveaway_credits_started" = "{from} just started a giveaway of {amount} to its followers.";
|
||||||
"lng_action_giveaway_results#one" = "{count} winner of the giveaway was randomly selected by Telegram and received private messages with giftcodes.";
|
"lng_action_giveaway_results#one" = "{count} winner of the giveaway was randomly selected by Telegram and received private messages with giftcodes.";
|
||||||
"lng_action_giveaway_results#other" = "{count} winners of the giveaway were randomly selected by Telegram and received private messages with giftcodes.";
|
"lng_action_giveaway_results#other" = "{count} winners of the giveaway were randomly selected by Telegram and received private messages with giftcodes.";
|
||||||
"lng_action_giveaway_results_some" = "Some winners of the giveaway were randomly selected by Telegram and received private messages with giftcodes.";
|
"lng_action_giveaway_results_some" = "Some winners of the giveaway were randomly selected by Telegram and received private messages with giftcodes.";
|
||||||
|
|
|
@ -5149,15 +5149,30 @@ void HistoryItem::setServiceMessageByAction(const MTPmessageAction &action) {
|
||||||
};
|
};
|
||||||
|
|
||||||
auto prepareGiveawayLaunch = [&](const MTPDmessageActionGiveawayLaunch &action) {
|
auto prepareGiveawayLaunch = [&](const MTPDmessageActionGiveawayLaunch &action) {
|
||||||
|
const auto credits = action.vstars().value_or_empty();
|
||||||
auto result = PreparedServiceText();
|
auto result = PreparedServiceText();
|
||||||
result.links.push_back(fromLink());
|
result.links.push_back(fromLink());
|
||||||
result.text = (_history->peer->isMegagroup()
|
result.text = credits
|
||||||
? tr::lng_action_giveaway_started_group
|
? (_history->peer->isMegagroup()
|
||||||
: tr::lng_action_giveaway_started)(
|
? tr::lng_action_giveaway_credits_started_group
|
||||||
tr::now,
|
: tr::lng_action_giveaway_credits_started)(
|
||||||
lt_from,
|
tr::now,
|
||||||
fromLinkText(), // Link 1.
|
lt_from,
|
||||||
Ui::Text::WithEntities);
|
fromLinkText(), // Link 1.
|
||||||
|
lt_amount,
|
||||||
|
tr::lng_action_giveaway_credits_started_amount(
|
||||||
|
tr::now,
|
||||||
|
lt_count_decimal,
|
||||||
|
float64(credits),
|
||||||
|
Ui::Text::Bold),
|
||||||
|
Ui::Text::WithEntities)
|
||||||
|
: (_history->peer->isMegagroup()
|
||||||
|
? tr::lng_action_giveaway_started_group
|
||||||
|
: tr::lng_action_giveaway_started)(
|
||||||
|
tr::now,
|
||||||
|
lt_from,
|
||||||
|
fromLinkText(), // Link 1.
|
||||||
|
Ui::Text::WithEntities);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue