WIP: Locale strings

This commit is contained in:
2023-08-29 16:32:37 +02:00
parent 029a965860
commit 9cda8859da
14 changed files with 214 additions and 78 deletions

View File

@@ -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