From 3dea7bf286ade21cfcd140e04873eecffb3c24c5 Mon Sep 17 00:00:00 2001 From: oabrivard Date: Fri, 27 Mar 2026 14:33:22 +0100 Subject: [PATCH] fix: replace hardcoded French strings with i18n keys in SynthesisDetail Replace "Lire la suite" and "Reduire" with t('synthesis.readMore') and t('synthesis.collapse'). Adds both keys to fr.ts. Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/i18n/fr.ts | 2 ++ frontend/src/pages/SynthesisDetail.tsx | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/i18n/fr.ts b/frontend/src/i18n/fr.ts index a85dcb8..5d4de55 100644 --- a/frontend/src/i18n/fr.ts +++ b/frontend/src/i18n/fr.ts @@ -97,6 +97,8 @@ const fr = { 'synthesis.title': 'Synthese de la Semaine {week}', 'synthesis.generatedAt': 'Generee le {date}', 'synthesis.backLink': 'Retour aux syntheses', + 'synthesis.readMore': 'Lire la suite', + 'synthesis.collapse': 'Reduire', 'synthesis.delete': 'Supprimer', 'synthesis.deleteConfirmMessage': 'Etes-vous sur de vouloir supprimer cette synthese definitivement ?', diff --git a/frontend/src/pages/SynthesisDetail.tsx b/frontend/src/pages/SynthesisDetail.tsx index a964e5e..45bf060 100644 --- a/frontend/src/pages/SynthesisDetail.tsx +++ b/frontend/src/pages/SynthesisDetail.tsx @@ -34,6 +34,7 @@ function truncateSummary(text: string, level: number): string { /** Renders a single news article with its title (linked) and summary. */ const NewsItemCard: Component<{ item: NewsItemType; displayLevel: number }> = (props) => { + const { t } = useI18n(); const [expanded, setExpanded] = createSignal(false); const effectiveLevel = () => expanded() ? 4 : props.displayLevel; @@ -71,7 +72,7 @@ const NewsItemCard: Component<{ item: NewsItemType; displayLevel: number }> = (p onClick={() => setExpanded(true)} class="mt-2 text-xs text-indigo-600 hover:text-indigo-800 font-medium" > - Lire la suite ↓ + {t('synthesis.readMore')} ↓ @@ -79,7 +80,7 @@ const NewsItemCard: Component<{ item: NewsItemType; displayLevel: number }> = (p onClick={() => setExpanded(false)} class="mt-2 text-xs text-indigo-600 hover:text-indigo-800 font-medium" > - Reduire ↑ + {t('synthesis.collapse')} ↑