fix(frontend): translate status badge labels via i18n helpers
StatusBadge and SimulationStatusBadge now call engagementStatusLabel() / simulationStatusLabel() from @/i18n/status.ts instead of hardcoded English strings. Tests updated to expect French labels (Planifié/Actif/Clôturé, En attente/En cours/Révision requise/Terminé). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
import type { SimulationStatus } from '@/api/types';
|
||||
|
||||
const LABELS: Record<SimulationStatus, string> = {
|
||||
pending: 'Pending',
|
||||
in_progress: 'In progress',
|
||||
review_required: 'Review required',
|
||||
done: 'Done',
|
||||
};
|
||||
import { simulationStatusLabel } from '@/i18n/status';
|
||||
|
||||
const STYLES: Record<SimulationStatus, string> = {
|
||||
pending: 'bg-cloud text-graphite border border-hairline',
|
||||
@@ -21,7 +15,7 @@ export function SimulationStatusBadge({ status }: { status: SimulationStatus }):
|
||||
data-testid="simulation-status-badge"
|
||||
data-status={status}
|
||||
>
|
||||
{LABELS[status]}
|
||||
{simulationStatusLabel(status)}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user