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>
80 lines
3.1 KiB
JSON
80 lines
3.1 KiB
JSON
{
|
|
"products": {
|
|
"title": "Produits",
|
|
"product": "Produit",
|
|
"add_product": "Ajouter un produit",
|
|
"edit_product": "Modifier le produit",
|
|
"delete_product": "Supprimer le produit",
|
|
"product_name": "Nom du produit",
|
|
"product_code": "Code produit",
|
|
"sku": "SKU",
|
|
"price": "Prix",
|
|
"sale_price": "Prix de vente",
|
|
"cost": "Coût",
|
|
"stock": "Stock",
|
|
"in_stock": "En stock",
|
|
"out_of_stock": "Rupture de stock",
|
|
"low_stock": "Stock faible",
|
|
"availability": "Disponibilité",
|
|
"available": "Disponible",
|
|
"unavailable": "Indisponible",
|
|
"brand": "Marque",
|
|
"category": "Catégorie",
|
|
"categories": "Catégories",
|
|
"image": "Image",
|
|
"images": "Images",
|
|
"main_image": "Image principale",
|
|
"gallery": "Galerie",
|
|
"weight": "Poids",
|
|
"dimensions": "Dimensions",
|
|
"color": "Couleur",
|
|
"size": "Taille",
|
|
"material": "Matériau",
|
|
"condition": "État",
|
|
"new": "Neuf",
|
|
"used": "Occasion",
|
|
"refurbished": "Reconditionné",
|
|
"no_products": "Aucun produit trouvé",
|
|
"search_products": "Rechercher des produits...",
|
|
"filter_by_category": "Filtrer par catégorie",
|
|
"filter_by_status": "Filtrer par statut",
|
|
"sort_by": "Trier par",
|
|
"sort_newest": "Plus récent",
|
|
"sort_oldest": "Plus ancien",
|
|
"sort_price_low": "Prix : croissant",
|
|
"sort_price_high": "Prix : décroissant",
|
|
"sort_name_az": "Nom : A-Z",
|
|
"sort_name_za": "Nom : Z-A"
|
|
},
|
|
"messages": {
|
|
"product_deleted_successfully": "Product deleted successfully",
|
|
"please_fill_in_all_required_fields": "Please fill in all required fields",
|
|
"product_updated_successfully": "Product updated successfully",
|
|
"failed_to_load_media_library": "Failed to load media library",
|
|
"no_store_associated_with_this_product": "No store associated with this product",
|
|
"please_select_an_image_file": "Please select an image file",
|
|
"image_must_be_less_than_10mb": "Image must be less than 10MB",
|
|
"image_uploaded_successfully": "Image uploaded successfully",
|
|
"product_removed_from_store_catalog": "Product removed from store catalog.",
|
|
"please_select_a_store": "Please select a store",
|
|
"please_enter_a_product_title_english": "Please enter a product title (English)",
|
|
"product_created_successfully": "Product created successfully",
|
|
"please_select_a_store_first": "Please select a store first"
|
|
},
|
|
"features": {
|
|
"products_limit": {
|
|
"name": "Produits",
|
|
"description": "Nombre maximum de produits dans le catalogue",
|
|
"unit": "produits"
|
|
},
|
|
"product_import_export": {
|
|
"name": "Import/Export",
|
|
"description": "Import et export en masse de produits"
|
|
}
|
|
},
|
|
"menu": {
|
|
"products_inventory": "Produits et Inventaire",
|
|
"all_products": "Tous les produits"
|
|
}
|
|
}
|