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

@@ -1,5 +1,7 @@
"use client"
import { useState } from "react"
import { useIntl } from "react-intl"
import JsonToHtml from "@/components/JsonToHtml"
import SectionContainer from "@/components/Section/Container"
@@ -14,6 +16,8 @@ import type { AccordionProps } from "@/types/components/blocks/Accordion"
import { HotelHashValues } from "@/types/components/hotelPage/tabNavigation"
export default function AccordionSection({ accordion, title }: AccordionProps) {
const intl = useIntl()
const showToggleButton = accordion.length > 5
const [allAccordionsVisible, setAllAccordionsVisible] =
useState(!showToggleButton)
@@ -44,8 +48,12 @@ export default function AccordionSection({ accordion, title }: AccordionProps) {
<ShowMoreButton
loadMoreData={toggleAccordions}
showLess={allAccordionsVisible}
textShowMore="See all FAQ"
textShowLess="See less FAQ"
textShowMore={intl.formatMessage({
id: "See all FAQ",
})}
textShowLess={intl.formatMessage({
id: "See less FAQ",
})}
/>
) : null}
</SectionContainer>