Files
tg_bot_language/locales/en.json
mamonov.ep d937b37a3b 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>
2025-12-06 21:29:41 +03:00

315 lines
16 KiB
JSON
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"menu": {
"add": " Add word",
"vocab": "📚 Vocabulary",
"task": "🧠 Task",
"practice": "💬 Practice",
"words": "🎯 Thematic words",
"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.",
"can_send": "You may send:\n• A passage from a book or article\n• A song lyric\n• A description\n• Any interesting text",
"cancel_hint": "Send /cancel to abort.",
"too_short": "⚠️ Text is too short. Send at least 50 characters.\nOr use /cancel to abort.",
"too_long": "⚠️ Text is too long (max 3000 chars).\nSend a shorter text or use /cancel to abort.",
"processing": "🔄 Analyzing text and extracting words...",
"failed": "❌ Failed to extract words. Try another text or later.",
"found_header": "📚 <b>Found words: {n}</b>",
"added_single": "✅ Word '{word}' added to vocabulary",
"added_count": "✅ Added words: <b>{n}</b>",
"skipped_count": "⚠️ Skipped (already in vocabulary): {n}"
},
"start": {
"new_intro": "👋 Hi, {first_name}!\n\nI'm a bot to learn English. I will help you to:\n📚 Grow your vocabulary (manual/thematic/from text)\n✍ Do interactive exercises\n💬 Practice conversation with AI\n📊 Track your progress\n\n<b>Commands:</b>\n• /add [word] - add a word\n• /words [topic] - thematic selection\n• /import - import from text\n• /vocabulary - my dictionary\n• /task - exercises\n• /practice - AI dialogue\n• /stats - statistics\n• /settings - settings\n• /reminder - reminders\n• /help - full help",
"offer_test": "🎯 <b>Shall we determine your level?</b>\n\nA short test (7 questions) will tailor tasks to your level.\nIt takes about 23 minutes.\n\nOr skip and set level later in /settings",
"return": "Welcome back, {first_name}! 👋\n\nReady to continue?\n\n<b>Quick access:</b>\n• /vocabulary - view dictionary\n• /task - get an exercise\n• /practice - dialogue practice\n• /words [topic] - thematic words\n• /stats - statistics\n• /help - all commands",
"help": "<b>📖 Commands help:</b>\n\n<b>Vocabulary:</b>\n• /add [word] - add to dictionary\n• /vocabulary - view dictionary\n• /words [topic] - thematic words\n• /import - import from text\n\n<b>Learning:</b>\n• /task - exercise (translate, fill gaps)\n• /practice - AI dialogue (6 scenarios)\n• /level_test - level test\n\n<b>Stats:</b>\n• /stats - your progress\n\n<b>Settings:</b>\n• /settings - level and language\n• /reminder - daily reminders\n\n💡 You can also just send me a word to add it!",
"offer_btn": "📊 Take level test",
"skip_btn": "➡️ Skip",
"skip_msg": "✅ Okay!\n\nYou can take the test later with /level_test\nor set level manually in /settings\n\nLet's start! Try:\n• /words travel - thematic words\n• /practice - AI dialogue\n• /add hello - add a word"
},
"add": {
"prompt": "Send the word you want to add:\nFor example: <code>/add elephant</code>\n\nOr just send the word without a command!",
"searching": "⏳ Looking up translation and examples...",
"examples_header": "<b>Examples:</b>",
"translations_header": "<b>Translations:</b>",
"translation_label": "Translation",
"category_label": "Category",
"level_label": "Level",
"confirm_question": "Add this word to your vocabulary?",
"btn_add": "✅ Add",
"btn_cancel": "❌ Cancel",
"exists": "The word '<b>{word}</b>' is already in your vocabulary!\nTranslation: {translation}",
"added_success": "✅ Word '<b>{word}</b>' added!\n\nTotal words in vocabulary: {count}\n\nKeep adding new words or use /task to practice!",
"cancelled": "Cancelled. You can add another word with /add"
},
"vocab": {
"empty": "📚 Your vocabulary is empty!\n\nAdd your first word with /add or just send me a word.",
"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>",
"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:",
"hints": "💡 <b>Hints:</b>",
"write_or_stop": "\n📝 Write your answer in English or use /stop to finish",
"show_translation_btn": "👁️ Show translation",
"stop_btn": "🔚 End dialogue",
"scenario": {
"restaurant": "🍽️ Restaurant",
"shopping": "🛍️ Shopping",
"travel": "✈️ Travel",
"work": "💼 Work",
"doctor": "🏥 Doctor",
"casual": "💬 Casual"
},
"thinking_prepare": "🤔 AI is preparing the dialogue...",
"empty_prompt": "Write something in the learning language or use /stop to finish",
"thinking": "🤔 AI is thinking...",
"corrections": "<b>Corrections:</b>",
"end_title": "✅ <b>Dialogue finished!</b>",
"end_exchanged": "Messages exchanged: <b>{n}</b>",
"end_keep": "Great job! Keep practicing.",
"end_hint": "Use /practice to start a new dialogue.",
"translation_unavailable": "Translation unavailable",
"translation_already": "Translation already shown",
"custom_scenario_btn": "✏️ Custom scenario",
"custom_scenario_prompt": "✏️ <b>Describe your scenario</b>\n\nWrite a topic or situation for the conversation.\n\nExamples:\n• Job interview for a programmer position\n• Ordering pizza by phone\n• Discussing a movie with a friend\n• Planning a trip to Japan",
"custom_scenario_too_short": "⚠️ Description too short. Write at least a few words about the scenario.",
"new_practice_btn": "🔄 New dialogue",
"to_tasks_btn": "🧠 Tasks",
"to_words_btn": "🎯 Words",
"go_tasks_hint": "Use /task to practice words",
"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.",
"header": "📝 <b>Task {i} of {n}</b>",
"write_answer": "\n💡 Write your answer:",
"checking": "⏳ Checking answer...",
"correct": "✅ <b>Correct!</b>",
"incorrect": "❌ <b>Incorrect</b>",
"your_answer": "Your answer",
"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",
"example_label": "Example",
"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}",
"accuracy": "Accuracy: <b>{accuracy}%</b>",
"use_task": "Use /task to start a new one",
"use_stats": "Use /stats to view statistics",
"comment": {
"excellent": "Excellent result!",
"good": "Good job!",
"average": "Not bad, keep practicing!",
"poor": "Review these words again!"
}
},
"stats": {
"header": "📊 <b>Your stats</b>",
"total_words": "📚 Words in vocabulary: <b>{n}</b>",
"studied_words": "📖 Words studied: <b>{n}</b>",
"total_tasks": "✍️ Tasks completed: <b>{n}</b>",
"correct_tasks": "✅ Correct answers: <b>{n}</b>",
"accuracy": "🎯 Accuracy: <b>{n}%</b>",
"hint_add_words": "Add words with /add to start learning!",
"hint_first_task": "Do your first task with /task!",
"hint_keep_practice": "Keep practicing! 💪"
},
"reminder": {
"title": "⏰ <b>Reminders</b>",
"status_on": "✅ Enabled",
"status_off": "❌ Disabled",
"time_not_set": "Not set",
"status_line": "Status: {status}",
"time_line": "Time: {time} UTC",
"desc1": "Reminders help you keep up with daily practice.",
"desc2": "The bot will send a message at the chosen time every day.",
"btn_enable": "✅ Enable",
"btn_disable": "❌ Disable",
"btn_change_time": "⏰ Change time",
"set_time_first": "Please set the reminder time first!",
"enabled_toast": "✅ Reminders enabled!",
"enabled_title": "✅ <b>Reminders enabled!</b>",
"enabled_desc": "You will receive daily practice reminders.",
"disabled_toast": "❌ Reminders disabled",
"disabled_title": "❌ <b>Reminders disabled</b>",
"disabled_desc": "Use /reminder to enable them again.",
"set_title": "⏰ <b>Set reminder time</b>",
"set_desc": "Send time in format <b>HH:MM</b> (UTC)",
"set_examples": "Examples:\n• <code>09:00</code> - 9 AM UTC\n• <code>18:30</code> - 6:30 PM UTC\n• <code>20:00</code> - 8 PM UTC",
"set_utc_hint": "💡 UTC = local offset may apply",
"cancel_hint": "Send /cancel to abort",
"cancelled": "❌ Time setup cancelled",
"invalid_format": "❌ Invalid time format!\n\nUse <b>HH:MM</b> (e.g., 09:00 or 18:30)\nOr send /cancel to abort",
"time_set_title": "✅ <b>Time set!</b>",
"status_on_line": "Status: <b>Enabled</b>",
"use_settings": "Use /reminder to change settings."
},
"level_test": {
"show_translation_btn": "👁️ Show question translation",
"intro": "📊 <b>Level placement test</b>\n\nThis short test will help determine your English level.\n\n📋 The test has 7 questions:\n• Grammar\n• Vocabulary\n• Comprehension\n\n⏱ Takes about 23 minutes\n\nReady to start?",
"start_btn": "✅ Start test",
"cancel_btn": "❌ Cancel",
"press_button": "Press the button when you're ready:",
"cancelled": "❌ Test cancelled",
"q_header": "❓ <b>Question {i} of {n}</b>"
},
"settings": {
"title": "⚙️ <b>Settings</b>\n\n",
"level_prefix": "📊 Level: ",
"learning_prefix": "🎯 Learning language: ",
"interface_prefix": "🌐 Interface language: ",
"choose": "Choose what to change:",
"close": "❌ Close",
"back": "⬅️ Back",
"back_to_settings": "⬅️ Back to settings",
"level_title": "📊 <b>Choose your level:</b>\n\n",
"level_groups": "<b>A1-A2</b> - Beginner\n<b>B1-B2</b> - Intermediate\n<b>C1-C2</b> - Advanced\n\n",
"level_hint": "This affects difficulty of suggested words and tasks.",
"level": {
"a1": "A1 - Beginner",
"a2": "A2 - Elementary",
"b1": "B1 - Intermediate",
"b2": "B2 - Upper-intermediate",
"c1": "C1 - Advanced",
"c2": "C2 - Proficient"
},
"jlpt": {
"n5": "N5 - Basic",
"n4": "N4 - Elementary",
"n3": "N3 - Intermediate",
"n2": "N2 - Advanced",
"n1": "N1 - Fluent"
},
"jlpt_groups": "<b>N5-N4</b> - Beginner\n<b>N3</b> - Intermediate\n<b>N2-N1</b> - Advanced\n\n",
"level_changed": "✅ Level changed to <b>{level}</b>\n\n",
"level_changed_hint": "You will now receive words and tasks matching your level!",
"lang_title": "🌐 <b>Select interface language:</b>\n\n",
"lang_desc": "This will change the language of bot messages.",
"lang_changed": "✅ Interface language: <b>English</b>",
"learning_title": "🎯 <b>Select learning language:</b>\n\n",
"learning_changed": "✅ Learning language: <b>{code}</b>",
"menu_updated": "Main menu updated ⤵️",
"lang_name": {
"ru": "🇷🇺 Русский",
"en": "🇬🇧 English",
"ja": "🇯🇵 日本語"
},
"learning_lang": {
"en": "🇬🇧 English",
"es": "🇪🇸 Spanish",
"de": "🇩🇪 German",
"fr": "🇫🇷 French",
"ja": "🇯🇵 Japanese"
}
},
"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.",
"translation_unavailable": "Translation unavailable",
"translation_marker": "Question translation:",
"translation_already": "Translation already shown",
"correct": "✅ Correct!",
"incorrect": "❌ Incorrect",
"correct_answer": "Correct answer: <b>{answer}</b>",
"result_title": "🎉 <b>Test completed!</b>\n\n",
"results_header": "📊 Results:\n",
"correct_count": "Correct answers: <b>{correct}</b> of {total}\n",
"accuracy": "Accuracy: <b>{accuracy}%</b>\n\n",
"your_level": "🎯 Your level: <b>{level}</b>\n",
"level_set_hint": "Tasks and materials will now be tailored to your level!\nYou can change the level anytime via /settings",
"level_desc": {
"A1": "Beginner - understand basic phrases and can introduce yourself",
"A2": "Elementary - can communicate on simple topics",
"B1": "Intermediate - can maintain conversations on familiar topics",
"B2": "Upper-intermediate - fluent in most situations",
"C1": "Advanced - use language flexibly and effectively",
"C2": "Proficient - mastery at native level",
"N5": "Basic - understand hiragana, katakana and basic kanji",
"N4": "Elementary - understand everyday conversations",
"N3": "Intermediate - understand common texts and conversations",
"N2": "Advanced - understand most content",
"N1": "Fluent - full proficiency in Japanese"
}
},
"words": {
"generating": "🔄 Generating words for topic '{theme}'...",
"generate_failed": "❌ Failed to generate words. Please try again later.",
"header": "📚 <b>Word set: {theme}</b>",
"choose": "Choose words to add to your vocabulary:",
"add_all_btn": "✅ Add all",
"close_btn": "❌ Close",
"help_title": "📚 <b>Thematic word sets</b>",
"help_usage": "Use: <code>/words [topic]</code>",
"help_examples": "Examples:\n• <code>/words travel</code> - travel\n• <code>/words food</code> - food\n• <code>/words work</code> - work\n• <code>/words nature</code> - nature\n• <code>/words technology</code> - technology",
"help_note": "I will generate 10 words for the topic tailored to your level!",
"popular": "Popular topics:",
"topic_travel": "✈️ Travel",
"topic_food": "🍔 Food",
"topic_work": "💼 Work",
"topic_nature": "🌿 Nature",
"topic_technology": "💻 Technology",
"err_not_found": "❌ Error: word not found",
"already_exists": "The word '{word}' is already in your vocabulary",
"added_single": "✅ Word '{word}' added to vocabulary"
}
}