feat(SW-243): add translations

This commit is contained in:
Fredrik Thorsson
2024-08-21 14:25:05 +02:00
parent f4e63bedca
commit 5c357bc88b
8 changed files with 36 additions and 8 deletions

View File

@@ -12,7 +12,7 @@ import { StaySectionProps } from "@/types/components/hotelReservation/bookingCon
export default async function StaySection({ hotel, stay }: StaySectionProps) { export default async function StaySection({ hotel, stay }: StaySectionProps) {
const intl = await getIntl() const intl = await getIntl()
const nights = const nightsText =
stay.nights > 1 stay.nights > 1
? intl.formatMessage({ id: "nights" }) ? intl.formatMessage({ id: "nights" })
: intl.formatMessage({ id: "night" }) : intl.formatMessage({ id: "night" })
@@ -39,7 +39,7 @@ export default async function StaySection({ hotel, stay }: StaySectionProps) {
</Caption> </Caption>
</div> </div>
<Body className={styles.stay}> <Body className={styles.stay}>
<span>{`${stay.nights} ${nights}`}</span> <span>{`${stay.nights} ${nightsText}`}</span>
<span className={styles.dates}> <span className={styles.dates}>
<span>{stay.start}</span> <span>{stay.start}</span>
<ArrowRightIcon height={15} width={15} /> <ArrowRightIcon height={15} width={15} />
@@ -54,8 +54,8 @@ export default async function StaySection({ hotel, stay }: StaySectionProps) {
{intl.formatMessage({ id: "Breakfast" })} {intl.formatMessage({ id: "Breakfast" })}
</Body> </Body>
<Caption className={styles.caption}> <Caption className={styles.caption}>
<span>{`Mon-fri ${hotel.breakfast.start}-${hotel.breakfast.end}`}</span> <span>{`${intl.formatMessage({ id: "Weekdays" })} ${hotel.breakfast.start}-${hotel.breakfast.end}`}</span>
<span>{`Sat-sun ${hotel.breakfast.start}-${hotel.breakfast.end}`}</span> <span>{`${intl.formatMessage({ id: "Weekends" })} ${hotel.breakfast.start}-${hotel.breakfast.end}`}</span>
</Caption> </Caption>
</div> </div>
<div className={styles.checkIn}> <div className={styles.checkIn}>

View File

@@ -8,6 +8,10 @@ import { SummarySectionProps } from "@/types/components/hotelReservation/booking
export default async function SummarySection({ summary }: SummarySectionProps) { export default async function SummarySection({ summary }: SummarySectionProps) {
const intl = await getIntl() const intl = await getIntl()
const roomType = `${intl.formatMessage({ id: "Type of room" })}: ${summary.roomType}`
const bedType = `${intl.formatMessage({ id: "Type of bed" })}: ${summary.bedType}`
const breakfast = `${intl.formatMessage({ id: "Breakfast" })}: ${summary.breakfast}`
const flexibility = `${intl.formatMessage({ id: "Flexibility" })}: ${summary.flexibility}`
return ( return (
<section className={styles.section}> <section className={styles.section}>
@@ -15,19 +19,19 @@ export default async function SummarySection({ summary }: SummarySectionProps) {
{intl.formatMessage({ id: "Summary" })} {intl.formatMessage({ id: "Summary" })}
</Title> </Title>
<Caption className={styles.summary}> <Caption className={styles.summary}>
<span>{`Type of room: ${summary.roomType}`}</span> <span>{roomType}</span>
<span>1648 SEK</span> <span>1648 SEK</span>
</Caption> </Caption>
<Caption className={styles.summary}> <Caption className={styles.summary}>
<span>{`Type of bed: ${summary.bedType}`}</span> <span>{bedType}</span>
<span>0 SEK</span> <span>0 SEK</span>
</Caption> </Caption>
<Caption className={styles.summary}> <Caption className={styles.summary}>
<span>{`Breakfast: ${summary.breakfast}`}</span> <span>{breakfast}</span>
<span>198 SEK</span> <span>198 SEK</span>
</Caption> </Caption>
<Caption className={styles.summary}> <Caption className={styles.summary}>
<span>{`Flexibility: ${summary.flexibility}`}</span> <span>{flexibility}</span>
<span>200 SEK</span> <span>200 SEK</span>
</Caption> </Caption>
</section> </section>

View File

@@ -152,6 +152,10 @@
"Download the Scandic app": "Download Scandic-appen", "Download the Scandic app": "Download Scandic-appen",
"View your booking": "Se din booking", "View your booking": "Se din booking",
"At latest": "Senest", "At latest": "Senest",
"Type of room": "Værelsestype",
"Type of bed": "Sengtype",
"Weekdays": "Hverdage",
"Weekends": "Weekender",
"Where to": "Hvorhen", "Where to": "Hvorhen",
"When": "Hvornår", "When": "Hvornår",
"Rooms & Guests": "Værelser & gæster", "Rooms & Guests": "Værelser & gæster",

View File

@@ -146,6 +146,10 @@
"Download the Scandic app": "Laden Sie die Scandic-App herunter", "Download the Scandic app": "Laden Sie die Scandic-App herunter",
"View your booking": "Ihre Buchung ansehen", "View your booking": "Ihre Buchung ansehen",
"At latest": "Spätestens", "At latest": "Spätestens",
"Type of room": "Zimmerart",
"Type of bed": "Bettentyp",
"Weekdays": "Wochentage",
"Weekends": "Wochenenden",
"Where to": "Wohin", "Where to": "Wohin",
"When": "Wann", "When": "Wann",
"Rooms & Guests": "Zimmer & Gäste", "Rooms & Guests": "Zimmer & Gäste",

View File

@@ -158,6 +158,10 @@
"Download the Scandic app": "Download the Scandic app", "Download the Scandic app": "Download the Scandic app",
"View your booking": "View your booking", "View your booking": "View your booking",
"At latest": "At latest", "At latest": "At latest",
"Type of room": "Type of room",
"Type of bed": "Type of bed",
"Weekdays": "Weekdays",
"Weekends": "Weekends",
"Where to": "Where to", "Where to": "Where to",
"When": "When", "When": "When",
"Rooms & Guests": "Rooms & Guests", "Rooms & Guests": "Rooms & Guests",

View File

@@ -152,6 +152,10 @@
"Download the Scandic app": "Lataa Scandic-sovellus", "Download the Scandic app": "Lataa Scandic-sovellus",
"View your booking": "Näytä varauksesi", "View your booking": "Näytä varauksesi",
"At latest": "Viimeistään", "At latest": "Viimeistään",
"Type of room": "Huonetyyppi",
"Type of bed": "Vuodetyyppi",
"Weekdays": "Arkisin",
"Weekends": "Viikonloppuisin",
"Where to": "Minne", "Where to": "Minne",
"When": "Kun", "When": "Kun",
"Rooms & Guestss": "Huoneet & Vieraat", "Rooms & Guestss": "Huoneet & Vieraat",

View File

@@ -152,6 +152,10 @@
"Download the Scandic app": "Last ned Scandic-appen", "Download the Scandic app": "Last ned Scandic-appen",
"View your booking": "Se din bestilling", "View your booking": "Se din bestilling",
"At latest": "Senest", "At latest": "Senest",
"Type of room": "Romtype",
"Type of bed": "Sengtype",
"Weekdays": "Hverdager",
"Weekends": "Helger",
"Where to": "Hvor skal du", "Where to": "Hvor skal du",
"When": "Når", "When": "Når",
"Rooms & Guests": "Rom og gjester", "Rooms & Guests": "Rom og gjester",

View File

@@ -154,6 +154,10 @@
"Download the Scandic app": "Ladda ner Scandic-appen", "Download the Scandic app": "Ladda ner Scandic-appen",
"View your booking": "Visa din bokning", "View your booking": "Visa din bokning",
"At latest": "Senast", "At latest": "Senast",
"Type of room": "Rumstyp",
"Type of bed": "Sängtyp",
"Weekdays": "Vardagar",
"Weekends": "Helger",
"Where to": "Vart", "Where to": "Vart",
"When": "När", "When": "När",
"Rooms & Guests": "Rum och gäster", "Rooms & Guests": "Rum och gäster",