🌍 Translation & Localization Improvements: - Added missing translation keys for UI elements (ai-teacher, scientific-explanation, etc.) - Replaced all hardcoded 'AI Teacher' labels with translation lookups - Updated input placeholders and button text to use translations - Fixed answer reveal section to use proper translation keys - Added fallback messages and thinking prompts in both EN/DE 🔧 Technical Changes: - Updated script-new.js: 7+ instances of hardcoded text → translation keys - Enhanced translations.js: Added 7 new translation keys with EN/DE versions - Ensured all user-facing text uses translation system - Maintained emoji consistency across languages ✅ Verification: - No compilation errors in JavaScript files - All translation keys exist in both English and German - No remaining hardcoded user-facing strings - Backend service running correctly with systemd - Language switching functionality preserved 🎯 Result: Complete localization - no language mixing, all UI text properly translated
340 lines
18 KiB
JavaScript
Executable File
340 lines
18 KiB
JavaScript
Executable File
// Translations for KidsAI Explorer
|
|
const translations = {
|
|
en: {
|
|
// Header
|
|
title: "KidsAI Explorer",
|
|
tagline: "Think, Learn, Discover Together!",
|
|
|
|
// Welcome section
|
|
"welcome-title": "Hi there, young explorer! 🚀",
|
|
"welcome-text": "I'm here to help you become a super smart problem solver! Instead of giving you answers, I'll help you think like a detective and find solutions yourself!",
|
|
|
|
// Question section
|
|
"question-label": "What would you like to explore today?",
|
|
"question-placeholder": "Ask me anything! Like 'Why is the sky blue?' or 'How do plants grow?'",
|
|
"ask-button": "Let's Explore!",
|
|
|
|
// Thinking section
|
|
"thinking-title": "Let's Think Step by Step!",
|
|
"research-btn": "Research Ideas",
|
|
"experiment-btn": "Try Experiments",
|
|
"discuss-btn": "Discuss with Others",
|
|
|
|
// Suggestions
|
|
"suggestions-title": "Popular Questions from Other Young Explorers",
|
|
"suggestion-seasons": "Why do we have different seasons?",
|
|
"suggestion-birds": "How do birds fly?",
|
|
"suggestion-water": "Why is water wet?",
|
|
"suggestion-computers": "How do computers work?",
|
|
"suggestion-dreams": "Why do we dream?",
|
|
"suggestion-rainbows": "How do rainbows form?",
|
|
|
|
// Footer
|
|
"footer-message": "Remember: The best learning happens when you think for yourself! 🌟",
|
|
"safety-note": "Always ask a grown-up before researching online!",
|
|
"loading-text": "Thinking of the best way to help you explore...",
|
|
|
|
// Dynamic content
|
|
encouragements: [
|
|
"Great question! You're thinking like a real scientist! 🔬",
|
|
"Wow, that's a fantastic thing to wonder about! 🌟",
|
|
"I love how curious you are! That's how great discoveries happen! 🚀",
|
|
"Excellent question! You're going to learn so much by exploring this! 📚",
|
|
"That's the kind of question that leads to amazing discoveries! 🔍"
|
|
],
|
|
|
|
// Chat messages
|
|
"detective-help": "Instead of giving you the answer right away, I'll help you think through this like a detective! 🕵️",
|
|
"default-encouragement": "Great question! Let's explore this together step by step! 🚀",
|
|
|
|
// Fallback questions for local guidance
|
|
"fallback-question-1": "What do you already know about this topic?",
|
|
"fallback-question-2": "What do you think might be the reason for this?",
|
|
"fallback-question-3": "Where could you look to find more information?",
|
|
"fallback-question-4": "Can you think of any examples or similar situations?",
|
|
|
|
// Error and warning messages
|
|
"ask-something-first": "Please ask me something first! 🤔",
|
|
"processing-trouble": "Sorry, I had trouble processing your question. Let me give you some thinking guidance instead!",
|
|
"write-thoughts": "Please write down your thoughts! 🤔",
|
|
|
|
// Answer reveal section
|
|
"the-answer": "The Answer:",
|
|
"awesome-how-close": "Awesome! How close were your thoughts to the answer?",
|
|
"cant-fetch-answer": "I can't fetch the answer right now. That's a great question! You've done great thinking already. Feel free to ask an adult or look it up in a book.",
|
|
"reveal-answer": "Reveal Answer!",
|
|
"getting-answer": "Getting Answer...",
|
|
"great-thinking": "Great thinking! You've explored this question step by step!",
|
|
"see-how-close": "Would you like to see how close your thoughts were to the scientific explanation?",
|
|
"ai-teacher": "AI Teacher",
|
|
"scientific-explanation": "Scientific Explanation",
|
|
"type-thoughts-placeholder": "Type your thoughts here...",
|
|
"send-button": "Send",
|
|
"great-thinking-fallback": "🌟 Great thinking! Keep exploring - every thought helps us learn!",
|
|
"thinking-about-answer": "🤔 Thinking about your answer...",
|
|
"hmm": "Hmm...",
|
|
|
|
actionTitles: {
|
|
research: "🔍 Research Ideas",
|
|
experiment: "🧪 Experiment Ideas",
|
|
discuss: "💬 Discussion Ideas"
|
|
},
|
|
|
|
thinkingFrameworks: {
|
|
science: {
|
|
steps: [
|
|
{
|
|
title: "🔍 What do you already know?",
|
|
content: "Think about what you've already observed or learned about this topic. What have you noticed before?"
|
|
},
|
|
{
|
|
title: "🤔 What makes you curious?",
|
|
content: "What specific part of this question makes you wonder the most? Is there something that seems surprising or unusual?"
|
|
},
|
|
{
|
|
title: "🧪 How could you explore this?",
|
|
content: "What experiments or observations could you do to learn more? Think about safe ways to test your ideas!"
|
|
},
|
|
{
|
|
title: "📚 Where could you find more information?",
|
|
content: "What books, websites (with a grown-up), or experts could help you learn more about this topic?"
|
|
}
|
|
]
|
|
},
|
|
math: {
|
|
steps: [
|
|
{
|
|
title: "📝 What information do you have?",
|
|
content: "List out all the numbers and facts you know about this problem. What are you trying to find out?"
|
|
},
|
|
{
|
|
title: "🎯 What's the goal?",
|
|
content: "What exactly are you trying to calculate or figure out? Can you say it in your own words?"
|
|
},
|
|
{
|
|
title: "🧮 What tools might help?",
|
|
content: "Would drawing a picture, making a chart, or using objects to count help you understand this better?"
|
|
},
|
|
{
|
|
title: "✅ How can you check your answer?",
|
|
content: "What's a different way you could solve this to make sure your answer makes sense?"
|
|
}
|
|
]
|
|
},
|
|
technology: {
|
|
steps: [
|
|
{
|
|
title: "🔧 What does this technology do?",
|
|
content: "Think about what job this technology is designed to do. What problem does it solve for people?"
|
|
},
|
|
{
|
|
title: "⚙️ What are the main parts?",
|
|
content: "Can you identify the different pieces that work together? What does each part do?"
|
|
},
|
|
{
|
|
title: "🔄 How do the parts work together?",
|
|
content: "Think about how information or signals move through the system. What happens step by step?"
|
|
},
|
|
{
|
|
title: "🌟 What makes it special?",
|
|
content: "How is this different from older ways of doing the same thing? What makes it better or more efficient?"
|
|
}
|
|
]
|
|
},
|
|
general: {
|
|
steps: [
|
|
{
|
|
title: "🎯 Let's break this down",
|
|
content: "What's the main thing you want to understand? Can you split your big question into smaller questions?"
|
|
},
|
|
{
|
|
title: "🧠 What do you think might happen?",
|
|
content: "Based on what you already know, what's your best guess about the answer? It's okay if you're not sure!"
|
|
},
|
|
{
|
|
title: "🔍 How can you find out more?",
|
|
content: "What steps could you take to explore this question? Think about observing, researching, or asking experts."
|
|
},
|
|
{
|
|
title: "💡 What would you do with this knowledge?",
|
|
content: "How might understanding this help you or others? Why is this question important to you?"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
|
|
actionReminder: "Remember: The goal is to discover the answer yourself through exploration and thinking!"
|
|
},
|
|
|
|
de: {
|
|
// Header
|
|
title: "KidsAI Explorer",
|
|
tagline: "Denken, Lernen, Entdecken - Zusammen!",
|
|
|
|
// Welcome section
|
|
"welcome-title": "Hallo, junger Entdecker! 🚀",
|
|
"welcome-text": "Ich bin hier, um dir zu helfen, ein super schlauer Problemlöser zu werden! Anstatt dir Antworten zu geben, helfe ich dir, wie ein Detektiv zu denken und Lösungen selbst zu finden!",
|
|
|
|
// Question section
|
|
"question-label": "Was möchtest du heute erforschen?",
|
|
"question-placeholder": "Frag mich alles! Zum Beispiel 'Warum ist der Himmel blau?' oder 'Wie wachsen Pflanzen?'",
|
|
"ask-button": "Lass uns erforschen!",
|
|
|
|
// Thinking section
|
|
"thinking-title": "Lass uns Schritt für Schritt denken!",
|
|
"research-btn": "Forschungsideen",
|
|
"experiment-btn": "Experimente versuchen",
|
|
"discuss-btn": "Mit anderen besprechen",
|
|
|
|
// Suggestions
|
|
"suggestions-title": "Beliebte Fragen von anderen jungen Entdeckern",
|
|
"suggestion-seasons": "Warum gibt es verschiedene Jahreszeiten?",
|
|
"suggestion-birds": "Wie können Vögel fliegen?",
|
|
"suggestion-water": "Warum ist Wasser nass?",
|
|
"suggestion-computers": "Wie funktionieren Computer?",
|
|
"suggestion-dreams": "Warum träumen wir?",
|
|
"suggestion-rainbows": "Wie entstehen Regenbogen?",
|
|
|
|
// Footer
|
|
"footer-message": "Denk daran: Das beste Lernen passiert, wenn du selbst denkst! 🌟",
|
|
"safety-note": "Frag immer einen Erwachsenen, bevor du online recherchierst!",
|
|
"loading-text": "Denke über den besten Weg nach, dir beim Erkunden zu helfen...",
|
|
|
|
// Dynamic content
|
|
encouragements: [
|
|
"Tolle Frage! Du denkst wie ein echter Wissenschaftler! 🔬",
|
|
"Wow, das ist eine fantastische Sache, über die man sich wundern kann! 🌟",
|
|
"Ich liebe es, wie neugierig du bist! So entstehen große Entdeckungen! 🚀",
|
|
"Ausgezeichnete Frage! Du wirst so viel lernen, wenn du das erforschst! 📚",
|
|
"Das ist die Art von Frage, die zu erstaunlichen Entdeckungen führt! 🔍"
|
|
],
|
|
|
|
// Chat messages
|
|
"detective-help": "Anstatt dir die Antwort gleich zu geben, helfe ich dir dabei, wie ein Detektiv zu denken! 🕵️",
|
|
"default-encouragement": "Fantastisch! Lass uns das zusammen herausfinden! 🚀",
|
|
|
|
// Fallback questions for local guidance
|
|
"fallback-question-1": "Was weißt du bereits über dieses Thema?",
|
|
"fallback-question-2": "Was denkst du, könnte der Grund dafür sein?",
|
|
"fallback-question-3": "Wo könntest du weitere Informationen finden?",
|
|
"fallback-question-4": "Kannst du dir Beispiele oder ähnliche Situationen vorstellen?",
|
|
|
|
// Error and warning messages
|
|
"ask-something-first": "Bitte frag mich zuerst etwas! 🤔",
|
|
"processing-trouble": "Entschuldigung, ich hatte Probleme beim Verarbeiten deiner Frage. Lass mich dir stattdessen eine Denkweise zeigen!",
|
|
"write-thoughts": "Bitte schreibe deine Gedanken auf! 🤔",
|
|
|
|
// Answer reveal section
|
|
"the-answer": "Die Antwort:",
|
|
"awesome-how-close": "Großartig! Wie nah warst du mit deinen Überlegungen?",
|
|
"cant-fetch-answer": "Ich kann die Antwort gerade nicht abrufen. Das ist eine tolle Frage! Du hast schon großartig gedacht. Frag gerne einen Erwachsenen oder schau in einem Buch nach.",
|
|
"reveal-answer": "Antwort enthüllen!",
|
|
"getting-answer": "Antwort wird geholt...",
|
|
"great-thinking": "Großartig gedacht! Du hast diese Frage Schritt für Schritt erforscht!",
|
|
"see-how-close": "Möchtest du sehen, wie nah deine Gedanken an der wissenschaftlichen Erklärung waren?",
|
|
"ai-teacher": "KI-Lehrer",
|
|
"scientific-explanation": "Wissenschaftliche Erklärung",
|
|
"type-thoughts-placeholder": "Schreibe hier deine Gedanken...",
|
|
"send-button": "Senden",
|
|
"great-thinking-fallback": "🌟 Großartig gedacht! Erkunde weiter - jeder Gedanke hilft uns beim Lernen!",
|
|
"thinking-about-answer": "🤔 Denke über deine Antwort nach...",
|
|
"hmm": "Hmm...",
|
|
|
|
actionTitles: {
|
|
research: "🔍 Forschungsideen",
|
|
experiment: "🧪 Experiment-Ideen",
|
|
discuss: "💬 Diskussionsideen"
|
|
},
|
|
|
|
thinkingFrameworks: {
|
|
science: {
|
|
steps: [
|
|
{
|
|
title: "🔍 Was weißt du schon?",
|
|
content: "Denk darüber nach, was du bereits über dieses Thema beobachtet oder gelernt hast. Was ist dir schon aufgefallen?"
|
|
},
|
|
{
|
|
title: "🤔 Was macht dich neugierig?",
|
|
content: "Welcher spezielle Teil dieser Frage lässt dich am meisten staunen? Gibt es etwas, das überraschend oder ungewöhnlich scheint?"
|
|
},
|
|
{
|
|
title: "🧪 Wie könntest du das erforschen?",
|
|
content: "Welche Experimente oder Beobachtungen könntest du machen, um mehr zu lernen? Denk an sichere Wege, deine Ideen zu testen!"
|
|
},
|
|
{
|
|
title: "📚 Wo könntest du mehr Informationen finden?",
|
|
content: "Welche Bücher, Websites (mit einem Erwachsenen) oder Experten könnten dir helfen, mehr über dieses Thema zu lernen?"
|
|
}
|
|
]
|
|
},
|
|
math: {
|
|
steps: [
|
|
{
|
|
title: "📝 Welche Informationen hast du?",
|
|
content: "Liste alle Zahlen und Fakten auf, die du über dieses Problem kennst. Was versuchst du herauszufinden?"
|
|
},
|
|
{
|
|
title: "🎯 Was ist das Ziel?",
|
|
content: "Was genau versuchst du zu berechnen oder herauszufinden? Kannst du es mit deinen eigenen Worten sagen?"
|
|
},
|
|
{
|
|
title: "🧮 Welche Hilfsmittel könnten helfen?",
|
|
content: "Würde es helfen, ein Bild zu malen, eine Tabelle zu erstellen oder Gegenstände zum Zählen zu benutzen?"
|
|
},
|
|
{
|
|
title: "✅ Wie kannst du deine Antwort überprüfen?",
|
|
content: "Welchen anderen Weg könntest du nutzen, um sicherzustellen, dass deine Antwort Sinn macht?"
|
|
}
|
|
]
|
|
},
|
|
technology: {
|
|
steps: [
|
|
{
|
|
title: "🔧 Was macht diese Technologie?",
|
|
content: "Denk darüber nach, welche Aufgabe diese Technologie erfüllen soll. Welches Problem löst sie für Menschen?"
|
|
},
|
|
{
|
|
title: "⚙️ Was sind die Hauptteile?",
|
|
content: "Kannst du die verschiedenen Teile erkennen, die zusammenarbeiten? Was macht jeder Teil?"
|
|
},
|
|
{
|
|
title: "🔄 Wie arbeiten die Teile zusammen?",
|
|
content: "Denk darüber nach, wie Informationen oder Signale durch das System fließen. Was passiert Schritt für Schritt?"
|
|
},
|
|
{
|
|
title: "🌟 Was macht sie besonders?",
|
|
content: "Wie unterscheidet sich das von älteren Methoden, dasselbe zu tun? Was macht es besser oder effizienter?"
|
|
}
|
|
]
|
|
},
|
|
general: {
|
|
steps: [
|
|
{
|
|
title: "🎯 Lass uns das aufteilen",
|
|
content: "Was ist das Wichtigste, was du verstehen möchtest? Kannst du deine große Frage in kleinere Fragen aufteilen?"
|
|
},
|
|
{
|
|
title: "🧠 Was denkst du, könnte passieren?",
|
|
content: "Basierend auf dem, was du bereits weißt, was ist deine beste Vermutung über die Antwort? Es ist okay, wenn du dir nicht sicher bist!"
|
|
},
|
|
{
|
|
title: "🔍 Wie kannst du mehr herausfinden?",
|
|
content: "Welche Schritte könntest du unternehmen, um diese Frage zu erkunden? Denk an Beobachten, Forschen oder Experten fragen."
|
|
},
|
|
{
|
|
title: "💡 Was würdest du mit diesem Wissen machen?",
|
|
content: "Wie könnte dir oder anderen das Verstehen davon helfen? Warum ist diese Frage wichtig für dich?"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
|
|
actionReminder: "Denk daran: Das Ziel ist es, die Antwort selbst durch Erkunden und Denken zu entdecken!"
|
|
}
|
|
};
|
|
|
|
// Export for use in other files
|
|
if (typeof module !== 'undefined' && module.exports) {
|
|
module.exports = translations;
|
|
}
|