fix: comprehensive glossary system audit — 6 critical fixes
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:
2026-05-31 23:14:41 +02:00
parent 2386e94c6d
commit a79ce0fc9b
12 changed files with 18 additions and 16 deletions

View File

@@ -2,7 +2,7 @@
"name": "E-commerce & Vente - Français → Anglais",
"description": "Terminologie e-commerce et vente française vers anglaise pour boutiques en ligne, catalogues et documents commerciaux",
"source_lang": "fr",
"target_lang": "en",
"target_lang": "multi",
"category": "ecommerce",
"terms": [
{

View File

@@ -2,7 +2,7 @@
"name": "Finance & Comptabilité - Français → Anglais",
"description": "Terminologie financière et comptable française vers anglaise pour rapports annuels, bilans et documents financiers",
"source_lang": "fr",
"target_lang": "en",
"target_lang": "multi",
"category": "finance",
"terms": [
{

View File

@@ -2,7 +2,7 @@
"name": "RH & Ressources Humaines - Français → Anglais",
"description": "Terminologie des ressources humaines française vers anglaise pour contrats, politiques et documents RH",
"source_lang": "fr",
"target_lang": "en",
"target_lang": "multi",
"category": "hr",
"terms": [
{

View File

@@ -2,7 +2,7 @@
"name": "Juridique - Français → Anglais",
"description": "Terminologie juridique française vers anglaise pour contrats, statuts et documents légaux",
"source_lang": "fr",
"target_lang": "en",
"target_lang": "multi",
"category": "legal",
"terms": [
{

View File

@@ -2,7 +2,7 @@
"name": "Marketing & Communication - Français → Anglais",
"description": "Terminologie marketing et communication française vers anglaise pour campagnes, stratégies et contenus marketing",
"source_lang": "fr",
"target_lang": "en",
"target_lang": "multi",
"category": "marketing",
"terms": [
{

View File

@@ -2,7 +2,7 @@
"name": "Médical & Santé - Français → Anglais",
"description": "Terminologie médicale française vers anglaise pour rapports médicaux, publications scientifiques et documents de santé",
"source_lang": "fr",
"target_lang": "en",
"target_lang": "multi",
"category": "medical",
"terms": [
{

View File

@@ -2,7 +2,7 @@
"name": "Scientifique & Recherche - Français → Anglais",
"description": "Terminologie scientifique française vers anglaise pour publications, articles de recherche et thèses",
"source_lang": "fr",
"target_lang": "en",
"target_lang": "multi",
"category": "scientific",
"terms": [
{

View File

@@ -2,7 +2,7 @@
"name": "Technologie / IT - Français → Anglais",
"description": "Terminologie technique et informatique française vers anglaise pour documentation, spécifications et rapports IT",
"source_lang": "fr",
"target_lang": "en",
"target_lang": "multi",
"category": "technology",
"terms": [
{