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
This commit is contained in:
26
fix-placeholder.js
Normal file
26
fix-placeholder.js
Normal file
@@ -0,0 +1,26 @@
|
||||
// Force update placeholder for KidsAI
|
||||
console.log('🔧 Force updating placeholder...');
|
||||
|
||||
// Check if kidsAI is available
|
||||
if (typeof window.kidsAI !== 'undefined') {
|
||||
console.log('✅ KidsAI instance found');
|
||||
window.kidsAI.debugTranslatePlaceholder();
|
||||
} else {
|
||||
console.log('❌ KidsAI instance not found, trying manual approach...');
|
||||
|
||||
// Manual approach
|
||||
const input = document.getElementById('question-input');
|
||||
if (input && typeof translations !== 'undefined') {
|
||||
const currentLang = localStorage.getItem('kidsai-language') || 'en';
|
||||
console.log('Current language:', currentLang);
|
||||
|
||||
if (translations[currentLang] && translations[currentLang]['question-placeholder']) {
|
||||
input.placeholder = translations[currentLang]['question-placeholder'];
|
||||
console.log('✅ Manually updated placeholder to:', translations[currentLang]['question-placeholder']);
|
||||
} else {
|
||||
console.log('❌ Translation not found');
|
||||
}
|
||||
} else {
|
||||
console.log('❌ Input element or translations not found');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user