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:
Claude
2025-11-07 18:34:30 +00:00
parent 84d38842ab
commit 28136cf198
9 changed files with 619 additions and 152 deletions

View File

@@ -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",