WIP: Locale strings
This commit is contained in:
@@ -35,14 +35,19 @@ async def command_setup(app: PyroClient, message: Message):
|
||||
answer_type = await listen_message(app, message.chat.id, 300)
|
||||
|
||||
if answer_type is None or answer_type.text == "/cancel":
|
||||
await message.reply_text("Cancelled.", reply_markup=ReplyKeyboardRemove())
|
||||
await message.reply_text(
|
||||
app._("cancelled", "messages", locale=user.locale),
|
||||
reply_markup=ReplyKeyboardRemove(),
|
||||
)
|
||||
return
|
||||
|
||||
if answer_type.location is None and answer_type.text not in [
|
||||
"Search by location name",
|
||||
]:
|
||||
await answer_type.reply_text(
|
||||
"Please, select a valid option using keyboard provided. Use /cancel if you want to cancel this operation."
|
||||
app._("selection_invalid", "messages", locale=user.locale).format(
|
||||
cancel_notice=app._("cancel", "messages", locale=user.locale)
|
||||
)
|
||||
)
|
||||
continue
|
||||
|
||||
|
Reference in New Issue
Block a user