Skip to content

Commit 64b6013

Browse files
committed
Improve footer translation
1 parent fbba1a5 commit 64b6013

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

src/Footer.tsx

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -483,19 +483,12 @@ export const Footer = memo(
483483
</ul>
484484
<div className={cx(fr.cx("fr-footer__bottom-copy"), classes.bottomCopy)}>
485485
<p>
486-
{license === undefined ? (
487-
<>
488-
{t("license mention")}{" "}
489-
<a
490-
href="https://github.com/etalab/licence-ouverte/blob/master/LO.md"
491-
target="_blank"
492-
>
493-
{t("etalab license")}{" "}
494-
</a>{" "}
495-
</>
496-
) : (
497-
license
498-
)}
486+
{license === undefined
487+
? t("license mention", {
488+
"licenseUrl":
489+
"https://github.com/etalab/licence-ouverte/blob/master/LO.md"
490+
})
491+
: license}
499492
</p>
500493
</div>
501494
</div>
@@ -522,8 +515,14 @@ const { useTranslation, addFooterTranslations } = createComponentI18nApi({
522515
"terms": "Mentions légales",
523516
"personal data": "Données personnelles",
524517
"cookies management": "Gestion des cookies",
525-
"license mention": "Sauf mention contraire, tous les contenus de ce site sont sous",
526-
"etalab license": "licence etalab-2.0",
518+
"license mention": (p: { licenseUrl: string }) => (
519+
<>
520+
Sauf mention contraire, tous les contenus de ce site sont sous{" "}
521+
<a href={p.licenseUrl} target="_blank">
522+
licence etalab-2.0
523+
</a>
524+
</>
525+
),
527526
"our partners": "Nos partenaires"
528527
/* spell-checker: enable */
529528
}
@@ -538,8 +537,14 @@ addFooterTranslations({
538537
"non compliant": "non compliant",
539538
"partially compliant": "partially compliant",
540539
"fully compliant": "fully compliant",
541-
"license mention": "Unless stated otherwise all content of this website are under",
542-
"etalab license": "etalab-2.0 license"
540+
"license mention": p => (
541+
<>
542+
Unless stated otherwise, all content of this website is under the{" "}
543+
<a href={p.licenseUrl} target="_blank">
544+
etalab-2.0 license
545+
</a>
546+
</>
547+
)
543548
}
544549
});
545550

0 commit comments

Comments
 (0)