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:
@@ -5,15 +5,32 @@
|
||||
"task": "🧠 Task",
|
||||
"practice": "💬 Practice",
|
||||
"words": "🎯 Thematic words",
|
||||
"import": "📖 Import from text",
|
||||
"import": "📖 Import",
|
||||
"stats": "📊 Stats",
|
||||
"settings": "⚙️ Settings",
|
||||
"below": "Main menu below ⤵️"
|
||||
},
|
||||
"add_menu": {
|
||||
"title": "➕ <b>Add words</b>\n\nChoose method:",
|
||||
"manual": "📝 Manual",
|
||||
"thematic": "🎯 Thematic words",
|
||||
"import": "📖 Import"
|
||||
},
|
||||
"import_menu": {
|
||||
"title": "📖 <b>Import words</b>\n\nChoose import method:",
|
||||
"from_text": "📝 From text",
|
||||
"from_file": "📄 From file (.txt, .md)",
|
||||
"file_hint": "📄 <b>Import from file</b>\n\nSend a .txt or .md file with your words.\n\n<b>Formats:</b>\n• One word per line (AI will translate)\n• <code>word - translation</code>\n• <code>word : translation</code>"
|
||||
},
|
||||
"common": {
|
||||
"start_first": "First run /start to register",
|
||||
"translation": "Translation"
|
||||
},
|
||||
"lang": {
|
||||
"ru": "Russian",
|
||||
"en": "English",
|
||||
"ja": "Japanese"
|
||||
},
|
||||
"import": {
|
||||
"title": "📖 <b>Import words from text</b>",
|
||||
"desc": "Send me text in your learning language, and I will extract useful words to study.",
|
||||
@@ -56,7 +73,9 @@
|
||||
"header": "<b>📚 Your vocabulary:</b>",
|
||||
"accuracy_inline": "({n}% accuracy)",
|
||||
"shown_last": "<i>Showing last 10 of {n} words</i>",
|
||||
"total": "<i>Total words: {n}</i>"
|
||||
"total": "<i>Total words: {n}</i>",
|
||||
"page_info": "\n📖 Page {page} of {total} • Total words: {count}",
|
||||
"close_btn": "❌ Close"
|
||||
},
|
||||
"practice": {
|
||||
"start_text": "💬 <b>Dialogue practice with AI</b>\n\nChoose a scenario:\n\n• AI will play a role\n• You can chat in English\n• AI will correct your mistakes\n• Use /stop to finish\n\nPick a scenario:",
|
||||
@@ -92,6 +111,12 @@
|
||||
"go_words_hint": "Use /words [topic] for word sets"
|
||||
},
|
||||
"tasks": {
|
||||
"choose_mode": "🧠 <b>Choose task mode:</b>",
|
||||
"mode_vocabulary": "📚 Words from vocabulary",
|
||||
"mode_new_words": "✨ New words",
|
||||
"generating_new": "🔄 Generating new words...",
|
||||
"generate_failed": "❌ Failed to generate words. Try again later.",
|
||||
"translate_to": "Translate to {lang_name}",
|
||||
"no_words": "📚 You don't have words to practice yet!\n\nAdd some words with /add and come back.",
|
||||
"stopped": "Exercises stopped. Use /task to start again.",
|
||||
"finished": "Exercises finished. Use /task to start again.",
|
||||
@@ -104,6 +129,9 @@
|
||||
"right_answer": "Right answer",
|
||||
"next_btn": "➡️ Next task",
|
||||
"stop_btn": "🔚 Stop",
|
||||
"add_word_btn": "➕ Add word",
|
||||
"word_added": "✅ Word '{word}' added to vocabulary!",
|
||||
"word_already_exists": "Word '{word}' is already in vocabulary",
|
||||
"cancelled": "Cancelled. You can return to tasks with /task.",
|
||||
"finish_title": "{emoji} <b>Task finished!</b>",
|
||||
"correct_of": "Correct answers: <b>{correct}</b> of {total}",
|
||||
@@ -219,6 +247,18 @@
|
||||
"import_extra": {
|
||||
"cancelled": "❌ Import cancelled."
|
||||
},
|
||||
"import_file": {
|
||||
"unsupported_format": "❌ Unsupported file format.\n\nSupported: .txt, .md\n\nFile format:\n<code>word - translation</code>\n<code>word : translation</code>",
|
||||
"too_large": "❌ File is too large (max 1 MB)",
|
||||
"encoding_error": "❌ Encoding error. Make sure the file is UTF-8",
|
||||
"download_error": "❌ Failed to download file. Try again",
|
||||
"no_words_found": "❌ No words found in file.\n\nMake sure the format is correct:\n<code>word - translation</code>\n<code>word : translation</code>",
|
||||
"truncated": "⚠️ File contains more than {n} words. Importing first {n}.",
|
||||
"found_header": "📄 <b>Words found in file: {n}</b>",
|
||||
"choose_action": "Choose action:",
|
||||
"add_all_btn": "✅ Add all ({n})",
|
||||
"translating": "🔄 Translating words with AI..."
|
||||
},
|
||||
"level_test_extra": {
|
||||
"generating": "🔄 Generating questions...",
|
||||
"generate_failed": "❌ Failed to generate test. Try later or use /settings to set level manually.",
|
||||
|
||||
Reference in New Issue
Block a user