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コマンドなしで単語だけ送ってもOKです",
"searching": "⏳ 翻訳と例を検索中...",
"examples_header": "<b>例文:</b>",
"translations_header": "<b>翻訳:</b>",
"translation_label": "翻訳",
"category_label": "カテゴリー",
"level_label": "レベル",
@@ -124,6 +125,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}",