fix(i18n): prepare for Lokalise
This commit is contained in:
@@ -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>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user