From 3323d4e45d28caf0b9f3b50b95e33c5ea2572454 Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Sat, 23 May 2026 22:18:37 +0200 Subject: [PATCH] feat(ui): display laterality side in zone badges Pass t() into describeZone and append (G/D or L/R) when z.side is set. Co-Authored-By: Claude --- src/components/observation/ObservationCard.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/observation/ObservationCard.tsx b/src/components/observation/ObservationCard.tsx index 00fa83eb..a9787488 100644 --- a/src/components/observation/ObservationCard.tsx +++ b/src/components/observation/ObservationCard.tsx @@ -46,6 +46,7 @@ function describeZone( z: ObservationZone, bones: Map, locale: Locale, + t: (key: string) => string, ): string { const label = boneLabel(bones.get(z.boneId), locale, z.boneId) if (z.vertebrae?.length) { @@ -54,6 +55,12 @@ function describeZone( .join(', ') return `${label} (${vs})` } + if (z.side) { + const sideLabel = t( + z.side === 'left' ? 'lateral.left_short' : 'lateral.right_short', + ) + return `${label} (${sideLabel})` + } return label } @@ -245,7 +252,7 @@ export default function ObservationCard({ return (
  • - {describeZone(z, bones, locale)} + {describeZone(z, bones, locale, t)} {supportsVertebrae && (