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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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