feat(SW-184): added some translations

This commit is contained in:
Erik Tiekstra
2024-08-20 15:45:04 +02:00
parent b37cc7a34c
commit c6ad5eecc5
11 changed files with 31 additions and 15 deletions

View File

@@ -1,8 +1 @@
import { setLang } from "@/i18n/serverContext"
import type { LangParams, PageArgs } from "@/types/params"
export default function EmptyHeaderPage({ params }: PageArgs<LangParams>) {
setLang(params.lang)
return null
}
export { default } from "../page"

View File

@@ -4,8 +4,6 @@ import { MenuProps } from "./menu"
import styles from "./menu.module.css"
export default function Menu({ items }: MenuProps) {
function handleButtonClick() {}
return (
<ul className={styles.menu}>
{items.map((item) => (

View File

@@ -3,6 +3,7 @@ import Link from "next/link"
import { serverClient } from "@/lib/trpc/server"
import Image from "@/components/Image"
import { getIntl } from "@/i18n"
import Menu from "./Menu"
import MyPages from "./MyPages"
@@ -31,6 +32,7 @@ export interface MenuItem {
}
export default async function MainMenu() {
const intl = await getIntl()
const myPagesNavigation =
await serverClient().contentstack.myPages.navigation.get()
@@ -114,7 +116,7 @@ export default async function MainMenu() {
<nav className={styles.content}>
<Link className={styles.logoLink} href="/">
<Image
alt="Back to scandichotels.com"
alt={intl.formatMessage({ id: "Back to scandichotels.com" })}
className={styles.logo}
data-js="scandiclogoimg"
data-nosvgsrc="/_static/img/scandic-logotype.png"

View File

@@ -1,12 +1,18 @@
"use client"
import { useIntl } from "react-intl"
import { SearchIcon } from "@/components/Icons"
import Button from "../Button"
export default function Search() {
const intl = useIntl()
return (
<Button>
<SearchIcon width={20} height={20} color="burgundy" />
<span>Find Booking</span>
{intl.formatMessage({ id: "Find booking" })}
</Button>
)
}

View File

@@ -2,6 +2,7 @@ import { serverClient } from "@/lib/trpc/server"
import { GiftIcon } from "@/components/Icons"
import Link from "@/components/TempDesignSystem/Link"
import { getIntl } from "@/i18n"
import LanguageSwitcher from "./LanguageSwitcher"
import Search from "./Search"
@@ -9,6 +10,7 @@ import Search from "./Search"
import styles from "./topMenu.module.css"
export default async function TopMenu() {
const intl = await getIntl()
const languages = await serverClient().contentstack.languageSwitcher.get()
if (!languages) {
@@ -20,7 +22,7 @@ export default async function TopMenu() {
<div className={styles.content}>
<Link variant="icon" color="burgundy" href="#" size="small">
<GiftIcon width={20} height={20} color="burgundy" />
Join Scandic Friends
{intl.formatMessage({ id: "Join Scandic Friends" })}
</Link>
<div className={styles.right}>
<LanguageSwitcher urls={languages.urls} />

View File

@@ -15,6 +15,7 @@
"As our Close Friend": "Som vores nære ven",
"At latest": "Senest",
"At the hotel": "På hotellet",
"Back to scandichotels.com": "Tilbage til scandichotels.com",
"Bed type": "Seng type",
"Book": "Book",
"Book reward night": "Book bonusnat",
@@ -64,6 +65,7 @@
"from your member profile?": "fra din medlemsprofil?",
"Get inspired": "Bliv inspireret",
"Go back to overview": "Gå tilbage til oversigten",
"Hi": "Hei",
"Highest level": "Højeste niveau",
"Hotel facilities": "Hotel faciliteter",
"Hotel surroundings": "Hotel omgivelser",
@@ -81,6 +83,7 @@
"Level 7": "Niveau 7",
"Level up to unlock": "Stig i niveau for at låse op",
"Log in": "Log på",
"Log in/Join": "Log på/Tilmeld dig",
"Log in here": "Log ind her",
"Log out": "Log ud",
"Manage preferences": "Administrer præferencer",

View File

@@ -14,6 +14,7 @@
"As our Close Friend": "Als unser enger Freund",
"At latest": "Spätestens",
"At the hotel": "Im Hotel",
"Back to scandichotels.com": "Zurück zu scandichotels.com",
"Bed type": "Bettentyp",
"Book": "Buchen",
"Book reward night": "Bonusnacht buchen",
@@ -63,6 +64,7 @@
"from your member profile?": "wirklich aus Ihrem Mitgliedsprofil entfernen?",
"Get inspired": "Lassen Sie sich inspieren",
"Go back to overview": "Zurück zur Übersicht",
"Hi": "Hallo",
"Highest level": "Höchstes Level",
"Hotel facilities": "Hotel-Infos",
"Hotel surroundings": "Umgebung des Hotels",
@@ -80,6 +82,7 @@
"Level 7": "Level 7",
"Level up to unlock": "Zum Freischalten aufsteigen",
"Log in": "Anmeldung",
"Log in/Join": "Log in/Anmelden",
"Log in here": "Hier einloggen",
"Log out": "Ausloggen",
"Manage preferences": "Verwalten von Voreinstellungen",

View File

@@ -15,6 +15,7 @@
"As our Close Friend": "As our Close Friend",
"At latest": "At latest",
"At the hotel": "At the hotel",
"Back to scandichotels.com": "Back to scandichotels.com",
"Bed type": "Bed type",
"Book": "Book",
"Book reward night": "Book reward night",
@@ -66,6 +67,7 @@
"from your member profile?": "from your member profile?",
"Get inspired": "Get inspired",
"Go back to overview": "Go back to overview",
"Hi": "Hi",
"Highest level": "Highest level",
"Hotel facilities": "Hotel facilities",
"Hotel surroundings": "Hotel surroundings",
@@ -84,7 +86,6 @@
"Level 5": "Level 5",
"Level 6": "Level 6",
"Level 7": "Level 7",
"Hi": "Hi",
"Level up to unlock": "Level up to unlock",
"Log in": "Log in",
"Log in/Join": "Log in/Join",

View File

@@ -15,6 +15,7 @@
"As our Close Friend": "Läheisenä ystävänämme",
"At latest": "Viimeistään",
"At the hotel": "Hotellissa",
"Back to scandichotels.com": "Takaisin scandichotels.com",
"Bed type": "Vuodetyyppi",
"Book": "Varaa",
"Book reward night": "Kirjapalkinto-ilta",
@@ -64,6 +65,7 @@
"from your member profile?": "jäsenprofiilistasi?",
"Get inspired": "Inspiroidu",
"Go back to overview": "Palaa yleiskatsaukseen",
"Hi": "Hi",
"Highest level": "Korkein taso",
"Hotel facilities": "Hotellin palvelut",
"Hotel surroundings": "Hotellin ympäristö",
@@ -79,8 +81,8 @@
"Level 5": "Taso 5",
"Level 6": "Taso 6",
"Level 7": "Taso 7",
"Level up to unlock": "Nouse seuraavalle tasolle ja avaat seuraavan edun",
"Log in": "Kirjaudu sisään",
"Log in/Join": "Kirjaudu sisään/Liittyä",
"Log in here": "Kirjaudu sisään",
"Log out": "Kirjaudu ulos",
"Manage preferences": "Asetusten hallinta",

View File

@@ -15,6 +15,7 @@
"As our Close Friend": "Som vår nære venn",
"At latest": "Senest",
"At the hotel": "På hotellet",
"Back to scandichotels.com": "Tilbake til scandichotels.com",
"Bed type": "Seng type",
"Book": "Bestill",
"Book reward night": "Bestill belønningskveld",
@@ -64,6 +65,7 @@
"from your member profile?": "fra medlemsprofilen din?",
"Get inspired": "Bli inspirert",
"Go back to overview": "Gå tilbake til oversikten",
"Hi": "Hei",
"Highest level": "Høyeste nivå",
"Hotel facilities": "Hotelfaciliteter",
"Hotel surroundings": "Hotellomgivelser",
@@ -81,6 +83,7 @@
"Level 7": "Nivå 7",
"Level up to unlock": "Nivå opp for å låse opp",
"Log in": "Logg Inn",
"Log in/Join": "Logg på/Bli med",
"Log in here": "Logg inn her",
"Log out": "Logg ut",
"Manage preferences": "Administrer preferanser",

View File

@@ -15,6 +15,7 @@
"As our Close Friend": "Som vår nära vän",
"At latest": "Senast",
"At the hotel": "På hotellet",
"Back to scandichotels.com": "Tillbaka till scandichotels.com",
"Bed type": "Sängtyp",
"Book": "Boka",
"Book reward night": "Boka frinatt",
@@ -64,6 +65,7 @@
"from your member profile?": "från din medlemsprofil?",
"Get inspired": "Bli inspirerad",
"Go back to overview": "Gå tillbaka till översikten",
"Hi": "Hej",
"Highest level": "Högsta nivå",
"Hotel facilities": "Hotellfaciliteter",
"Hotel surroundings": "Hotellomgivning",
@@ -83,6 +85,7 @@
"Level 7": "Nivå 7",
"Level up to unlock": "Levla upp för att låsa upp",
"Log in": "Logga in",
"Log in/Join": "Logga in/Gå med",
"Log in here": "Logga in här",
"Log out": "Logga ut",
"Manage preferences": "Hantera inställningar",