fix(i18n): add missing menu translations and fix admin language resolution
Two issues caused the admin sidebar to show a mix of French and English:
1. Only 3 of 14 modules had "menu" translations in their locale files.
When a key was missing, _translate_label() fell back to English Title
Case from the key name — mixing with French from modules that had
translations. Added menu sections to all 4 languages (en, fr, de, lb)
across 13 modules.
2. The language middleware hardcoded admin to "en" ignoring user preference,
while the menu API fell back to DEFAULT_LANGUAGE ("fr") when
preferred_language was NULL. Fixed middleware to respect user's
preferred_language and menu API to use middleware-resolved language
as fallback.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1 +1,12 @@
|
||||
{}
|
||||
{
|
||||
"menu": {
|
||||
"platform_health": "Plattform-Gesundheit",
|
||||
"platform_monitoring": "Plattform-Überwachung",
|
||||
"capacity_monitor": "Kapazitätsmonitor",
|
||||
"testing_hub": "Test-Center",
|
||||
"code_quality": "Code-Qualität",
|
||||
"import_jobs": "Import-Aufträge",
|
||||
"background_tasks": "Hintergrundaufgaben",
|
||||
"application_logs": "Anwendungsprotokolle"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,12 @@
|
||||
{}
|
||||
{
|
||||
"menu": {
|
||||
"platform_health": "Platform Health",
|
||||
"platform_monitoring": "Platform Monitoring",
|
||||
"capacity_monitor": "Capacity Monitor",
|
||||
"testing_hub": "Testing Hub",
|
||||
"code_quality": "Code Quality",
|
||||
"import_jobs": "Import Jobs",
|
||||
"background_tasks": "Background Tasks",
|
||||
"application_logs": "Application Logs"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,12 @@
|
||||
{}
|
||||
{
|
||||
"menu": {
|
||||
"platform_health": "Santé de la plateforme",
|
||||
"platform_monitoring": "Surveillance de la plateforme",
|
||||
"capacity_monitor": "Moniteur de capacité",
|
||||
"testing_hub": "Centre de tests",
|
||||
"code_quality": "Qualité du code",
|
||||
"import_jobs": "Tâches d'import",
|
||||
"background_tasks": "Tâches de fond",
|
||||
"application_logs": "Journaux applicatifs"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,12 @@
|
||||
{}
|
||||
{
|
||||
"menu": {
|
||||
"platform_health": "Plattform-Gesondheet",
|
||||
"platform_monitoring": "Plattform-Iwwerwaachung",
|
||||
"capacity_monitor": "Kapazitéitsmonitor",
|
||||
"testing_hub": "Test-Center",
|
||||
"code_quality": "Code-Qualitéit",
|
||||
"import_jobs": "Import-Aufträg",
|
||||
"background_tasks": "Hannergrondaufgaben",
|
||||
"application_logs": "Applikatiounsprotokoller"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user