feat: multiple translations with context, improved task examples

- Add WordTranslation model for storing multiple translations per word
- AI generates translations with example sentences and their translations
- Show example usage after answering tasks (learning + interface language)
- Save translations to word_translations table when adding words from tasks
- Improve word exclusion in new_words mode (stronger prompt + client filtering)
- Add migration for word_translations table

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-06 21:29:41 +03:00
parent 63e2615243
commit d937b37a3b
10 changed files with 543 additions and 30 deletions

View File

@@ -58,6 +58,7 @@
"prompt": "Отправь слово, которое хочешь добавить:\nНапример: <code>/add elephant</code>\n\nИли просто отправь слово без команды!",
"searching": "⏳ Ищу перевод и примеры...",
"examples_header": "<b>Примеры:</b>",
"translations_header": "<b>Переводы:</b>",
"translation_label": "Перевод",
"category_label": "Категория",
"level_label": "Уровень",
@@ -132,6 +133,7 @@
"add_word_btn": " Добавить слово",
"word_added": "✅ Слово '{word}' добавлено в словарь!",
"word_already_exists": "Слово '{word}' уже в словаре",
"example_label": "Пример",
"cancelled": "Отменено. Можешь вернуться к заданиям командой /task.",
"finish_title": "{emoji} <b>Задание завершено!</b>",
"correct_of": "Правильных ответов: <b>{correct}</b> из {total}",