From 83f02c8fa8fb044d0d57e3665aa11b4a54d7b066 Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Sun, 12 Jul 2026 13:21:07 +0200 Subject: [PATCH] fix(ui): localize Dialog close and LanguageSwitcher group aria-labels B-1: Dialog close button exposed French 'Fermer' to EN screen-reader users; B-2: switcher group label was English-only. New dict keys common.close + lang.group_label in both dicts (parity kept). --- src/components/brand/LanguageSwitcher.tsx | 2 +- src/components/ui/Dialog.tsx | 4 +++- src/i18n/en.ts | 2 ++ src/i18n/fr.ts | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/brand/LanguageSwitcher.tsx b/src/components/brand/LanguageSwitcher.tsx index 32501a87..482104e6 100644 --- a/src/components/brand/LanguageSwitcher.tsx +++ b/src/components/brand/LanguageSwitcher.tsx @@ -14,7 +14,7 @@ export default function LanguageSwitcher() { return (
{ITEMS.map((item) => { diff --git a/src/components/ui/Dialog.tsx b/src/components/ui/Dialog.tsx index 0722b960..511b0159 100644 --- a/src/components/ui/Dialog.tsx +++ b/src/components/ui/Dialog.tsx @@ -1,5 +1,6 @@ import { useEffect, type ReactNode } from 'react' import { AnimatePresence, motion } from 'motion/react' +import { useT } from '@/i18n/useT' export interface DialogProps { open: boolean @@ -17,6 +18,7 @@ const SIZE: Record, string> = { } export default function Dialog({ open, onClose, title, children, size = 'md' }: DialogProps) { + const t = useT() useEffect(() => { if (!open) return const onKey = (e: KeyboardEvent) => e.key === 'Escape' && onClose() @@ -51,7 +53,7 @@ export default function Dialog({ open, onClose, title, children, size = 'md' }:

{title}