Skip to content

Commit

Permalink
Update language options for creating inline keyboard in the bot windo…
Browse files Browse the repository at this point in the history
…ws module, changing the button text from "Английский" to "English" and "Отключиться" to "Disconnect".
  • Loading branch information
nessshon committed Nov 25, 2023
1 parent 8174a4f commit 44c6f82
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions example/bot/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def select_language_window(event_from_user: User, atc_manager: ATCManager,
# Code for creating inline keyboard with language options
reply_markup = Markup(inline_keyboard=[
[Button(text="Русский", callback_data="ru"),
Button(text="Английский", callback_data="en")]
Button(text="English", callback_data="en")]
])

# Sending the message and updating user state
Expand Down Expand Up @@ -64,8 +64,9 @@ async def main_menu_window(atc_manager: ATCManager, app_wallet: AppWallet,
)

# Code for creating inline keyboard with disconnect option
button_text = "Отключиться" if atc_manager.user.language_code == "ru" else "Disconnect"
reply_markup = Markup(inline_keyboard=[
[Button(text="Отключиться", callback_data="disconnect")],
[Button(text=button_text, callback_data="disconnect")],
])

# Sending the message and updating user state
Expand Down

0 comments on commit 44c6f82

Please sign in to comment.