fix(i18n): prepare for Lokalise

This commit is contained in:
Michael Zetterberg
2025-01-03 14:54:46 +01:00
parent cbc17e2c5b
commit d2ce9c0d7c
120 changed files with 1703 additions and 1042 deletions

View File

@@ -16,8 +16,8 @@ export default function ShowMoreButton({
intent,
disabled,
showLess,
textShowMore = "Show more",
textShowLess = "Show less",
textShowMore,
textShowLess,
loadMoreData,
}: ShowMoreButtonProps) {
const intl = useIntl()
@@ -26,6 +26,18 @@ export default function ShowMoreButton({
intent,
})
if (!textShowMore) {
textShowMore = intl.formatMessage({
id: "Show more",
})
}
if (!textShowLess) {
textShowLess = intl.formatMessage({
id: "Show less",
})
}
return (
<div className={`${classNames} ${showLess ? styles.showLess : ""}`}>
<Button
@@ -38,7 +50,7 @@ export default function ShowMoreButton({
intent="text"
>
<ChevronDownIcon className={styles.icon} />
{intl.formatMessage({ id: showLess ? textShowLess : textShowMore })}
{showLess ? textShowLess : textShowMore}
</Button>
</div>
)