Files
kidsai/test-translations.js
root 500bd192d5 Initial commit: KidsAI Explorer with complete functionality
- Complete KidsAI Explorer application
- Multi-language support (English/German)
- AI-powered educational guidance using OpenAI
- Interactive chat interface for children
- Proper placeholder translation fixes
- Mobile-responsive design
- Educational framework for critical thinking
2025-07-13 16:59:42 +02:00

45 lines
1.4 KiB
JavaScript
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.
// Quick test script to validate translations
const fs = require('fs');
// Load and parse translations manually
const translationsCode = fs.readFileSync('translations.js', 'utf8');
// Extract just the translations object
const translationsMatch = translationsCode.match(/const translations = ({[\s\S]*?});/);
if (!translationsMatch) {
console.error('Could not parse translations');
process.exit(1);
}
const translations = eval(`(${translationsMatch[1]})`);
// Test key translations exist
const testKeys = [
'title', 'tagline', 'welcome-title', 'welcome-text',
'ai-teacher', 'scientific-explanation', 'type-thoughts-placeholder',
'send-button', 'the-answer', 'reveal-answer', 'getting-answer',
'great-thinking-fallback', 'thinking-about-answer', 'hmm'
];
console.log('🧪 Testing translation completeness...\n');
let allGood = true;
testKeys.forEach(key => {
const enExists = translations.en[key] !== undefined;
const deExists = translations.de[key] !== undefined;
if (!enExists || !deExists) {
console.log(`❌ Missing translation for '${key}': EN=${enExists}, DE=${deExists}`);
allGood = false;
} else {
console.log(`✅ '${key}': EN="${translations.en[key]}" | DE="${translations.de[key]}"`);
}
});
if (allGood) {
console.log('\n🎉 All translations complete!');
} else {
console.log('\n⚠ Some translations are missing');
}