feat: JLPT levels for Japanese, custom practice scenarios, UI improvements
- Add separate level systems: CEFR (A1-C2) for European languages, JLPT (N5-N1) for Japanese - Store levels per language in new `levels_by_language` JSON field - Add custom scenario option in AI practice mode - Show action buttons after practice ends (new dialogue, tasks, words) - Fix level display across all handlers to use correct level system - Add Alembic migration for levels_by_language field - Update all locale files (ru, en, ja) with new keys 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ from database.models import WordSource
|
||||
from services.user_service import UserService
|
||||
from services.vocabulary_service import VocabularyService
|
||||
from services.ai_service import ai_service
|
||||
from utils.i18n import t
|
||||
from utils.i18n import t, get_user_lang
|
||||
|
||||
router = Router()
|
||||
|
||||
@@ -58,10 +58,8 @@ async def process_word_addition(message: Message, state: FSMContext, word: str):
|
||||
# Проверяем, есть ли уже такое слово
|
||||
existing_word = await VocabularyService.find_word(session, user.id, word)
|
||||
if existing_word:
|
||||
await message.answer(
|
||||
f"Слово '<b>{word}</b>' уже есть в твоём словаре!\n"
|
||||
f"Перевод: {existing_word.word_translation}"
|
||||
)
|
||||
lang = get_user_lang(user)
|
||||
await message.answer(t(lang, 'add.exists', word=word, translation=existing_word.word_translation))
|
||||
await state.clear()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user