fix: comprehensive glossary system audit — 6 critical fixes
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m27s
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m27s
Full audit found 18 issues across backend, frontend, and data files. Root cause: target_language had no single source of truth — 'en' was hardcoded as default in 6+ places while templates are actually multilingual. Fixes applied: - routes/glossary_routes.py: list_glossaries() fallback 'en' → 'multi' - routes/glossary_routes.py: import reads target_lang from index.json (source of truth) instead of template file - data/glossaries/*.json: all 8 template files target_lang 'en' → 'multi' - services/glossary_service.py: get_glossary_terms() now returns target_language field (was missing entirely) - schemas/glossary_schemas.py: all defaults 'en' → 'multi' (GlossaryCreate, GlossaryResponse, GlossaryListItem) - useTranslationConfig.ts: only reset glossary on sourceLang change, not targetLang (multilingual glossaries work with any target) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -61,6 +61,7 @@ def get_glossary_terms(glossary_id: str, user_id: str) -> Dict[str, Any]:
|
||||
|
||||
return {
|
||||
"source_language": glossary.source_language or "fr",
|
||||
"target_language": getattr(glossary, "target_language", None) or "multi",
|
||||
"terms": result,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user