From 35f4cd136b588cbeb4c84f68d724aea7413c307c Mon Sep 17 00:00:00 2001 From: root Date: Mon, 30 Jun 2025 17:42:10 +0200 Subject: [PATCH] Fix API connectivity and language translation issues - Implement environment-aware API base URL detection * Auto-detects localhost vs production environment * Uses http://localhost:3002 for local development * Uses relative URLs for production deployment - Add placeholder translation support * Extended applyTranslations() to handle data-translate-placeholder * Fixed language mismatch where interface was German but placeholder stayed English * Now properly translates placeholder text when switching languages - Update cache-busting versions to force browser reload * Updated from v=20250629181500 to v=20250630173957 * Ensures browser loads updated JavaScript with fixes - Verify full API connectivity working * Local development server on port 3002 fully functional * AI-powered Socratic teaching system working perfectly * German/English language support complete Resolves 502 Bad Gateway errors and language consistency issues. --- html/kidsai/index.html | 6 +++--- html/kidsai/script-new.js | 42 +++++++++++++++++++++++++++++---------- 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/html/kidsai/index.html b/html/kidsai/index.html index 5b7e05c..1e08b0d 100755 --- a/html/kidsai/index.html +++ b/html/kidsai/index.html @@ -176,9 +176,9 @@ }, 100); - - - + + +