feat(SW-1012): add translations
This commit is contained in:
@@ -19,9 +19,7 @@ export default function OpeningHours({
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Body textTransform="bold" asChild>
|
||||
<h5>{openingHours.name}</h5>
|
||||
</Body>
|
||||
<Body textTransform="bold">{openingHours.name}</Body>
|
||||
{days.map((day) => {
|
||||
const today = openingHours[day] as RestaurantOpeningHoursDay
|
||||
return today ? (
|
||||
|
||||
@@ -1,33 +1,34 @@
|
||||
import NextLink from "next/link"
|
||||
|
||||
import { OpenInNewSmallIcon } from "@/components/Icons"
|
||||
import Image from "@/components/Image"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||
import Title from "@/components/TempDesignSystem/Text/Title"
|
||||
import { getIntl } from "@/i18n"
|
||||
|
||||
import OpeningHours from "../OpeningHours"
|
||||
|
||||
import styles from "./restaurantBarItem.module.css"
|
||||
|
||||
import { RestaurantBarItemProps } from "@/types/components/hotelPage/sidepeek/restaurantBar"
|
||||
import type { RestaurantBarItemProps } from "@/types/components/hotelPage/sidepeek/restaurantBar"
|
||||
|
||||
export default function RestaurantBarItem({
|
||||
export default async function RestaurantBarItem({
|
||||
restaurant,
|
||||
}: RestaurantBarItemProps) {
|
||||
const intl = await getIntl()
|
||||
const { name, openingDetails, menus } = restaurant
|
||||
const { images, bookTableUrl } = restaurant.content
|
||||
const visibleImages = restaurant.content.images.slice(0, 2)
|
||||
const imageWidth = images.length === 2 ? 240 : 496
|
||||
|
||||
// TODO: Not defined where this should lead.
|
||||
const ctaUrl = ""
|
||||
|
||||
console.log({ bookTableUrl: bookTableUrl })
|
||||
return (
|
||||
<div className={styles.restaurantBarItem}>
|
||||
<div className={styles.stickyHeading}>
|
||||
<Subtitle type="one" color="burgundy" asChild>
|
||||
<h3>{name}</h3>
|
||||
<Title level="h3">{name}</Title>
|
||||
</Subtitle>
|
||||
</div>
|
||||
<div className={styles.imageWrapper}>
|
||||
@@ -45,7 +46,9 @@ export default function RestaurantBarItem({
|
||||
{openingDetails.length ? (
|
||||
<div className={styles.content}>
|
||||
<Subtitle type="two" asChild>
|
||||
<h4>Opening Hours</h4>
|
||||
<Title level="h4">
|
||||
{intl.formatMessage({ id: "Opening Hours" })}
|
||||
</Title>
|
||||
</Subtitle>
|
||||
{openingDetails.map((details) => (
|
||||
<OpeningHours
|
||||
@@ -59,7 +62,7 @@ export default function RestaurantBarItem({
|
||||
{menus.length ? (
|
||||
<div className={styles.content}>
|
||||
<Subtitle type="two" asChild>
|
||||
<h4>Menus</h4>
|
||||
<Title level="h4">{intl.formatMessage({ id: "Menus" })}</Title>
|
||||
</Subtitle>
|
||||
<ul className={styles.menuList}>
|
||||
{menus.map(({ name, url }) => (
|
||||
@@ -70,7 +73,6 @@ export default function RestaurantBarItem({
|
||||
textDecoration="underline"
|
||||
variant="icon"
|
||||
color="baseTextMediumContrast"
|
||||
className={styles.menuLink}
|
||||
>
|
||||
{name}
|
||||
<OpenInNewSmallIcon />
|
||||
@@ -84,14 +86,21 @@ export default function RestaurantBarItem({
|
||||
<div className={styles.ctaWrapper}>
|
||||
{bookTableUrl ? (
|
||||
<Button fullWidth theme="base" intent="primary" asChild>
|
||||
<a href={bookTableUrl} target="_blank">
|
||||
Book a table online
|
||||
</a>
|
||||
<Link
|
||||
href={bookTableUrl}
|
||||
color="white"
|
||||
weight="bold"
|
||||
target="_blank"
|
||||
>
|
||||
{intl.formatMessage({ id: "Book a table online" })}
|
||||
</Link>
|
||||
</Button>
|
||||
) : null}
|
||||
{ctaUrl ? (
|
||||
<Button fullWidth theme="base" intent="secondary" asChild>
|
||||
<NextLink href={ctaUrl}>Discover {name}</NextLink>
|
||||
<Link href={ctaUrl} color="burgundy" weight="bold">
|
||||
{`${intl.formatMessage({ id: "Discover" })} ${name}`} {name}
|
||||
</Link>
|
||||
</Button>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
@@ -13,8 +13,8 @@ import type { RestaurantBarSidePeekProps } from "@/types/components/hotelPage/si
|
||||
export default async function RestaurantBarSidePeek({
|
||||
restaurants,
|
||||
}: RestaurantBarSidePeekProps) {
|
||||
const lang = getLang()
|
||||
const intl = await getIntl()
|
||||
const lang = getLang()
|
||||
|
||||
return (
|
||||
<SidePeek
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
"Bed type": "Seng type",
|
||||
"Birth date": "Fødselsdato",
|
||||
"Book": "Book",
|
||||
"Book a table online": "Book et bord online",
|
||||
"Book parking": "Book parkering",
|
||||
"Book reward night": "Book bonusnat",
|
||||
"Booking number": "Bookingnummer",
|
||||
@@ -117,6 +118,7 @@
|
||||
"Disabled booking options text": "Koder, checks og bonusnætter er endnu ikke tilgængelige på den nye hjemmeside.",
|
||||
"Discard changes": "Kassér ændringer",
|
||||
"Discard unsaved changes?": "Slette ændringer, der ikke er gemt?",
|
||||
"Discover": "Opdag",
|
||||
"Distance in km to city centre": "{number} km til centrum",
|
||||
"Distance to city centre": "Afstand til centrum",
|
||||
"Distance to hotel": "Afstand til hotel: {distance} m",
|
||||
@@ -244,6 +246,7 @@
|
||||
"Membership cards": "Medlemskort",
|
||||
"Membership terms and conditions": "Medlemsvilkår og -betingelser",
|
||||
"Menu": "Menu",
|
||||
"Menus": "Menukort",
|
||||
"Modify": "Ændre",
|
||||
"Mon-Fri": "Man-Fre",
|
||||
"Month": "Måned",
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
"Bed type": "Bettentyp",
|
||||
"Birth date": "Geburtsdatum",
|
||||
"Book": "Buchen",
|
||||
"Book a table online": "Tisch online buchen",
|
||||
"Book parking": "Parkplatz buchen",
|
||||
"Book reward night": "Bonusnacht buchen",
|
||||
"Booking number": "Buchungsnummer",
|
||||
@@ -117,6 +118,7 @@
|
||||
"Disabled booking options text": "Codes, Schecks und Bonusnächte sind auf der neuen Website noch nicht verfügbar.",
|
||||
"Discard changes": "Änderungen verwerfen",
|
||||
"Discard unsaved changes?": "Nicht gespeicherte Änderungen verwerfen?",
|
||||
"Discover": "Entdecken",
|
||||
"Distance in km to city centre": "{number} km zum Stadtzentrum",
|
||||
"Distance to city centre": "Entfernung zum Stadtzentrum",
|
||||
"Distance to hotel": "Entfernung zum Hotel: {distance} m",
|
||||
@@ -243,6 +245,7 @@
|
||||
"Membership ID copied to clipboard": "Mitglieds-ID in die Zwischenablage kopiert",
|
||||
"Membership cards": "Mitgliedskarten",
|
||||
"Menu": "Menü",
|
||||
"Menus": "Menüs",
|
||||
"Modify": "Ändern",
|
||||
"Mon-Fri": "Mo-Fr",
|
||||
"Month": "Monat",
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
"Bed type": "Bed type",
|
||||
"Birth date": "Birth date",
|
||||
"Book": "Book",
|
||||
"Book a table online": "Book a table online",
|
||||
"Book another stay": "Book another stay",
|
||||
"Book parking": "Book parking",
|
||||
"Book reward night": "Book reward night",
|
||||
@@ -124,6 +125,7 @@
|
||||
"Disabled booking options text": "Codes, cheques and reward nights aren't available on the new website yet.",
|
||||
"Discard changes": "Discard changes",
|
||||
"Discard unsaved changes?": "Discard unsaved changes?",
|
||||
"Discover": "Discover",
|
||||
"Discover the little extra touches to make your upcoming stay even more unforgettable.": "Discover the little extra touches to make your upcoming stay even more unforgettable.",
|
||||
"Distance in km to city centre": "{number} km to city centre",
|
||||
"Distance to city centre": "Distance to city centre",
|
||||
@@ -264,6 +266,7 @@
|
||||
"Membership no": "Membership no",
|
||||
"Membership terms and conditions": "Membership terms and conditions",
|
||||
"Menu": "Menu",
|
||||
"Menus": "Menus",
|
||||
"Modify": "Modify",
|
||||
"Mon-Fri": "Mon-Fri",
|
||||
"Month": "Month",
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
"Bed type": "Vuodetyyppi",
|
||||
"Birth date": "Syntymäaika",
|
||||
"Book": "Varaa",
|
||||
"Book a table online": "Varaa pöytä verkossa",
|
||||
"Book parking": "Varaa pysäköinti",
|
||||
"Book reward night": "Kirjapalkinto-ilta",
|
||||
"Booking number": "Varausnumero",
|
||||
@@ -117,6 +118,7 @@
|
||||
"Disabled booking options text": "Koodit, sekit ja palkintoillat eivät ole vielä saatavilla uudella verkkosivustolla.",
|
||||
"Discard changes": "Hylkää muutokset",
|
||||
"Discard unsaved changes?": "Hylkäätkö tallentamattomat muutokset?",
|
||||
"Discover": "Löydä",
|
||||
"Distance in km to city centre": "{number} km Etäisyys kaupunkiin",
|
||||
"Distance to city centre": "Etäisyys kaupungin keskustaan",
|
||||
"Distance to hotel": "Etäisyys hotelliin: {distance} m",
|
||||
@@ -244,6 +246,7 @@
|
||||
"Membership cards": "Jäsenkortit",
|
||||
"Membership terms and conditions": "Jäsenehdot ja -säännöt",
|
||||
"Menu": "Valikko",
|
||||
"Menus": "Valikot",
|
||||
"Modify": "Muokkaa",
|
||||
"Mon-Fri": "Ma-Pe",
|
||||
"Month": "Kuukausi",
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
"Bed type": "Seng type",
|
||||
"Birth date": "Fødselsdato",
|
||||
"Book": "Bestill",
|
||||
"Book a table online": "Bestill bord online",
|
||||
"Book parking": "Bestill parkering",
|
||||
"Book reward night": "Bestill belønningskveld",
|
||||
"Booking number": "Bestillingsnummer",
|
||||
@@ -116,6 +117,7 @@
|
||||
"Disabled booking options text": "Koder, checks og belønningsnætter er enda ikke tilgjengelige på den nye nettsiden.",
|
||||
"Discard changes": "Forkaste endringer",
|
||||
"Discard unsaved changes?": "Forkaste endringer som ikke er lagret?",
|
||||
"Discover": "Oppdag",
|
||||
"Distance in km to city centre": "{number} km til sentrum",
|
||||
"Distance to city centre": "Avstand til sentrum",
|
||||
"Distance to hotel": "Avstand til hotell: {distance} m",
|
||||
@@ -243,6 +245,7 @@
|
||||
"Membership cards": "Medlemskort",
|
||||
"Membership terms and conditions": "Medlemsvilkår og -betingelser",
|
||||
"Menu": "Menu",
|
||||
"Menus": "Menyer",
|
||||
"Modify": "Endre",
|
||||
"Mon-Fri": "Man-Fre",
|
||||
"Month": "Måned",
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
"Bed type": "Sängtyp",
|
||||
"Birth date": "Födelsedatum",
|
||||
"Book": "Boka",
|
||||
"Book a table online": "Boka ett bord online",
|
||||
"Book parking": "Boka parkering",
|
||||
"Book reward night": "Boka frinatt",
|
||||
"Booking number": "Bokningsnummer",
|
||||
@@ -116,6 +117,7 @@
|
||||
"Disabled booking options text": "Koder, bonuscheckar och belöningsnätter är inte tillgängliga på den nya webbplatsen än.",
|
||||
"Discard changes": "Ignorera ändringar",
|
||||
"Discard unsaved changes?": "Vill du ignorera ändringar som inte har sparats?",
|
||||
"Discover": "Upptäck",
|
||||
"Distance in km to city centre": "{number} km till centrum",
|
||||
"Distance to city centre": "Avstånd till centrum",
|
||||
"Distance to hotel": "Avstånd till hotell: {distance} m",
|
||||
@@ -243,6 +245,7 @@
|
||||
"Membership cards": "Medlemskort",
|
||||
"Membership terms and conditions": "Medlemsvillkor",
|
||||
"Menu": "Meny",
|
||||
"Menus": "Menyer",
|
||||
"Modify": "Ändra",
|
||||
"Mon-Fri": "Mån-Fre",
|
||||
"Month": "Månad",
|
||||
|
||||
Reference in New Issue
Block a user