feat: restructure menu and add file import
- Consolidate "Add word" menu with submenu (Manual, Thematic, Import) - Add file import support (.txt, .md) with AI batch translation - Add vocabulary pagination with navigation buttons - Add "Add word" button in tasks for new words mode - Fix undefined variables bug in vocabulary confirm handler - Add localization keys for add_menu in ru/en/ja 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,13 @@ async def cmd_words(message: Message, state: FSMContext):
|
||||
return
|
||||
|
||||
theme = command_parts[1].strip()
|
||||
await generate_words_for_theme(message, state, theme, message.from_user.id)
|
||||
|
||||
|
||||
async def generate_words_for_theme(message: Message, state: FSMContext, theme: str, user_id: int):
|
||||
"""Генерация слов по теме (вызывается из cmd_words и callback)"""
|
||||
async with async_session_maker() as session:
|
||||
user = await UserService.get_user_by_telegram_id(session, user_id)
|
||||
|
||||
# Показываем индикатор генерации
|
||||
lang = user.language_interface or 'ru'
|
||||
|
||||
Reference in New Issue
Block a user