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:
Knacky
2026-06-22 00:08:45 +02:00
parent 2931e4aaf9
commit 6648d1cc2e
4 changed files with 15 additions and 20 deletions

View File

@@ -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>
);
}