Enhance Russian localization and update message formatting
- Added a new payment agreement clause in the Russian localization file, clarifying user consent for payments. - Updated message formatting in the contact addition and subscription processes to support HTML parsing, improving message presentation and user experience. - Incorporated the new payment agreement into the subscription flow, ensuring users are informed about their consent to the terms.
This commit is contained in:
parent
4004a73888
commit
20b5c9ada4
@ -63,6 +63,8 @@ agreement =
|
||||
- подтверждаете согласие на обработку персональных данных согласно <a href='{ $privacyUrl }'>Политике конфиденциальности</a></i>
|
||||
share-phone-agreement =
|
||||
<i> Нажимая кнопку <b>«Отправить номер телефона»</b></i>,
|
||||
payment-agreement =
|
||||
Совершая оплату, вы соглашаетесь с <a href='{ $offerUrl }'>Публичной офертой</a>
|
||||
|
||||
|
||||
# Приветственные сообщения
|
||||
@ -105,7 +107,7 @@ msg-share-bot =
|
||||
# Системные сообщения
|
||||
msg-cancel = ❌ Операция отменена
|
||||
msg-unhandled = ❓ Неизвестная команда. Попробуйте /start
|
||||
msg-cancel-operation = Для отмены операции используйте команду /cancel
|
||||
msg-cancel-operation = <i>Для отмены операции используйте команду /cancel</i>
|
||||
|
||||
# Ошибки
|
||||
err-generic = ⚠️ Что-то пошло не так. Попробуйте еще раз через несколько секунд
|
||||
|
||||
@ -42,6 +42,9 @@ export async function addContact(conversation: Conversation<Context, Context>, c
|
||||
await conversation.external(({ t }) =>
|
||||
combine(t('msg-send-client-contact-or-phone'), t('msg-cancel-operation')),
|
||||
),
|
||||
{
|
||||
parse_mode: 'HTML',
|
||||
},
|
||||
);
|
||||
|
||||
// Ждём первое сообщение: контакт или текст с номером
|
||||
|
||||
@ -66,7 +66,7 @@ export async function subscription(conversation: Conversation<Context, Context>,
|
||||
return combine(statusLine, fmt`${i}${t('msg-cancel-operation')}${i}`.text);
|
||||
}),
|
||||
),
|
||||
{ reply_markup: keyboard },
|
||||
{ parse_mode: 'HTML', reply_markup: keyboard },
|
||||
);
|
||||
|
||||
// ждём выбора
|
||||
@ -95,6 +95,18 @@ export async function subscription(conversation: Conversation<Context, Context>,
|
||||
month: '2-digit',
|
||||
year: 'numeric',
|
||||
});
|
||||
|
||||
const agreementText = await conversation.external(({ t }) => {
|
||||
return t('payment-agreement', {
|
||||
offerUrl: env.OFFER_URL,
|
||||
privacyUrl: env.PRIVACY_URL,
|
||||
});
|
||||
});
|
||||
|
||||
await ctx.reply(agreementText, {
|
||||
parse_mode: 'HTML',
|
||||
});
|
||||
|
||||
return ctx.replyWithInvoice(
|
||||
'Оплата Pro доступа',
|
||||
combine(
|
||||
@ -110,6 +122,7 @@ export async function subscription(conversation: Conversation<Context, Context>,
|
||||
},
|
||||
],
|
||||
{
|
||||
protect_content: true,
|
||||
provider_token: env.BOT_PROVIDER_TOKEN,
|
||||
start_parameter: 'get_access',
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user