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.",
|
||||
|
||||
@@ -5,15 +5,32 @@
|
||||
"task": "🧠 課題",
|
||||
"practice": "💬 練習",
|
||||
"words": "🎯 テーマ別単語",
|
||||
"import": "📖 テキストからインポート",
|
||||
"import": "📖 インポート",
|
||||
"stats": "📊 統計",
|
||||
"settings": "⚙️ 設定",
|
||||
"below": "メインメニューは下にあります ⤵️"
|
||||
},
|
||||
"add_menu": {
|
||||
"title": "➕ <b>単語を追加</b>\n\n方法を選択:",
|
||||
"manual": "📝 手動",
|
||||
"thematic": "🎯 テーマ別単語",
|
||||
"import": "📖 インポート"
|
||||
},
|
||||
"import_menu": {
|
||||
"title": "📖 <b>単語のインポート</b>\n\nインポート方法を選択:",
|
||||
"from_text": "📝 テキストから",
|
||||
"from_file": "📄 ファイルから (.txt, .md)",
|
||||
"file_hint": "📄 <b>ファイルからインポート</b>\n\n単語が入った .txt または .md ファイルを送信してください。\n\n<b>形式:</b>\n• 1行に1単語(AIが翻訳)\n• <code>単語 - 翻訳</code>\n• <code>単語 : 翻訳</code>"
|
||||
},
|
||||
"common": {
|
||||
"start_first": "まず /start を実行してください",
|
||||
"translation": "翻訳"
|
||||
},
|
||||
"lang": {
|
||||
"ru": "ロシア語",
|
||||
"en": "英語",
|
||||
"ja": "日本語"
|
||||
},
|
||||
"import": {
|
||||
"title": "📖 <b>テキストから単語をインポート</b>",
|
||||
"desc": "学習言語のテキストを送ってください。学習に役立つ単語を抽出します。",
|
||||
@@ -56,7 +73,9 @@
|
||||
"header": "<b>📚 あなたの単語帳:</b>",
|
||||
"accuracy_inline": "(正答率 {n}%)",
|
||||
"shown_last": "<i>{n} 語のうち最新の10語を表示</i>",
|
||||
"total": "<i>合計: {n} 語</i>"
|
||||
"total": "<i>合計: {n} 語</i>",
|
||||
"page_info": "\n📖 {page} / {total} ページ • 合計: {count} 語",
|
||||
"close_btn": "❌ 閉じる"
|
||||
},
|
||||
"practice": {
|
||||
"start_text": "💬 <b>AIとの会話練習</b>\n\nシナリオを選んでください:\n\n• AIが相手役を務めます\n• 英語でやり取りできます\n• 間違いをAIが指摘します\n• 終了するには /stop を使用\n\nシナリオを選択:",
|
||||
@@ -84,6 +103,12 @@
|
||||
"go_words_hint": "/words [テーマ] で単語セットを取得できます"
|
||||
},
|
||||
"tasks": {
|
||||
"choose_mode": "🧠 <b>課題モードを選択:</b>",
|
||||
"mode_vocabulary": "📚 単語帳から",
|
||||
"mode_new_words": "✨ 新しい単語",
|
||||
"generating_new": "🔄 新しい単語を生成中...",
|
||||
"generate_failed": "❌ 単語の生成に失敗しました。後でもう一度お試しください。",
|
||||
"translate_to": "{lang_name}に翻訳",
|
||||
"no_words": "📚 まだ練習用の単語がありません!\n\n/add で単語を追加してから戻ってきてください。",
|
||||
"stopped": "課題を停止しました。/task で再開できます。",
|
||||
"finished": "課題が完了しました。/task で新しく始めましょう。",
|
||||
@@ -96,6 +121,9 @@
|
||||
"right_answer": "正解",
|
||||
"next_btn": "➡️ 次へ",
|
||||
"stop_btn": "🔚 停止",
|
||||
"add_word_btn": "➕ 単語を追加",
|
||||
"word_added": "✅ 単語 '{word}' を単語帳に追加しました!",
|
||||
"word_already_exists": "単語 '{word}' はすでに単語帳にあります",
|
||||
"cancelled": "キャンセルしました。/task で課題に戻れます。",
|
||||
"finish_title": "{emoji} <b>課題が終了しました!</b>",
|
||||
"correct_of": "正解数: <b>{correct}</b> / {total}",
|
||||
@@ -211,6 +239,18 @@
|
||||
"import_extra": {
|
||||
"cancelled": "❌ インポートを中止しました。"
|
||||
},
|
||||
"import_file": {
|
||||
"unsupported_format": "❌ サポートされていないファイル形式です。\n\n対応形式: .txt, .md\n\nファイル形式:\n<code>単語 - 翻訳</code>\n<code>単語 : 翻訳</code>",
|
||||
"too_large": "❌ ファイルが大きすぎます(最大1MB)",
|
||||
"encoding_error": "❌ エンコードエラー。UTF-8であることを確認してください",
|
||||
"download_error": "❌ ファイルのダウンロードに失敗しました。もう一度お試しください",
|
||||
"no_words_found": "❌ ファイル内に単語が見つかりません。\n\n正しい形式か確認してください:\n<code>単語 - 翻訳</code>\n<code>単語 : 翻訳</code>",
|
||||
"truncated": "⚠️ ファイルには{n}語以上あります。最初の{n}語をインポートします。",
|
||||
"found_header": "📄 <b>ファイル内の単語: {n}</b>",
|
||||
"choose_action": "アクションを選択:",
|
||||
"add_all_btn": "✅ すべて追加 ({n})",
|
||||
"translating": "🔄 AIで翻訳中..."
|
||||
},
|
||||
"level_test_extra": {
|
||||
"generating": "🔄 質問を生成しています...",
|
||||
"generate_failed": "❌ テストの生成に失敗しました。後でもう一度試すか、/settings でレベルを手動設定してください。",
|
||||
|
||||
@@ -5,15 +5,32 @@
|
||||
"task": "🧠 Задание",
|
||||
"practice": "💬 Практика",
|
||||
"words": "🎯 Тематические слова",
|
||||
"import": "📖 Импорт из текста",
|
||||
"import": "📖 Импорт",
|
||||
"stats": "📊 Статистика",
|
||||
"settings": "⚙️ Настройки",
|
||||
"below": "Главное меню доступно ниже ⤵️"
|
||||
},
|
||||
"add_menu": {
|
||||
"title": "➕ <b>Добавление слов</b>\n\nВыберите способ:",
|
||||
"manual": "📝 Вручную",
|
||||
"thematic": "🎯 Тематические слова",
|
||||
"import": "📖 Импорт"
|
||||
},
|
||||
"import_menu": {
|
||||
"title": "📖 <b>Импорт слов</b>\n\nВыберите способ импорта:",
|
||||
"from_text": "📝 Из текста",
|
||||
"from_file": "📄 Из файла (.txt, .md)",
|
||||
"file_hint": "📄 <b>Импорт из файла</b>\n\nОтправьте файл .txt или .md с вашими словами.\n\n<b>Форматы:</b>\n• По одному слову на строку (AI переведёт)\n• <code>слово - перевод</code>\n• <code>слово : перевод</code>"
|
||||
},
|
||||
"common": {
|
||||
"start_first": "Сначала запусти бота командой /start",
|
||||
"translation": "Перевод"
|
||||
},
|
||||
"lang": {
|
||||
"ru": "русский",
|
||||
"en": "английский",
|
||||
"ja": "японский"
|
||||
},
|
||||
"import": {
|
||||
"title": "📖 <b>Импорт слов из текста</b>",
|
||||
"desc": "Отправь мне текст на выбранном языке обучения, и я извлеку из него полезные слова для изучения.",
|
||||
@@ -56,7 +73,9 @@
|
||||
"header": "<b>📚 Твой словарь:</b>",
|
||||
"accuracy_inline": "({n}% точность)",
|
||||
"shown_last": "<i>Показаны последние 10 из {n} слов</i>",
|
||||
"total": "<i>Всего слов: {n}</i>"
|
||||
"total": "<i>Всего слов: {n}</i>",
|
||||
"page_info": "\n📖 Страница {page} из {total} • Всего слов: {count}",
|
||||
"close_btn": "❌ Закрыть"
|
||||
},
|
||||
"practice": {
|
||||
"start_text": "💬 <b>Диалоговая практика с AI</b>\n\nВыбери сценарий для разговора:\n\n• AI будет играть роль собеседника\n• Ты можешь общаться на английском\n• AI будет исправлять твои ошибки\n• Используй /stop для завершения диалога\n\nВыбери сценарий:",
|
||||
@@ -92,6 +111,12 @@
|
||||
"go_words_hint": "Используй /words [тема] для подборки слов"
|
||||
},
|
||||
"tasks": {
|
||||
"choose_mode": "🧠 <b>Выбери режим заданий:</b>",
|
||||
"mode_vocabulary": "📚 Слова из словаря",
|
||||
"mode_new_words": "✨ Новые слова",
|
||||
"generating_new": "🔄 Генерирую новые слова...",
|
||||
"generate_failed": "❌ Не удалось сгенерировать слова. Попробуй позже.",
|
||||
"translate_to": "Переведи на {lang_name}",
|
||||
"no_words": "📚 У тебя пока нет слов для практики!\n\nДобавь несколько слов командой /add, а затем возвращайся.",
|
||||
"stopped": "Задания остановлены. Используй /task, чтобы начать заново.",
|
||||
"finished": "Задания завершены. Используй /task, чтобы начать заново.",
|
||||
@@ -104,6 +129,9 @@
|
||||
"right_answer": "Правильный ответ",
|
||||
"next_btn": "➡️ Следующее задание",
|
||||
"stop_btn": "🔚 Завершить",
|
||||
"add_word_btn": "➕ Добавить слово",
|
||||
"word_added": "✅ Слово '{word}' добавлено в словарь!",
|
||||
"word_already_exists": "Слово '{word}' уже в словаре",
|
||||
"cancelled": "Отменено. Можешь вернуться к заданиям командой /task.",
|
||||
"finish_title": "{emoji} <b>Задание завершено!</b>",
|
||||
"correct_of": "Правильных ответов: <b>{correct}</b> из {total}",
|
||||
@@ -219,6 +247,18 @@
|
||||
"import_extra": {
|
||||
"cancelled": "❌ Импорт отменён."
|
||||
},
|
||||
"import_file": {
|
||||
"unsupported_format": "❌ Неподдерживаемый формат файла.\n\nПоддерживаются: .txt, .md\n\nФормат файла:\n<code>слово - перевод</code>\n<code>слово : перевод</code>",
|
||||
"too_large": "❌ Файл слишком большой (макс. 1 МБ)",
|
||||
"encoding_error": "❌ Ошибка кодировки. Убедитесь, что файл в UTF-8",
|
||||
"download_error": "❌ Не удалось загрузить файл. Попробуйте ещё раз",
|
||||
"no_words_found": "❌ Не найдено слов в файле.\n\nУбедитесь, что формат правильный:\n<code>слово - перевод</code>\n<code>слово : перевод</code>",
|
||||
"truncated": "⚠️ Файл содержит больше {n} слов. Импортируем первые {n}.",
|
||||
"found_header": "📄 <b>Найдено слов в файле: {n}</b>",
|
||||
"choose_action": "Выберите действие:",
|
||||
"add_all_btn": "✅ Добавить все ({n})",
|
||||
"translating": "🔄 Перевожу слова через AI..."
|
||||
},
|
||||
"level_test_extra": {
|
||||
"generating": "🔄 Генерирую вопросы...",
|
||||
"generate_failed": "❌ Не удалось сгенерировать тест. Попробуй позже или используй /settings для ручной установки уровня.",
|
||||
|
||||
Reference in New Issue
Block a user