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) <noreply@anthropic.com>
master
oabrivard 3 months ago
parent 7f647bc656
commit 3dea7bf286

@ -97,6 +97,8 @@ const fr = {
'synthesis.title': 'Synthese de la Semaine {week}', 'synthesis.title': 'Synthese de la Semaine {week}',
'synthesis.generatedAt': 'Generee le {date}', 'synthesis.generatedAt': 'Generee le {date}',
'synthesis.backLink': 'Retour aux syntheses', 'synthesis.backLink': 'Retour aux syntheses',
'synthesis.readMore': 'Lire la suite',
'synthesis.collapse': 'Reduire',
'synthesis.delete': 'Supprimer', 'synthesis.delete': 'Supprimer',
'synthesis.deleteConfirmMessage': 'synthesis.deleteConfirmMessage':
'Etes-vous sur de vouloir supprimer cette synthese definitivement ?', 'Etes-vous sur de vouloir supprimer cette synthese definitivement ?',

@ -34,6 +34,7 @@ function truncateSummary(text: string, level: number): string {
/** Renders a single news article with its title (linked) and summary. */ /** Renders a single news article with its title (linked) and summary. */
const NewsItemCard: Component<{ item: NewsItemType; displayLevel: number }> = (props) => { const NewsItemCard: Component<{ item: NewsItemType; displayLevel: number }> = (props) => {
const { t } = useI18n();
const [expanded, setExpanded] = createSignal(false); const [expanded, setExpanded] = createSignal(false);
const effectiveLevel = () => expanded() ? 4 : props.displayLevel; const effectiveLevel = () => expanded() ? 4 : props.displayLevel;
@ -71,7 +72,7 @@ const NewsItemCard: Component<{ item: NewsItemType; displayLevel: number }> = (p
onClick={() => setExpanded(true)} onClick={() => setExpanded(true)}
class="mt-2 text-xs text-indigo-600 hover:text-indigo-800 font-medium" class="mt-2 text-xs text-indigo-600 hover:text-indigo-800 font-medium"
> >
Lire la suite &darr; {t('synthesis.readMore')} &darr;
</button> </button>
</Show> </Show>
<Show when={expanded() && props.displayLevel < 4}> <Show when={expanded() && props.displayLevel < 4}>
@ -79,7 +80,7 @@ const NewsItemCard: Component<{ item: NewsItemType; displayLevel: number }> = (p
onClick={() => setExpanded(false)} onClick={() => setExpanded(false)}
class="mt-2 text-xs text-indigo-600 hover:text-indigo-800 font-medium" class="mt-2 text-xs text-indigo-600 hover:text-indigo-800 font-medium"
> >
Reduire &uarr; {t('synthesis.collapse')} &uarr;
</button> </button>
</Show> </Show>
</div> </div>

Loading…
Cancel
Save