From 5c357bc88bda240bf0b93526fa6208f886a87d7a Mon Sep 17 00:00:00 2001 From: Fredrik Thorsson Date: Wed, 21 Aug 2024 14:25:05 +0200 Subject: [PATCH] feat(SW-243): add translations --- .../BookingConfirmation/StaySection/index.tsx | 8 ++++---- .../BookingConfirmation/SummarySection/index.tsx | 12 ++++++++---- i18n/dictionaries/da.json | 4 ++++ i18n/dictionaries/de.json | 4 ++++ i18n/dictionaries/en.json | 4 ++++ i18n/dictionaries/fi.json | 4 ++++ i18n/dictionaries/no.json | 4 ++++ i18n/dictionaries/sv.json | 4 ++++ 8 files changed, 36 insertions(+), 8 deletions(-) diff --git a/components/HotelReservation/BookingConfirmation/StaySection/index.tsx b/components/HotelReservation/BookingConfirmation/StaySection/index.tsx index 21e900d69..99ecae8ca 100644 --- a/components/HotelReservation/BookingConfirmation/StaySection/index.tsx +++ b/components/HotelReservation/BookingConfirmation/StaySection/index.tsx @@ -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) { - {`${stay.nights} ${nights}`} + {`${stay.nights} ${nightsText}`} {stay.start} @@ -54,8 +54,8 @@ export default async function StaySection({ hotel, stay }: StaySectionProps) { {intl.formatMessage({ id: "Breakfast" })} - {`Mon-fri ${hotel.breakfast.start}-${hotel.breakfast.end}`} - {`Sat-sun ${hotel.breakfast.start}-${hotel.breakfast.end}`} + {`${intl.formatMessage({ id: "Weekdays" })} ${hotel.breakfast.start}-${hotel.breakfast.end}`} + {`${intl.formatMessage({ id: "Weekends" })} ${hotel.breakfast.start}-${hotel.breakfast.end}`}
diff --git a/components/HotelReservation/BookingConfirmation/SummarySection/index.tsx b/components/HotelReservation/BookingConfirmation/SummarySection/index.tsx index 4240ba236..509af9c52 100644 --- a/components/HotelReservation/BookingConfirmation/SummarySection/index.tsx +++ b/components/HotelReservation/BookingConfirmation/SummarySection/index.tsx @@ -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 (
@@ -15,19 +19,19 @@ export default async function SummarySection({ summary }: SummarySectionProps) { {intl.formatMessage({ id: "Summary" })} - {`Type of room: ${summary.roomType}`} + {roomType} 1648 SEK - {`Type of bed: ${summary.bedType}`} + {bedType} 0 SEK - {`Breakfast: ${summary.breakfast}`} + {breakfast} 198 SEK - {`Flexibility: ${summary.flexibility}`} + {flexibility} 200 SEK
diff --git a/i18n/dictionaries/da.json b/i18n/dictionaries/da.json index 2d0bdcd52..dc4301e19 100644 --- a/i18n/dictionaries/da.json +++ b/i18n/dictionaries/da.json @@ -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", diff --git a/i18n/dictionaries/de.json b/i18n/dictionaries/de.json index af19591f8..421308f13 100644 --- a/i18n/dictionaries/de.json +++ b/i18n/dictionaries/de.json @@ -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", diff --git a/i18n/dictionaries/en.json b/i18n/dictionaries/en.json index d77763294..32a55c8dd 100644 --- a/i18n/dictionaries/en.json +++ b/i18n/dictionaries/en.json @@ -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", diff --git a/i18n/dictionaries/fi.json b/i18n/dictionaries/fi.json index 1d6bb2caf..9f5903970 100644 --- a/i18n/dictionaries/fi.json +++ b/i18n/dictionaries/fi.json @@ -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", diff --git a/i18n/dictionaries/no.json b/i18n/dictionaries/no.json index a5ec3dd67..8a7b15e6c 100644 --- a/i18n/dictionaries/no.json +++ b/i18n/dictionaries/no.json @@ -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", diff --git a/i18n/dictionaries/sv.json b/i18n/dictionaries/sv.json index fd5b27b14..e96fa533c 100644 --- a/i18n/dictionaries/sv.json +++ b/i18n/dictionaries/sv.json @@ -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",