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": "Lagerbestand",
|
|
"quantity": "Menge",
|
|
"reorder_point": "Nachbestellpunkt",
|
|
"adjust_stock": "Bestand anpassen",
|
|
"stock_in": "Wareneingang",
|
|
"stock_out": "Warenausgang",
|
|
"transfer": "Transfer",
|
|
"history": "Verlauf",
|
|
"low_stock_alert": "Warnung bei geringem Bestand",
|
|
"out_of_stock_alert": "Warnung bei Ausverkauf"
|
|
},
|
|
"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": "Grundlegende Lagerverwaltung"
|
|
},
|
|
"inventory_locations": {
|
|
"name": "Mehrere Standorte",
|
|
"description": "Inventar an mehreren Standorten verwalten"
|
|
},
|
|
"inventory_purchase_orders": {
|
|
"name": "Bestellungen",
|
|
"description": "Bestellungen erstellen und verwalten"
|
|
},
|
|
"low_stock_alerts": {
|
|
"name": "Niedrigbestandswarnungen",
|
|
"description": "Automatische Benachrichtigungen bei niedrigem Lagerbestand"
|
|
}
|
|
},
|
|
"menu": {
|
|
"store_operations": "Shop-Betrieb",
|
|
"products_inventory": "Produkte & Inventar",
|
|
"products": "Produkte",
|
|
"inventory": "Inventar"
|
|
}
|
|
}
|