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.6 KiB
JSON
47 lines
1.6 KiB
JSON
{
|
|
"inventory": {
|
|
"title": "Inventar",
|
|
"stock_level": "Lagerniveau",
|
|
"quantity": "Quantitéit",
|
|
"reorder_point": "Nobestellungspunkt",
|
|
"adjust_stock": "Lager upaassen",
|
|
"stock_in": "Lager eran",
|
|
"stock_out": "Lager eraus",
|
|
"transfer": "Transfer",
|
|
"history": "Geschicht",
|
|
"low_stock_alert": "Niddreg Lager Alarm",
|
|
"out_of_stock_alert": "Net op Lager Alarm"
|
|
},
|
|
"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": "Basis-Inventar",
|
|
"description": "Grondleeënd Lagerverwaltung"
|
|
},
|
|
"inventory_locations": {
|
|
"name": "Méi Standuerter",
|
|
"description": "Inventar u méi Standuerter verwalten"
|
|
},
|
|
"inventory_purchase_orders": {
|
|
"name": "Bestellungen",
|
|
"description": "Bestellungen erstellen an verwalten"
|
|
},
|
|
"low_stock_alerts": {
|
|
"name": "Niddreg-Lagerbestandswarnungen",
|
|
"description": "Automatesch Benoriichtegungen bei niddregem Lagerbestand"
|
|
}
|
|
},
|
|
"menu": {
|
|
"store_operations": "Buttek-Operatiounen",
|
|
"products_inventory": "Produkter & Inventar",
|
|
"products": "Produkter",
|
|
"inventory": "Inventar"
|
|
}
|
|
}
|