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.5 KiB
JSON
47 lines
1.5 KiB
JSON
{
|
|
"customers": {
|
|
"title": "Customers",
|
|
"customer": "Customer",
|
|
"add_customer": "Add Customer",
|
|
"edit_customer": "Edit Customer",
|
|
"customer_name": "Customer Name",
|
|
"customer_email": "Customer Email",
|
|
"customer_phone": "Customer Phone",
|
|
"customer_number": "Customer Number",
|
|
"first_name": "First Name",
|
|
"last_name": "Last Name",
|
|
"merchant": "Merchant",
|
|
"total_orders": "Total Orders",
|
|
"total_spent": "Total Spent",
|
|
"last_order": "Last Order",
|
|
"registered": "Registered",
|
|
"no_customers": "No customers found",
|
|
"search_customers": "Search customers..."
|
|
},
|
|
"messages": {
|
|
"failed_to_toggle_customer_status": "Failed to toggle customer status",
|
|
"failed_to_load_customer_details": "Failed to load customer details",
|
|
"failed_to_load_customer_orders": "Failed to load customer orders"
|
|
},
|
|
"features": {
|
|
"customer_view": {
|
|
"name": "Customer View",
|
|
"description": "View and manage customer information"
|
|
},
|
|
"customer_export": {
|
|
"name": "Customer Export",
|
|
"description": "Export customer data"
|
|
},
|
|
"customer_messaging": {
|
|
"name": "Customer Messaging",
|
|
"description": "Send messages to customers"
|
|
}
|
|
},
|
|
"menu": {
|
|
"store_operations": "Store Operations",
|
|
"customers_section": "Customers",
|
|
"customers": "Customers",
|
|
"all_customers": "All Customers"
|
|
}
|
|
}
|