Add texts to i18n
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import Title from "@/components/TempDesignSystem/Text/Title"
|
||||
|
||||
import styles from "./layout.module.css"
|
||||
|
||||
import { LangParams, LayoutArgs } from "@/types/params"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import RoomCard from "@/components/HotelReservation/SelectRate/RoomCard"
|
||||
import { Room } from "@/components/HotelReservation/SelectRate/RoomCard/roomCard"
|
||||
import Header from "@/components/Section/Header"
|
||||
import { getIntl } from "@/i18n"
|
||||
|
||||
import styles from "./page.module.css"
|
||||
|
||||
@@ -78,6 +79,7 @@ const getRooms: () => Promise<Room[]> = () => {
|
||||
}
|
||||
|
||||
export default async function SelectRate() {
|
||||
const { formatMessage } = await getIntl()
|
||||
const rooms = await getRooms()
|
||||
|
||||
return (
|
||||
@@ -86,11 +88,15 @@ export default async function SelectRate() {
|
||||
<div className={styles.hotelInfo}>Hotel info TBI</div>
|
||||
<div className={styles.header}>
|
||||
<Header
|
||||
title="Choose room"
|
||||
subtitle={"Which room class suits you the best?"}
|
||||
title={formatMessage({ id: "Choose room" })}
|
||||
subtitle={formatMessage({
|
||||
id: "Which room class suits you the best?",
|
||||
})}
|
||||
link={{
|
||||
href: "#",
|
||||
text: "All rooms comes with standard amenities",
|
||||
text: formatMessage({
|
||||
id: "All rooms comes with standard amenities",
|
||||
}),
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -1,27 +1,31 @@
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
import Title from "@/components/TempDesignSystem/Text/Title"
|
||||
import { getIntl } from "@/i18n"
|
||||
|
||||
import { RoomProps } from "./roomCard"
|
||||
|
||||
import styles from "./roomCard.module.css"
|
||||
|
||||
export default function RoomCard({ room }: RoomProps) {
|
||||
export default async function RoomCard({ room }: RoomProps) {
|
||||
const { formatMessage } = await getIntl()
|
||||
return (
|
||||
<div className={styles.card}>
|
||||
<div className={styles.cardBody}>
|
||||
<div className={styles.nameContainer}>
|
||||
<div>
|
||||
<Title className={styles.name} as="h5" level="h3">
|
||||
{room.name}
|
||||
</Title>
|
||||
<div className={styles.nameInfo}>i</div>
|
||||
</div>
|
||||
<Caption color="burgundy">17 - 24 m² (1 - 2 persons)</Caption>
|
||||
<Caption color="burgundy">{room.size}</Caption>
|
||||
<Caption color="burgundy">{room.description}</Caption>
|
||||
|
||||
<Caption color="burgundy">
|
||||
From <span className={styles.price}>{room.pricePerNight}</span>{" "}
|
||||
{room.currency}/night
|
||||
{/* TODO: Handle currency and this whole line of text in a better way through intl */}
|
||||
{formatMessage({ id: "From" })}{" "}
|
||||
<span className={styles.price}>{room.pricePerNight}</span>{" "}
|
||||
{room.currency}/{formatMessage({ id: "night" })}
|
||||
</Caption>
|
||||
|
||||
<Button
|
||||
@@ -31,12 +35,17 @@ export default function RoomCard({ room }: RoomProps) {
|
||||
theme="primaryDark"
|
||||
className={styles.button}
|
||||
>
|
||||
<label htmlFor={`room-${room.id}`}>Choose room</label>
|
||||
<label htmlFor={`room-${room.id}`}>
|
||||
{formatMessage({ id: "Choose room" })}
|
||||
</label>
|
||||
</Button>
|
||||
</div>
|
||||
{/* TODO: maybe use the `Image` component instead of the `img` tag. Waiting until we know how to get the image */}
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img alt="A photo of the room" src={room.imageSrc} />
|
||||
<img
|
||||
alt={formatMessage({ id: "A photo of the room" })}
|
||||
src={room.imageSrc}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"A photo of the room": "Et foto af værelset",
|
||||
"Add new card": "Tilføj nyt kort",
|
||||
"Address": "Adresse",
|
||||
"All rooms comes with standard amenities": "Alle værelser er udstyret med standardfaciliteter",
|
||||
"Already a friend?": "Allerede en ven?",
|
||||
"Arrival date": "Ankomstdato",
|
||||
"As our": "Som vores",
|
||||
@@ -10,6 +12,7 @@
|
||||
"Booking number": "Bestillingsnummer",
|
||||
"Cancel": "Afbestille",
|
||||
"Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.": "Tjek de kreditkort, der er gemt på din profil. Betal med et gemt kort, når du er logget ind for en mere jævn weboplevelse.",
|
||||
"Choose room": "Vælg rum",
|
||||
"City": "By",
|
||||
"City/State": "By/Stat",
|
||||
"Click here to log in": "Klik her for at logge ind",
|
||||
@@ -34,6 +37,7 @@
|
||||
"Empty": "Empty",
|
||||
"Explore all levels and benefits": "Udforsk alle niveauer og fordele",
|
||||
"Find booking": "Find booking",
|
||||
"From": "Fra",
|
||||
"Get inspired": "Blive inspireret",
|
||||
"Go back to overview": "Gå tilbage til oversigten",
|
||||
"How it works": "Hvordan det virker",
|
||||
@@ -98,6 +102,7 @@
|
||||
"Visiting address": "Besøgsadresse",
|
||||
"Welcome to": "Velkommen til",
|
||||
"Where should you go next?": "Hvor skal du tage hen næste gang?",
|
||||
"Which room class suits you the best?": "Hvilken rumklasse passer bedst til dig",
|
||||
"Year": "År",
|
||||
"You have no previous stays.": "Du har ingen tidligere ophold.",
|
||||
"You have no upcoming stays.": "Du har ingen kommende ophold.",
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"A photo of the room": "Ein Foto des Zimmers",
|
||||
"Add new card": "Neue Karte hinzufügen",
|
||||
"Address": "Adresse",
|
||||
"All rooms comes with standard amenities": "Alle Zimmer sind mit den üblichen Annehmlichkeiten ausgestattet",
|
||||
"Already a friend?": "Schon ein Freund?",
|
||||
"Arrival date": "Ankunftsdatum",
|
||||
"As our": "Als unsere",
|
||||
@@ -10,6 +12,7 @@
|
||||
"Booking number": "Buchungsnummer",
|
||||
"Cancel": "Stornieren",
|
||||
"Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.": "Sehen Sie sich die in Ihrem Profil gespeicherten Kreditkarten an. Bezahlen Sie mit einer gespeicherten Karte, wenn Sie angemeldet sind, für ein reibungsloseres Web-Erlebnis.",
|
||||
"Choose room": "Zimmer wählen",
|
||||
"City": "Stadt",
|
||||
"City/State": "Stadt/Zustand",
|
||||
"Click here to log in": "Klicken Sie hier, um sich einzuloggen",
|
||||
@@ -34,6 +37,7 @@
|
||||
"Empty": "Empty",
|
||||
"Explore all levels and benefits": "Entdecken Sie alle Levels und Vorteile",
|
||||
"Find booking": "Buchung finden",
|
||||
"From": "Fromm",
|
||||
"Get inspired": "Lass dich inspirieren",
|
||||
"Go back to overview": "Zurück zur Übersicht",
|
||||
"How it works": "Wie es funktioniert",
|
||||
@@ -98,6 +102,7 @@
|
||||
"Visiting address": "Besuchsadresse",
|
||||
"Welcome to": "Willkommen zu",
|
||||
"Where should you go next?": "Wohin soll es als nächstes gehen?",
|
||||
"Which room class suits you the best?": "Welche Zimmerklasse passt am besten zu Ihnen?",
|
||||
"Year": "Jahr",
|
||||
"You have no previous stays.": "Sie haben keine vorherigen Aufenthalte.",
|
||||
"You have no upcoming stays.": "Sie haben keine bevorstehenden Aufenthalte.",
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"A photo of the room": "A photo of the room",
|
||||
"Add new card": "Add new card",
|
||||
"Address": "Address",
|
||||
"All rooms comes with standard amenities": "All rooms comes with standard amenities",
|
||||
"Already a friend?": "Already a friend?",
|
||||
"Arrival date": "Arrival date",
|
||||
"As our": "As our",
|
||||
@@ -10,6 +12,7 @@
|
||||
"Booking number": "Booking number",
|
||||
"Cancel": "Cancel",
|
||||
"Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.": "Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.",
|
||||
"Choose room": "Choose room",
|
||||
"City": "City",
|
||||
"City/State": "City/State",
|
||||
"Click here to log in": "Click here to log in",
|
||||
@@ -35,6 +38,7 @@
|
||||
"Empty": "Empty",
|
||||
"Explore all levels and benefits": "Explore all levels and benefits",
|
||||
"Find booking": "Find booking",
|
||||
"From": "From",
|
||||
"Get inspired": "Get inspired",
|
||||
"Go back to overview": "Go back to overview",
|
||||
"How it works": "How it works",
|
||||
@@ -99,6 +103,7 @@
|
||||
"Visiting address": "Visiting address",
|
||||
"Welcome to": "Welcome to",
|
||||
"Where should you go next?": "Where should you go next?",
|
||||
"Which room class suits you the best?": "Which room class suits you the best?",
|
||||
"Year": "Year",
|
||||
"You have no previous stays.": "You have no previous stays.",
|
||||
"You have no upcoming stays.": "You have no upcoming stays.",
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"A photo of the room": "Kuva huoneesta",
|
||||
"Add new card": "Lisää uusi kortti",
|
||||
"Address": "Osoite",
|
||||
"All rooms comes with standard amenities": "Kaikissa huoneissa on perusmukavuudet",
|
||||
"Already a friend?": "Oletko jo ystävä?",
|
||||
"Arrival date": "Saapumispäivä",
|
||||
"As our": "Kuin meidän",
|
||||
@@ -10,6 +12,7 @@
|
||||
"Booking number": "Varausnumero",
|
||||
"Cancel": "Peruuttaa",
|
||||
"Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.": "Tarkista profiiliisi tallennetut luottokortit. Maksa tallennetulla kortilla kirjautuneena, jotta verkkokokemus on sujuvampi.",
|
||||
"Choose room": "Valitse huone",
|
||||
"City": "Kaupunki",
|
||||
"City/State": "Kaupunki/Osavaltio",
|
||||
"Click here to log in": "Napsauta tästä kirjautuaksesi sisään",
|
||||
@@ -34,6 +37,7 @@
|
||||
"Empty": "Empty",
|
||||
"Explore all levels and benefits": "Tutustu kaikkiin tasoihin ja etuihin",
|
||||
"Find booking": "Etsi varaus",
|
||||
"From": "From",
|
||||
"Get inspired": "Inspiroidu",
|
||||
"Go back to overview": "Palaa yleiskatsaukseen",
|
||||
"How it works": "Kuinka se toimii",
|
||||
@@ -98,6 +102,7 @@
|
||||
"Visiting address": "Käyntiosoite",
|
||||
"Welcome to": "Tervetuloa",
|
||||
"Where should you go next?": "Minne sinun pitäisi mennä seuraavaksi?",
|
||||
"Which room class suits you the best?": "Mikä huoneluokka sopii sinulle parhaiten?",
|
||||
"Year": "Vuosi",
|
||||
"You have no previous stays.": "Sinulla ei ole aiempaa oleskelua.",
|
||||
"You have no upcoming stays.": "Sinulla ei ole tulevia oleskeluja.",
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"A photo of the room": "Et bilde av rommet",
|
||||
"Add new card": "Legg til nytt kort",
|
||||
"Address": "Adresse",
|
||||
"All rooms comes with standard amenities": "Alle rommene har standard fasiliteter",
|
||||
"Already a friend?": "Allerede en venn?",
|
||||
"Arrival date": "Ankomstdato",
|
||||
"As our": "Som vår",
|
||||
@@ -10,6 +12,7 @@
|
||||
"Booking number": "Bestillingsnummer",
|
||||
"Cancel": "Avbryt",
|
||||
"Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.": "Sjekk ut kredittkortene som er lagret på profilen din. Betal med et lagret kort når du er pålogget for en jevnere nettopplevelse.",
|
||||
"Choose room": "Velg rom",
|
||||
"City": "By",
|
||||
"City/State": "By/Stat",
|
||||
"Click here to log in": "Klikk her for å logge inn",
|
||||
@@ -34,6 +37,7 @@
|
||||
"Empty": "Empty",
|
||||
"Explore all levels and benefits": "Utforsk alle nivåer og fordeler",
|
||||
"Find booking": "Finn booking",
|
||||
"From": "Fra",
|
||||
"Get inspired": "Bli inspirert",
|
||||
"Go back to overview": "Gå tilbake til oversikten",
|
||||
"How it works": "Hvordan det fungerer",
|
||||
@@ -98,6 +102,7 @@
|
||||
"Visiting address": "Besøksadresse",
|
||||
"Welcome to": "Velkommen til",
|
||||
"Where should you go next?": "Hvor bør du gå videre?",
|
||||
"Which room class suits you the best?": "Hvilken romklasse passer deg best?",
|
||||
"Year": "År",
|
||||
"You have no previous stays.": "Du har ingen tidligere opphold.",
|
||||
"You have no upcoming stays.": "Du har ingen kommende opphold.",
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"A photo of the room": "Ett foto av rummet",
|
||||
"Add new card": "Lägg till nytt kort",
|
||||
"Address": "Adress",
|
||||
"All rooms comes with standard amenities": "Alla rum har standardbekvämligheter",
|
||||
"Already a friend?": "Redan en vän?",
|
||||
"Arrival date": "Ankomstdatum",
|
||||
"As our": "Som vår",
|
||||
@@ -10,6 +12,7 @@
|
||||
"Booking number": "Bokningsnummer",
|
||||
"Cancel": "Avbryt",
|
||||
"Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.": "Kolla in kreditkorten som sparats i din profil. Betala med ett sparat kort när du är inloggad för en smidigare webbupplevelse.",
|
||||
"Choose room": "Välj rum",
|
||||
"City": "Ort",
|
||||
"City/State": "Ort",
|
||||
"Click here to log in": "Klicka här för att logga in",
|
||||
@@ -34,6 +37,7 @@
|
||||
"Empty": "Tom",
|
||||
"Explore all levels and benefits": "Utforska alla nivåer och fördelar",
|
||||
"Find booking": "Hitta bokning",
|
||||
"From": "Från",
|
||||
"Get inspired": "Bli inspirerad",
|
||||
"Go back to overview": "Gå tillbaka till översikten",
|
||||
"How it works": "Hur det fungerar",
|
||||
@@ -97,6 +101,7 @@
|
||||
"uppercase letter": "stor bokstav",
|
||||
"Visiting address": "Besöksadress",
|
||||
"Where should you go next?": "Vart ska du gå härnäst?",
|
||||
"Which room class suits you the best?": "Vilken rumsklass passar dig bäst?",
|
||||
"Year": "År",
|
||||
"You have no previous stays.": "Du har inga tidigare vistelser.",
|
||||
"You have no upcoming stays.": "Du har inga kommande vistelser.",
|
||||
|
||||
Reference in New Issue
Block a user