feat: Complete frontend i18n implementation for dashboard components
- Updated TypeScript types to support reasoning_data field - Integrated useReasoningTranslation hook in all dashboard components: * ActionQueueCard: Translates PO reasoning_data and UI text * ProductionTimelineCard: Translates batch reasoning_data and UI text * OrchestrationSummaryCard: Translates all hardcoded English text * HealthStatusCard: Translates all hardcoded English text - Added missing translation keys to all language files (EN, ES, EU): * health_status: never, critical_issues, actions_needed * action_queue: total, critical, important * orchestration_summary: ready_to_plan, run_info, took, show_more/less * production_timeline: Complete rebuild with new keys - Components now support fallback for deprecated text fields - Full multilingual support: English, Spanish, Basque Dashboard is now fully translatable and will display reasoning in user's language.
This commit is contained in:
@@ -50,52 +50,55 @@
|
||||
"yellow": "Some items need attention",
|
||||
"red": "Critical issues require immediate action",
|
||||
"last_updated": "Last updated",
|
||||
"next_check": "Next check"
|
||||
"next_check": "Next check",
|
||||
"never": "Never",
|
||||
"critical_issues": "{{count}} critical issue{{count, plural, one {} other {s}}}",
|
||||
"actions_needed": "{{count}} action{{count, plural, one {} other {s}}} needed"
|
||||
},
|
||||
"action_queue": {
|
||||
"title": "What Needs Your Attention",
|
||||
"why_needed": "Why this is needed:",
|
||||
"what_if_not": "What happens if I don't do this?",
|
||||
"estimated_time": "Estimated time: {{minutes}} min",
|
||||
"estimated_time": "Estimated time",
|
||||
"all_caught_up": "All caught up!",
|
||||
"no_actions": "No actions requiring your attention right now.",
|
||||
"show_more": "Show {{count}} More Action{{plural}}",
|
||||
"show_more": "Show {{count}} More Action{{count, plural, one {} other {s}}}",
|
||||
"show_less": "Show Less",
|
||||
"critical_badge": "{{count}} critical",
|
||||
"important_badge": "{{count}} important"
|
||||
"total": "total",
|
||||
"critical": "critical",
|
||||
"important": "important"
|
||||
},
|
||||
"orchestration_summary": {
|
||||
"title": "Last Night I Planned Your Day",
|
||||
"no_runs": "Ready to Plan Your Bakery Day",
|
||||
"no_runs_message": "The system hasn't run daily planning yet. Click 'Run Daily Planning' to generate your first plan.",
|
||||
"run_number": "Orchestration run #{{number}}",
|
||||
"duration": "Took {{seconds}}s",
|
||||
"pos_created": "Created {{count}} purchase order{{plural}}",
|
||||
"batches_created": "Scheduled {{count}} production batch{{plural}}",
|
||||
"ready_to_plan": "Ready to Plan Your Bakery Day",
|
||||
"run_planning": "Run Daily Planning",
|
||||
"run_info": "Orchestration run #{{runNumber}}",
|
||||
"took": "Took {{seconds}}s",
|
||||
"created_pos": "Created {{count}} purchase order{{count, plural, one {} other {s}}}",
|
||||
"scheduled_batches": "Scheduled {{count}} production batch{{count, plural, one {} other {es}}}",
|
||||
"show_more": "Show {{count}} more",
|
||||
"show_less": "Show less",
|
||||
"no_actions": "No new actions needed - everything is on track!",
|
||||
"based_on": "Based on:",
|
||||
"customer_orders": "{{count}} customer order{{plural}}",
|
||||
"customer_orders": "{{count}} customer order{{count, plural, one {} other {s}}}",
|
||||
"historical_demand": "Historical demand",
|
||||
"inventory_levels": "Inventory levels",
|
||||
"ai_optimization": "AI optimization",
|
||||
"actions_required": "{{count}} item{{plural}} need{{verb}} your approval before proceeding"
|
||||
"actions_required": "{{count}} item{{count, plural, one {} other {s}}} need{{count, plural, one {s} other {}}} your approval before proceeding"
|
||||
},
|
||||
"production_timeline": {
|
||||
"title": "Today's Production Timeline",
|
||||
"no_batches": "No production batches scheduled for today",
|
||||
"status": {
|
||||
"pending": "Pending",
|
||||
"in_progress": "In Progress",
|
||||
"completed": "Completed",
|
||||
"cancelled": "Cancelled"
|
||||
},
|
||||
"ready_by": "Ready by {{time}}",
|
||||
"priority": {
|
||||
"low": "Low Priority",
|
||||
"normal": "Normal",
|
||||
"high": "High Priority",
|
||||
"urgent": "Urgent"
|
||||
}
|
||||
"title": "Your Production Plan Today",
|
||||
"no_production": "No Production Scheduled",
|
||||
"no_batches": "No batches are scheduled for production today.",
|
||||
"ready_by": "Ready by",
|
||||
"start_batch": "Start Batch",
|
||||
"pause_batch": "Pause Batch",
|
||||
"completed": "Completed",
|
||||
"total": "Total",
|
||||
"done": "Done",
|
||||
"active": "Active",
|
||||
"pending": "Pending",
|
||||
"view_full_schedule": "View Full Production Schedule"
|
||||
},
|
||||
"insights": {
|
||||
"savings": "Savings This Week",
|
||||
|
||||
@@ -50,52 +50,55 @@
|
||||
"yellow": "Algunos elementos necesitan atención",
|
||||
"red": "Problemas críticos requieren acción inmediata",
|
||||
"last_updated": "Última actualización",
|
||||
"next_check": "Próxima verificación"
|
||||
"next_check": "Próxima verificación",
|
||||
"never": "Nunca",
|
||||
"critical_issues": "{{count}} problema{{count, plural, one {} other {s}}} crítico{{count, plural, one {} other {s}}}",
|
||||
"actions_needed": "{{count}} acción{{count, plural, one {} other {es}}} necesaria{{count, plural, one {} other {s}}}"
|
||||
},
|
||||
"action_queue": {
|
||||
"title": "Qué Necesita Tu Atención",
|
||||
"why_needed": "Por qué es necesario esto:",
|
||||
"what_if_not": "¿Qué pasa si no hago esto?",
|
||||
"estimated_time": "Tiempo estimado: {{minutes}} min",
|
||||
"estimated_time": "Tiempo estimado",
|
||||
"all_caught_up": "¡Todo al día!",
|
||||
"no_actions": "No hay acciones que requieran tu atención en este momento.",
|
||||
"show_more": "Mostrar {{count}} Acción{{plural}} Más",
|
||||
"show_more": "Mostrar {{count}} Acción{{count, plural, one {} other {es}}} Más",
|
||||
"show_less": "Mostrar Menos",
|
||||
"critical_badge": "{{count}} crítico{{plural}}",
|
||||
"important_badge": "{{count}} importante{{plural}}"
|
||||
"total": "total",
|
||||
"critical": "críticas",
|
||||
"important": "importantes"
|
||||
},
|
||||
"orchestration_summary": {
|
||||
"title": "Anoche Planifiqué Tu Día",
|
||||
"no_runs": "Listo para Planificar Tu Día en la Panadería",
|
||||
"no_runs_message": "El sistema aún no ha ejecutado la planificación diaria. Haz clic en 'Ejecutar Planificación Diaria' para generar tu primer plan.",
|
||||
"run_number": "Ejecución de orquestación #{{number}}",
|
||||
"duration": "Tardó {{seconds}}s",
|
||||
"pos_created": "Creé {{count}} orden{{plural}} de compra",
|
||||
"batches_created": "Programé {{count}} lote{{plural}} de producción",
|
||||
"no_actions": "¡No se necesitan nuevas acciones - todo está en marcha!",
|
||||
"ready_to_plan": "Listo Para Planificar Tu Día en la Panadería",
|
||||
"run_planning": "Ejecutar Planificación Diaria",
|
||||
"run_info": "Ejecución de orquestación #{{runNumber}}",
|
||||
"took": "Duró {{seconds}}s",
|
||||
"created_pos": "{{count}} orden{{count, plural, one {} other {es}}} de compra creada{{count, plural, one {} other {s}}}",
|
||||
"scheduled_batches": "{{count}} lote{{count, plural, one {} other {s}}} de producción programado{{count, plural, one {} other {s}}}",
|
||||
"show_more": "Mostrar {{count}} más",
|
||||
"show_less": "Mostrar menos",
|
||||
"no_actions": "¡No se necesitan nuevas acciones - todo va según lo planeado!",
|
||||
"based_on": "Basado en:",
|
||||
"customer_orders": "{{count}} pedido{{plural}} de cliente{{plural}}",
|
||||
"customer_orders": "{{count}} pedido{{count, plural, one {} other {s}}} de cliente",
|
||||
"historical_demand": "Demanda histórica",
|
||||
"inventory_levels": "Niveles de inventario",
|
||||
"ai_optimization": "Optimización con IA",
|
||||
"actions_required": "{{count}} elemento{{plural}} necesita{{verb}} tu aprobación antes de proceder"
|
||||
"ai_optimization": "Optimización por IA",
|
||||
"actions_required": "{{count}} elemento{{count, plural, one {} other {s}}} necesita{{count, plural, one {} other {n}}} tu aprobación antes de continuar"
|
||||
},
|
||||
"production_timeline": {
|
||||
"title": "Línea de Tiempo de Producción de Hoy",
|
||||
"no_batches": "No hay lotes de producción programados para hoy",
|
||||
"status": {
|
||||
"pending": "Pendiente",
|
||||
"in_progress": "En Proceso",
|
||||
"completed": "Completado",
|
||||
"cancelled": "Cancelado"
|
||||
},
|
||||
"ready_by": "Listo para {{time}}",
|
||||
"priority": {
|
||||
"low": "Prioridad Baja",
|
||||
"normal": "Normal",
|
||||
"high": "Prioridad Alta",
|
||||
"urgent": "Urgente"
|
||||
}
|
||||
"title": "Tu Plan de Producción de Hoy",
|
||||
"no_production": "No Hay Producción Programada",
|
||||
"no_batches": "No hay lotes programados para producción hoy.",
|
||||
"ready_by": "Listo para",
|
||||
"start_batch": "Iniciar Lote",
|
||||
"pause_batch": "Pausar Lote",
|
||||
"completed": "Completado",
|
||||
"total": "Total",
|
||||
"done": "Hecho",
|
||||
"active": "Activo",
|
||||
"pending": "Pendiente",
|
||||
"view_full_schedule": "Ver Cronograma Completo de Producción"
|
||||
},
|
||||
"insights": {
|
||||
"savings": "Ahorros Esta Semana",
|
||||
|
||||
@@ -52,52 +52,55 @@ ko da.",
|
||||
"yellow": "Elementu batzuek arreta behar dute",
|
||||
"red": "Arazo kritikoek ekintza berehalakoa behar dute",
|
||||
"last_updated": "Azken eguneratzea",
|
||||
"next_check": "Hurrengo egiaztapena"
|
||||
"next_check": "Hurrengo egiaztapena",
|
||||
"never": "Inoiz ez",
|
||||
"critical_issues": "{{count}} arazo kritiko",
|
||||
"actions_needed": "{{count}} ekintza behar"
|
||||
},
|
||||
"action_queue": {
|
||||
"title": "Zer Behar Du Zure Arreta",
|
||||
"why_needed": "Zergatik behar da hau:",
|
||||
"what_if_not": "Zer gertatzen da hau egiten ez badut?",
|
||||
"estimated_time": "Estimatutako denbora: {{minutes}} min",
|
||||
"estimated_time": "Estimatutako denbora",
|
||||
"all_caught_up": "Dena egunean!",
|
||||
"no_actions": "Ez dago une honetan zure arreta behar duen ekintzarik.",
|
||||
"show_more": "Erakutsi {{count}} Ekintza{{plural}} Gehiago",
|
||||
"show_more": "Erakutsi {{count}} Ekintza gehiago",
|
||||
"show_less": "Erakutsi Gutxiago",
|
||||
"critical_badge": "{{count}} kritiko{{plural}}",
|
||||
"important_badge": "{{count}} garrantzitsu{{plural}}"
|
||||
"total": "guztira",
|
||||
"critical": "kritiko",
|
||||
"important": "garrantzitsu"
|
||||
},
|
||||
"orchestration_summary": {
|
||||
"title": "Bart Gauean Zure Eguna Planifikatu Nuen",
|
||||
"no_runs": "Zure Okindegiko Eguna Planifikatzeko Prest",
|
||||
"no_runs_message": "Sistemak oraindik ez du eguneko plangintza exekutatu. Egin klik 'Exekutatu Eguneko Plangintza'-n zure lehen plana sortzeko.",
|
||||
"run_number": "Orkestazio exekuzioa #{{number}}",
|
||||
"duration": "{{seconds}}s behar izan zituen",
|
||||
"pos_created": "{{count}} erosketa agindu{{plural}} sortu nituen",
|
||||
"batches_created": "{{count}} ekoizpen lote{{plural}} programatu nituen",
|
||||
"ready_to_plan": "Zure Okindegiko Eguna Planifikatzeko Prest",
|
||||
"run_planning": "Exekutatu Eguneko Plangintza",
|
||||
"run_info": "Orkestazio exekuzioa #{{runNumber}}",
|
||||
"took": "{{seconds}}s behar izan zituen",
|
||||
"created_pos": "{{count}} erosketa agindu sortu",
|
||||
"scheduled_batches": "{{count}} ekoizpen lote programatu",
|
||||
"show_more": "Erakutsi {{count}} gehiago",
|
||||
"show_less": "Erakutsi gutxiago",
|
||||
"no_actions": "Ez dira ekintza berriak behar - dena bidean dago!",
|
||||
"based_on": "Oinarrituta:",
|
||||
"customer_orders": "{{count}} bezero eskaera{{plural}}",
|
||||
"customer_orders": "{{count}} bezero eskaera",
|
||||
"historical_demand": "Eskaera historikoa",
|
||||
"inventory_levels": "Inbentario mailak",
|
||||
"ai_optimization": "IA optimizazioa",
|
||||
"actions_required": "{{count}} elementu{{plural}}k zure onespena behar du{{verb}} aurrera jarraitu aurretik"
|
||||
"actions_required": "{{count}} elementuk zure onespena behar du aurrera jarraitu aurretik"
|
||||
},
|
||||
"production_timeline": {
|
||||
"title": "Gaurko Ekoizpen Denbora-lerroa",
|
||||
"no_batches": "Ez dago ekoizpen loterik programatuta gaurko",
|
||||
"status": {
|
||||
"pending": "Zain",
|
||||
"in_progress": "Prozesuan",
|
||||
"completed": "Osatua",
|
||||
"cancelled": "Bertan behera utzita"
|
||||
},
|
||||
"ready_by": "{{time}}rako prest",
|
||||
"priority": {
|
||||
"low": "Lehentasun Baxua",
|
||||
"normal": "Normala",
|
||||
"high": "Lehentasun Altua",
|
||||
"urgent": "Larria"
|
||||
}
|
||||
"title": "Zure Gaurko Ekoizpen Plana",
|
||||
"no_production": "Ez Dago Ekoizpenik Programatuta",
|
||||
"no_batches": "Ez dago loterik programatuta gaur ekoizpenerako.",
|
||||
"ready_by": "Prest egongo da",
|
||||
"start_batch": "Hasi Lotea",
|
||||
"pause_batch": "Pausatu Lotea",
|
||||
"completed": "Osatua",
|
||||
"total": "Guztira",
|
||||
"done": "Eginda",
|
||||
"active": "Aktibo",
|
||||
"pending": "Zain",
|
||||
"view_full_schedule": "Ikusi Ekoizpen Egutegi Osoa"
|
||||
},
|
||||
"insights": {
|
||||
"savings": "Aste Honetako Aurrezkiak",
|
||||
|
||||
Reference in New Issue
Block a user