mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-13 04:37:11 +02:00
Added phrases for business subscriptions.
This commit is contained in:
parent
27a5ba4681
commit
9824df5f2a
3 changed files with 15 additions and 5 deletions
|
@ -2445,8 +2445,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
"lng_credits_box_out_media#other" = "Do you want to unlock {media} in {chat} for **{count} Stars**?";
|
||||
"lng_credits_box_out_media_user#one" = "Do you want to unlock {media} from {user} for **{count} Star**?";
|
||||
"lng_credits_box_out_media_user#other" = "Do you want to unlock {media} from {user} for **{count} Stars**?";
|
||||
"lng_credits_box_out_subscription#one" = "Do you want to subscribe to **{title}** in **{bot}** for **{count}** star per month?";
|
||||
"lng_credits_box_out_subscription#other" = "Do you want to subscribe to **{title}** in **{bot}** for **{count}** stars per month?";
|
||||
"lng_credits_box_out_subscription_bot#one" = "Do you want to subscribe to **{title}** in **{recipient}** for **{count}** star per month?";
|
||||
"lng_credits_box_out_subscription_bot#other" = "Do you want to subscribe to **{title}** in **{recipient}** for **{count}** stars per month?";
|
||||
"lng_credits_box_out_subscription_business#one" = "Do you want to subscribe to **{title}** from **{recipient}** for **{count}** star per month?";
|
||||
"lng_credits_box_out_subscription_business#other" = "Do you want to subscribe to **{title}** from **{recipient}** for **{count}** stars per month?";
|
||||
"lng_credits_box_out_subscription_confirm#one" = "Subscribe for {emoji} {count} / month";
|
||||
"lng_credits_box_out_subscription_confirm#other" = "Subscribe for {emoji} {count} / month";
|
||||
"lng_credits_box_out_photo" = "a photo";
|
||||
|
@ -2510,6 +2512,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
|
||||
"lng_credits_subscription_row_to" = "Subscription";
|
||||
"lng_credits_subscription_row_to_bot" = "Bot";
|
||||
"lng_credits_subscription_row_to_business" = "Business";
|
||||
"lng_credits_subscription_row_from" = "Subscribed";
|
||||
|
||||
"lng_credits_subscription_row_next_on" = "Renews";
|
||||
|
|
|
@ -1331,10 +1331,15 @@ void AddSubscriptionEntryTable(
|
|||
st::giveawayGiftCodeTable),
|
||||
st::giveawayGiftCodeTableMargin);
|
||||
const auto peerId = PeerId(s.barePeerId);
|
||||
const auto user = peerIsUser(peerId)
|
||||
? controller->session().data().peer(peerId)->asUser()
|
||||
: nullptr;
|
||||
AddTableRow(
|
||||
table,
|
||||
(!s.title.isEmpty() && peerIsUser(peerId))
|
||||
(!s.title.isEmpty() && user && user->botInfo)
|
||||
? tr::lng_credits_subscription_row_to_bot()
|
||||
: (!s.title.isEmpty() && user && !user->botInfo)
|
||||
? tr::lng_credits_subscription_row_to_business()
|
||||
: tr::lng_credits_subscription_row_to(),
|
||||
controller,
|
||||
peerId);
|
||||
|
|
|
@ -194,12 +194,14 @@ void AddTerms(
|
|||
|
||||
const auto bot = session->data().user(form->botId);
|
||||
if (form->invoice.subscriptionPeriod) {
|
||||
return tr::lng_credits_box_out_subscription(
|
||||
return (bot->botInfo
|
||||
? tr::lng_credits_box_out_subscription_bot
|
||||
: tr::lng_credits_box_out_subscription_business)(
|
||||
lt_count,
|
||||
rpl::single(form->invoice.amount) | tr::to_count(),
|
||||
lt_title,
|
||||
rpl::single(TextWithEntities{ form->title }),
|
||||
lt_bot,
|
||||
lt_recipient,
|
||||
rpl::single(TextWithEntities{ bot->name() }),
|
||||
Ui::Text::RichLangValue);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue