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,10 +1,5 @@
|
||||
import type { EngagementStatus } from '@/api/types';
|
||||
|
||||
const LABELS: Record<EngagementStatus, string> = {
|
||||
planned: 'Planned',
|
||||
active: 'Active',
|
||||
closed: 'Closed',
|
||||
};
|
||||
import { engagementStatusLabel } from '@/i18n/status';
|
||||
|
||||
const STYLES: Record<EngagementStatus, string> = {
|
||||
planned: 'bg-warn-soft text-warn border border-warn',
|
||||
@@ -19,7 +14,7 @@ export function StatusBadge({ status }: { status: EngagementStatus }): JSX.Eleme
|
||||
data-testid="status-badge"
|
||||
data-status={status}
|
||||
>
|
||||
{LABELS[status]}
|
||||
{engagementStatusLabel(status)}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user