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>
47 lines
1.7 KiB
JSON
47 lines
1.7 KiB
JSON
{
|
|
"inventory": {
|
|
"title": "Inventaire",
|
|
"stock_level": "Niveau de stock",
|
|
"quantity": "Quantité",
|
|
"reorder_point": "Seuil de réapprovisionnement",
|
|
"adjust_stock": "Ajuster le stock",
|
|
"stock_in": "Entrée de stock",
|
|
"stock_out": "Sortie de stock",
|
|
"transfer": "Transfert",
|
|
"history": "Historique",
|
|
"low_stock_alert": "Alerte stock faible",
|
|
"out_of_stock_alert": "Alerte rupture de stock"
|
|
},
|
|
"messages": {
|
|
"stock_adjusted_successfully": "Stock adjusted successfully",
|
|
"quantity_set_successfully": "Quantity set successfully",
|
|
"inventory_entry_deleted": "Inventory entry deleted.",
|
|
"please_select_a_store_and_file": "Please select a store and file",
|
|
"import_completed_with_errors": "Import completed with errors"
|
|
},
|
|
"features": {
|
|
"inventory_basic": {
|
|
"name": "Inventaire de base",
|
|
"description": "Gestion de stock de base"
|
|
},
|
|
"inventory_locations": {
|
|
"name": "Emplacements multiples",
|
|
"description": "Gérer l'inventaire sur plusieurs emplacements"
|
|
},
|
|
"inventory_purchase_orders": {
|
|
"name": "Bons de commande",
|
|
"description": "Créer et gérer les bons de commande"
|
|
},
|
|
"low_stock_alerts": {
|
|
"name": "Alertes stock bas",
|
|
"description": "Notifications automatiques pour les niveaux de stock bas"
|
|
}
|
|
},
|
|
"menu": {
|
|
"store_operations": "Opérations du magasin",
|
|
"products_inventory": "Produits et Inventaire",
|
|
"products": "Produits",
|
|
"inventory": "Inventaire"
|
|
}
|
|
}
|