2ff06ee7ae
Major Features:
- Internationalization (i18n) with auto-detection for ES/EN/PT
- Mobile-first responsive design for Studio and Experience
- Multi-model AI configuration (llama3.2:3b, qwen3.5:9b, gpt-oss:latest)
- Course language configuration (auto-detect or fixed per course)
Backend Changes:
- shared/common: ModelType enum for intelligent model selection
- LMS: log_ai_usage function migration (fix chat tutor 500 error)
- LMS/CMS: course language config fields (language_setting, fixed_language)
- LMS: /courses/{id}/language-config endpoint for language detection
Frontend Changes:
- Experience: Enhanced i18n with browser language detection
- Experience: Audio recording with HTTPS check and error handling
- Studio: Memory game with unique pair IDs and debug logging
- Studio: Expanded translations (250+ keys for ES, EN, PT)
- Both: Language selector in headers (mobile responsive)
Documentation:
- AI_MODELS_CONFIG.md: Multi-model configuration guide
- RESPONSIVIDAD_GUIA.md: Mobile-first design patterns
- I18N_RESPONSIVIDAD_IMPLEMENTACION.md: Implementation details
- DEBUG_AUDIO_RECORDING.md: Audio troubleshooting guide
- DEBUG_MEMORY_GAME.md: Memory game debugging steps
Bug Fixes:
- Fix chat tutor 500 error (missing log_ai_usage function)
- Fix audio recording (HTTPS check, browser compatibility)
- Fix memory game pair IDs (unique ID generation)
- Fix HotspotBlock TypeScript errors
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
25 lines
1.0 KiB
SQL
25 lines
1.0 KiB
SQL
-- Add language configuration to courses table
|
|
-- Allows setting course language to 'auto' (detect from user) or fixed language
|
|
|
|
ALTER TABLE courses
|
|
ADD COLUMN IF NOT EXISTS language_setting VARCHAR(20) DEFAULT 'auto'::VARCHAR,
|
|
ADD COLUMN IF NOT EXISTS fixed_language VARCHAR(5) DEFAULT NULL;
|
|
|
|
-- Add comment explaining the fields
|
|
COMMENT ON COLUMN courses.language_setting IS 'Language mode: "auto" (detect from user browser) or "fixed" (use fixed_language)';
|
|
COMMENT ON COLUMN courses.fixed_language IS 'Fixed language code (es, en, pt) when language_setting is "fixed". NULL when language_setting is "auto".';
|
|
|
|
-- Add check constraint for valid language codes
|
|
ALTER TABLE courses
|
|
ADD CONSTRAINT chk_language_setting CHECK (
|
|
language_setting IN ('auto', 'fixed')
|
|
);
|
|
|
|
ALTER TABLE courses
|
|
ADD CONSTRAINT chk_fixed_language CHECK (
|
|
fixed_language IS NULL OR fixed_language IN ('es', 'en', 'pt')
|
|
);
|
|
|
|
-- Create index for filtering courses by language
|
|
CREATE INDEX IF NOT EXISTS idx_courses_language ON courses(language_setting, fixed_language);
|