From 93526ce6939c4246c4a42284d47de9a0757b90a5 Mon Sep 17 00:00:00 2001 From: Simon Emanuelsson Date: Wed, 28 Aug 2024 10:47:57 +0200 Subject: [PATCH] fix: rename retried-wrapped fetch to make caching work again --- .../(protected)/my-pages/[...path]/page.tsx | 2 + .../my-pages/profile/edit/page.tsx | 2 + .../(protected)/my-pages/profile/page.tsx | 2 + .../(public)/[contentType]/[uid]/page.tsx | 2 + .../hotelreservation/select-hotel/page.tsx | 2 +- .../hotelreservation/select-rate/page.tsx | 4 +- .../(live)/@header/[...paths]/layout.tsx | 10 +- app/[lang]/(live)/@header/[...paths]/page.tsx | 7 +- app/[lang]/(live)/layout.tsx | 2 - .../current-content-page/page.tsx | 10 +- components/ContentType/HotelPage/index.tsx | 2 +- i18n/dictionaries/da.json | 108 ++++++++-------- i18n/dictionaries/de.json | 108 ++++++++-------- i18n/dictionaries/en.json | 114 ++++++++--------- i18n/dictionaries/fi.json | 107 ++++++++-------- i18n/dictionaries/no.json | 108 ++++++++-------- i18n/dictionaries/sv.json | 113 ++++++++--------- .../Fragments/LoyaltyPage/MetaData.graphql | 20 --- .../Fragments/MyPages/MetaData.graphql | 20 --- lib/graphql/Query/MetaDataLoyaltyPage.graphql | 27 ++-- lib/graphql/Query/MetaDataMyPages.graphql | 27 ++-- lib/graphql/_request.ts | 12 +- lib/graphql/batchRequest.ts | 4 +- lib/graphql/edgeRequest.ts | 4 +- lib/graphql/request.ts | 8 +- middlewares/bookingFlow.ts | 11 +- .../routers/contentstack/accountPage/query.ts | 12 +- server/routers/contentstack/base/query.ts | 75 ++++++++---- .../routers/contentstack/breadcrumbs/utils.ts | 10 +- .../routers/contentstack/contentPage/query.ts | 7 +- .../routers/contentstack/hotelPage/query.ts | 23 +++- .../contentstack/languageSwitcher/query.ts | 70 +++++++++-- .../routers/contentstack/loyaltyPage/query.ts | 12 +- .../routers/contentstack/metadata/output.ts | 8 +- server/routers/contentstack/metadata/query.ts | 22 ++-- server/routers/contentstack/metadata/utils.ts | 11 +- .../contentstack/myPages/navigation/query.ts | 49 ++------ .../contentstack/myPages/navigation/utils.ts | 38 +++++- server/routers/hotels/query.ts | 115 ++++++++++-------- utils/entry.ts | 4 +- utils/generateMetadata.ts | 11 +- 41 files changed, 728 insertions(+), 575 deletions(-) delete mode 100644 lib/graphql/Fragments/LoyaltyPage/MetaData.graphql delete mode 100644 lib/graphql/Fragments/MyPages/MetaData.graphql diff --git a/app/[lang]/(live)/(protected)/my-pages/[...path]/page.tsx b/app/[lang]/(live)/(protected)/my-pages/[...path]/page.tsx index 012c40de2..0c55a8469 100644 --- a/app/[lang]/(live)/(protected)/my-pages/[...path]/page.tsx +++ b/app/[lang]/(live)/(protected)/my-pages/[...path]/page.tsx @@ -10,6 +10,8 @@ import styles from "./page.module.css" import type { LangParams, PageArgs } from "@/types/params" +export { generateMetadata } from "@/utils/generateMetadata" + export default async function MyPages({ params, }: PageArgs) { diff --git a/app/[lang]/(live)/(protected)/my-pages/profile/edit/page.tsx b/app/[lang]/(live)/(protected)/my-pages/profile/edit/page.tsx index 4ca8dd681..c2d24fe62 100644 --- a/app/[lang]/(live)/(protected)/my-pages/profile/edit/page.tsx +++ b/app/[lang]/(live)/(protected)/my-pages/profile/edit/page.tsx @@ -1,3 +1,5 @@ import ProfilePage from "../page" +export { generateMetadata } from "@/utils/generateMetadata" + export default ProfilePage diff --git a/app/[lang]/(live)/(protected)/my-pages/profile/page.tsx b/app/[lang]/(live)/(protected)/my-pages/profile/page.tsx index 3f17f8f96..749065fc5 100644 --- a/app/[lang]/(live)/(protected)/my-pages/profile/page.tsx +++ b/app/[lang]/(live)/(protected)/my-pages/profile/page.tsx @@ -7,6 +7,8 @@ import { setLang } from "@/i18n/serverContext" import { LangParams, PageArgs } from "@/types/params" +export { generateMetadata } from "@/utils/generateMetadata" + export default async function ProfilePage({ params }: PageArgs) { setLang(params.lang) const accountPage = await serverClient().contentstack.accountPage.get() diff --git a/app/[lang]/(live)/(public)/[contentType]/[uid]/page.tsx b/app/[lang]/(live)/(public)/[contentType]/[uid]/page.tsx index 6d2d5ffc6..a162b6d1b 100644 --- a/app/[lang]/(live)/(public)/[contentType]/[uid]/page.tsx +++ b/app/[lang]/(live)/(public)/[contentType]/[uid]/page.tsx @@ -12,6 +12,8 @@ import { UIDParams, } from "@/types/params" +export { generateMetadata } from "@/utils/generateMetadata" + export default async function ContentTypePage({ params, }: PageArgs) { diff --git a/app/[lang]/(live)/(public)/hotelreservation/select-hotel/page.tsx b/app/[lang]/(live)/(public)/hotelreservation/select-hotel/page.tsx index 34cb80d3d..45b3bb323 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/select-hotel/page.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/select-hotel/page.tsx @@ -23,7 +23,7 @@ export default async function SelectHotelPage({ const hotel = tempHotelData.data.attributes const hotels = [hotel] - const hotelFilters = await serverClient().hotel.getFilters({ + const hotelFilters = await serverClient().hotel.filters.get({ hotelId: "879", }) diff --git a/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.tsx b/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.tsx index 3ead0a3f0..518fe667c 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.tsx @@ -6,7 +6,7 @@ import BedSelection from "@/components/HotelReservation/SelectRate/BedSelection" import BreakfastSelection from "@/components/HotelReservation/SelectRate/BreakfastSelection" import FlexibilitySelection from "@/components/HotelReservation/SelectRate/FlexibilitySelection" import RoomSelection from "@/components/HotelReservation/SelectRate/RoomSelection" -import { getLang, setLang } from "@/i18n/serverContext" +import { setLang } from "@/i18n/serverContext" import styles from "./page.module.css" @@ -18,7 +18,7 @@ export default async function SelectRate({ params }: PageArgs) { // TODO: Use real endpoint. const hotel = tempHotelData.data.attributes - const rooms = await serverClient().hotel.getRates({ + const rooms = await serverClient().hotel.rates.get({ // TODO: pass the correct hotel ID and all other parameters that should be included in the search hotelId: "1", }) diff --git a/app/[lang]/(live)/@header/[...paths]/layout.tsx b/app/[lang]/(live)/@header/[...paths]/layout.tsx index d23bf78bf..3a56b7a6d 100644 --- a/app/[lang]/(live)/@header/[...paths]/layout.tsx +++ b/app/[lang]/(live)/@header/[...paths]/layout.tsx @@ -1,11 +1,17 @@ import Header from "@/components/Current/Header" +import { setLang } from "@/i18n/serverContext" + +import type { LangParams, LayoutArgs } from "@/types/params" export default function HeaderLayout({ languageSwitcher, myPagesMobileDropdown, -}: { + params, +}: LayoutArgs & { languageSwitcher: React.ReactNode -} & { myPagesMobileDropdown: React.ReactNode }) { + myPagesMobileDropdown: React.ReactNode +}) { + setLang(params.lang) return (
) { + setLang(params.lang) return null } diff --git a/app/[lang]/(live)/layout.tsx b/app/[lang]/(live)/layout.tsx index c159e3926..dd16b109c 100644 --- a/app/[lang]/(live)/layout.tsx +++ b/app/[lang]/(live)/layout.tsx @@ -17,8 +17,6 @@ import { getLang, setLang } from "@/i18n/serverContext" import type { LangParams, LayoutArgs } from "@/types/params" -export { generateMetadata } from "@/utils/generateMetadata" - export default async function RootLayout({ children, params, diff --git a/app/[lang]/(live-current)/current-content-page/page.tsx b/app/[lang]/(live-current)/current-content-page/page.tsx index abfe7aa6f..968a961b7 100644 --- a/app/[lang]/(live-current)/current-content-page/page.tsx +++ b/app/[lang]/(live-current)/current-content-page/page.tsx @@ -6,7 +6,7 @@ import { request } from "@/lib/graphql/request" import ContentPage from "@/components/Current/ContentPage" import Tracking from "@/components/Current/Tracking" -import { getLang, setLang } from "@/i18n/serverContext" +import { setLang } from "@/i18n/serverContext" import type { LangParams, PageArgs, UriParams } from "@/types/params" import type { GetCurrentBlockPageData } from "@/types/requests/currentBlockPage" @@ -26,10 +26,10 @@ export default async function CurrentContentPage({ const response = await request( GetCurrentBlockPage, { - locale: getLang(), + locale: params.lang, url: searchParams.uri, }, - { tags: [`${searchParams.uri}-${getLang()}`] } + { cache: "no-store" } ) if (!response.data?.all_current_blocks_page?.total) { @@ -43,13 +43,13 @@ export default async function CurrentContentPage({ const pageDataForTracking = await request( GetCurrentBlockPageTrackingData, { uid: response.data.all_current_blocks_page.items[0].system.uid }, - { tags: [`${searchParams.uri}-en`] } + { cache: "no-store" } ) const pageData = response.data.all_current_blocks_page.items[0] const trackingData = { - lang: getLang(), + lang: params.lang, publishedDate: pageData.system.updated_at, createdDate: pageData.system.created_at, pageId: pageData.system.uid, diff --git a/components/ContentType/HotelPage/index.tsx b/components/ContentType/HotelPage/index.tsx index 7c9737fe2..4c686d174 100644 --- a/components/ContentType/HotelPage/index.tsx +++ b/components/ContentType/HotelPage/index.tsx @@ -19,7 +19,7 @@ export default async function HotelPage() { } const lang = getLang() - const hotelData = await serverClient().hotel.getHotel({ + const hotelData = await serverClient().hotel.get({ hotelId: hotelPageIdentifierData.hotel_page_id, language: lang, include: ["RoomCategories"], diff --git a/i18n/dictionaries/da.json b/i18n/dictionaries/da.json index ce1196a99..dcef5e33c 100644 --- a/i18n/dictionaries/da.json +++ b/i18n/dictionaries/da.json @@ -1,6 +1,7 @@ { "A photo of the room": "Et foto af værelset", "Activities": "Aktiviteter", + "Add code": "Tilføj kode", "Add new card": "Tilføj nyt kort", "Address": "Adresse", "All our beds are from Bliss, allowing you to adjust the firmness for your perfect comfort.": "Alle vores senge er fra Bliss, så du kan justere fastheden til din perfekte komfort.", @@ -8,18 +9,24 @@ "Already a friend?": "Allerede en ven?", "Amenities": "Faciliteter", "An error occurred when adding a credit card, please try again later.": "Der opstod en fejl under tilføjelse af et kreditkort. Prøv venligst igen senere.", - "Are you sure you want to remove the card ending with": "Er du sikker på, at du vil fjerne kortet, der slutter med", "An error occurred when trying to update profile.": "Der opstod en fejl under forsøg på at opdatere profilen.", + "Are you sure you want to remove the card ending with": "Er du sikker på, at du vil fjerne kortet, der slutter med", "Arrival date": "Ankomstdato", "as of today": "fra idag", "As our": "Som vores {level}", "As our Close Friend": "Som vores nære ven", + "At latest": "Senest", "At the hotel": "På hotellet", "Book": "Book", + "Book reward night": "Book bonusnat", + "Booking codes and vouchers": "Bookingkoder og vouchers", "Booking number": "Bookingnummer", "Breakfast": "Morgenmad", "by": "inden", "Cancel": "Afbestille", + "characters": "tegn", + "Check in": "Check ind", + "Check out": "Check ud", "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", "Choose type of bed": "Vælg type seng", @@ -35,28 +42,35 @@ "Country": "Land", "Country code": "Landekode", "Credit card deleted successfully": "Kreditkort blev slettet", - "Your current level": "Dit nuværende niveau", "Current password": "Nuværende kodeord", - "characters": "tegn", "Date of Birth": "Fødselsdato", "Day": "Dag", "Description": "Beskrivelse", "Discard changes": "Kassér ændringer", "Do you want to start the day with Scandics famous breakfast buffé?": "Vil du starte dagen med Scandics berømte morgenbuffet?", + "Download the Scandic app": "Download Scandic-appen", "Edit": "Redigere", "Edit profile": "Rediger profil", "Email": "E-mail", - "Extras to your booking": "Tillæg til din booking", - "There are no transactions to display": "Der er ingen transaktioner at vise", "Explore all levels and benefits": "Udforsk alle niveauer og fordele", + "Extras to your booking": "Tillæg til din booking", "Failed to delete credit card, please try again later.": "Kunne ikke slette kreditkort. Prøv venligst igen senere.", "Find booking": "Find booking", + "Find hotels": "Find hotel", "Flexibility": "Fleksibilitet", "Former Scandic Hotel": "Tidligere Scandic Hotel", "From": "Fra", "from your member profile?": "fra din medlemsprofil?", "Get inspired": "Bliv inspireret", "Go back to overview": "Gå tilbage til oversigten", + "Highest level": "Højeste niveau", + "Hotel facilities": "Hotel faciliteter", + "Hotel surroundings": "Hotel omgivelser", + "How do you want to sleep?": "Hvordan vil du sove?", + "How it works": "Hvordan det virker", + "Join Scandic Friends": "Tilmeld dig Scandic Friends", + "Language": "Sprog", + "Level": "Niveau", "Level 1": "Niveau 1", "Level 2": "Niveau 2", "Level 3": "Niveau 3", @@ -64,16 +78,11 @@ "Level 5": "Niveau 5", "Level 6": "Niveau 6", "Level 7": "Niveau 7", - "Highest level": "Højeste niveau", - "How do you want to sleep?": "Hvordan vil du sove?", - "How it works": "Hvordan det virker", - "Join Scandic Friends": "Tilmeld dig Scandic Friends", - "Language": "Sprog", - "Level": "Niveau", "Level up to unlock": "Stig i niveau for at låse op", "Log in": "Log på", "Log in here": "Log ind her", "Log out": "Log ud", + "Manage preferences": "Administrer præferencer", "Meetings & Conferences": "Møder & Konferencer", "Members": "Medlemmer", "Membership cards": "Medlemskort", @@ -87,13 +96,13 @@ "New password": "Nyt kodeord", "Next": "Næste", "next level:": "Næste niveau:", - "No content published": "Intet indhold offentliggjort", - "No, keep card": "Nej, behold kortet", - "No transactions available": "Ingen tilgængelige transaktioner", - "Not found": "Ikke fundet", "night": "nat", "nights": "nætter", "Nights needed to level up": "Nætter nødvendige for at komme i niveau", + "No content published": "Intet indhold offentliggjort", + "No transactions available": "Ingen tilgængelige transaktioner", + "No, keep card": "Nej, behold kortet", + "Not found": "Ikke fundet", "number": "nummer", "On your journey": "På din rejse", "Open": "Åben", @@ -104,21 +113,22 @@ "Phone is required": "Telefonnummer er påkrævet", "Phone number": "Telefonnummer", "Please enter a valid phone number": "Indtast venligst et gyldigt telefonnummer", - "Points": "Point", "points": "Point", + "Points": "Point", "Points being calculated": "Point udregnes", "Points earned prior to May 1, 2021": "Point optjent inden 1. maj 2021", "Points may take up to 10 days to be displayed.": "Det kan tage op til 10 dage at få vist point.", "Points needed to level up": "Point nødvendige for at stige i niveau", "Points needed to stay on level": "Point nødvendige for at holde sig på niveau", - "spendable points expiring by": "{points} Brugbare point udløber den {date}", "Previous victories": "Tidligere sejre", "Read more": "Læs mere", "Read more about the hotel": "Læs mere om hotellet", "Remove card from member profile": "Fjern kortet fra medlemsprofilen", "Restaurant & Bar": "Restaurant & Bar", "Retype new password": "Gentag den nye adgangskode", + "Room facilities": "Værelsesfaciliteter", "Rooms": "Værelser", + "Rooms & Guests": "Værelser & gæster", "Save": "Gemme", "Scandic Friends Mastercard": "Scandic Friends Mastercard", "Scandic Friends Point Shop": "Scandic Friends Point Shop", @@ -126,66 +136,58 @@ "Select country of residence": "Vælg bopælsland", "Select date of birth": "Vælg fødselsdato", "Select language": "Vælg sprog", - "Show less": "Vis mindre", - "Show more": "Vis mere", "Show all amenities": "Vis alle faciliteter", - "Skip to main content": "Spring over og gå til hovedindhold", + "Show less": "Vis mindre", + "Show map": "Vis kort", + "Show more": "Vis mere", "Sign up bonus": "Velkomstbonus", - "Something went wrong!": "Noget gik galt!", + "Skip to main content": "Spring over og gå til hovedindhold", "Something went wrong and we couldn't add your card. Please try again later.": "Noget gik galt, og vi kunne ikke tilføje dit kort. Prøv venligst igen senere.", "Something went wrong and we couldn't remove your card. Please try again later.": "Noget gik galt, og vi kunne ikke fjerne dit kort. Prøv venligst igen senere.", + "Something went wrong!": "Noget gik galt!", + "special character": "speciel karakter", + "spendable points expiring by": "{points} Brugbare point udløber den {date}", "Street": "Gade", "Successfully updated profile!": "Profilen er opdateret med succes!", - "special character": "speciel karakter", + "Summary": "Opsummering", + "Tell us what information and updates you'd like to receive, and how, by clicking the link below.": "Fortæl os, hvilke oplysninger og opdateringer du gerne vil modtage, og hvordan, ved at klikke på linket nedenfor.", + "Thank you": "Tak", + "There are no transactions to display": "Der er ingen transaktioner at vise", + "to": "til", "Total Points": "Samlet antal point", - "Your points to spend": "Dine brugbare point", "Transaction date": "Overførselsdato", "Transactions": "Transaktioner", "Tripadvisor reviews": "{rating} ({count} anmeldelser på Tripadvisor)", - "to": "til", "TUI Points": "TUI Points", - "User information": "Brugeroplysninger", + "Type of bed": "Sengtype", + "Type of room": "Værelsestype", "uppercase letter": "stort bogstav", + "Use bonus cheque": "Brug Bonus Cheque", + "User information": "Brugeroplysninger", + "View your booking": "Se din booking", "Visiting address": "Besøgsadresse", "We could not add a card right now, please try again later.": "Vi kunne ikke tilføje et kort lige nu. Prøv venligst igen senere.", + "We have sent a detailed confirmation of your booking to your email:": "Vi har sendt en detaljeret bekræftelse af din booking til din email:", + "We look forward to your visit!": "Vi ser frem til dit besøg!", + "Weekdays": "Hverdage", + "Weekends": "Weekender", "Welcome": "Velkommen", "Welcome to": "Velkommen til", "Wellness & Exercise": "Velvære & Motion", + "When": "Hvornår", "Where should you go next?": "Find inspiration til dit næste ophold", + "Where to": "Hvor", "Which room class suits you the best?": "Hvilken rumklasse passer bedst til dig", "Year": "År", - "You canceled adding a new credit card.": "Du har annulleret tilføjelsen af et nyt kreditkort.", "Yes, remove my card": "Ja, fjern mit kort", + "You canceled adding a new credit card.": "Du har annulleret tilføjelsen af et nyt kreditkort.", "You have no previous stays.": "Du har ingen tidligere ophold.", "You have no upcoming stays.": "Du har ingen kommende ophold.", "Your card was successfully removed!": "Dit kort blev fjernet!", "Your card was successfully saved!": "Dit kort blev gemt!", "Your Challenges Conquer & Earn!": "Dine udfordringer Overvind og tjen!", + "Your current level": "Dit nuværende niveau", "Your level": "Dit niveau", - "Zip code": "Postnummer", - "Room facilities": "Værelsesfaciliteter", - "Hotel facilities": "Hotel faciliteter", - "Hotel surroundings": "Hotel omgivelser", - "Show map": "Vis kort", - "Check in": "Check ind", - "Check out": "Check ud", - "Summary": "Opsummering", - "Thank you": "Tak", - "We look forward to your visit!": "Vi ser frem til dit besøg!", - "We have sent a detailed confirmation of your booking to your email:": "Vi har sendt en detaljeret bekræftelse af din booking til din email:", - "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": "Hvor", - "When": "Hvornår", - "Rooms & Guests": "Værelser & gæster", - "Booking codes and vouchers": "Bookingkoder og vouchers", - "Add code": "Tilføj kode", - "Use bonus cheque": "Brug Bonus Cheque", - "Book reward night": "Book bonusnat", - "Find hotels": "Find hotel" -} + "Your points to spend": "Dine brugbare point", + "Zip code": "Postnummer" +} \ No newline at end of file diff --git a/i18n/dictionaries/de.json b/i18n/dictionaries/de.json index 476cfc598..c5d3ef573 100644 --- a/i18n/dictionaries/de.json +++ b/i18n/dictionaries/de.json @@ -1,5 +1,6 @@ { "A photo of the room": "Ein Foto des Zimmers", + "Add code": "Code hinzufügen", "Add new card": "Neue Karte hinzufügen", "Address": "Adresse", "All our beds are from Bliss, allowing you to adjust the firmness for your perfect comfort.": "Alle unsere Betten sind von Bliss, sodass Sie die Festigkeit für Ihren perfekten Komfort anpassen können.", @@ -7,18 +8,24 @@ "Already a friend?": "Sind wir schon Freunde?", "Amenities": "Annehmlichkeiten", "An error occurred when adding a credit card, please try again later.": "Beim Hinzufügen einer Kreditkarte ist ein Fehler aufgetreten. Bitte versuchen Sie es später erneut.", - "Are you sure you want to remove the card ending with": "Möchten Sie die Karte mit der Endung", "An error occurred when trying to update profile.": "Beim Versuch, das Profil zu aktualisieren, ist ein Fehler aufgetreten.", + "Are you sure you want to remove the card ending with": "Möchten Sie die Karte mit der Endung", "Arrival date": "Ankunftsdatum", "as of today": "Stand heute", "As our": "Als unser {level}", "As our Close Friend": "Als unser enger Freund", + "At latest": "Spätestens", "At the hotel": "Im Hotel", "Book": "Buchen", + "Book reward night": "Bonusnacht buchen", + "Booking codes and vouchers": "Buchungscodes und Gutscheine", "Booking number": "Buchungsnummer", "Breakfast": "Frühstück", "by": "bis", "Cancel": "Stornieren", + "characters": "figuren", + "Check in": "Einchecken", + "Check out": "Auschecken", "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", "Choose type of bed": "Wählen Sie den Bettentyp", @@ -34,28 +41,35 @@ "Country": "Land", "Country code": "Landesvorwahl", "Credit card deleted successfully": "Kreditkarte erfolgreich gelöscht", - "Your current level": "Ihr aktuelles Level", "Current password": "Aktuelles Passwort", - "characters": "figuren", "Date of Birth": "Geburtsdatum", "Day": "Tag", "Description": "Beschreibung", "Discard changes": "Änderungen verwerfen", "Do you want to start the day with Scandics famous breakfast buffé?": "Möchten Sie den Tag mit Scandics berühmtem Frühstücksbuffet beginnen?", + "Download the Scandic app": "Laden Sie die Scandic-App herunter", "Edit": "Bearbeiten", "Edit profile": "Profil bearbeiten", "Email": "Email", - "Extras to your booking": "Extras zu Ihrer Buchung", - "There are no transactions to display": "Es sind keine Transaktionen zum Anzeigen vorhanden", "Explore all levels and benefits": "Entdecken Sie alle Levels und Vorteile", + "Extras to your booking": "Extras zu Ihrer Buchung", "Failed to delete credit card, please try again later.": "Kreditkarte konnte nicht gelöscht werden. Bitte versuchen Sie es später noch einmal.", "Find booking": "Buchung finden", + "Find hotels": "Hotels finden", "Flexibility": "Flexibilität", "Former Scandic Hotel": "Ehemaliges Scandic Hotel", "From": "Fromm", "from your member profile?": "wirklich aus Ihrem Mitgliedsprofil entfernen?", "Get inspired": "Lassen Sie sich inspieren", "Go back to overview": "Zurück zur Übersicht", + "Highest level": "Höchstes Level", + "Hotel facilities": "Hotel-Infos", + "Hotel surroundings": "Umgebung des Hotels", + "How do you want to sleep?": "Wie möchtest du schlafen?", + "How it works": "Wie es funktioniert", + "Join Scandic Friends": "Treten Sie Scandic Friends bei", + "Language": "Sprache", + "Level": "Level", "Level 1": "Level 1", "Level 2": "Level 2", "Level 3": "Level 3", @@ -63,16 +77,11 @@ "Level 5": "Level 5", "Level 6": "Level 6", "Level 7": "Level 7", - "Highest level": "Höchstes Level", - "How do you want to sleep?": "Wie möchtest du schlafen?", - "How it works": "Wie es funktioniert", - "Join Scandic Friends": "Treten Sie Scandic Friends bei", - "Language": "Sprache", - "Level": "Level", "Level up to unlock": "Zum Freischalten aufsteigen", "Log in": "Anmeldung", "Log in here": "Hier einloggen", "Log out": "Ausloggen", + "Manage preferences": "Verwalten von Voreinstellungen", "Members": "Mitglieder", "Membership cards": "Mitgliedskarten", "Membership ID": "Mitglieds-ID", @@ -85,13 +94,13 @@ "New password": "Neues Kennwort", "Next": "Nächste", "next level:": "Nächstes Level:", - "No content published": "Kein Inhalt veröffentlicht", - "No, keep card": "Nein, Karte behalten", - "No transactions available": "Keine Transaktionen verfügbar", - "Not found": "Nicht gefunden", "night": "nacht", "nights": "Nächte", "Nights needed to level up": "Nächte, die zum Levelaufstieg benötigt werden", + "No content published": "Kein Inhalt veröffentlicht", + "No transactions available": "Keine Transaktionen verfügbar", + "No, keep card": "Nein, Karte behalten", + "Not found": "Nicht gefunden", "number": "nummer", "On your journey": "Auf deiner Reise", "Open": "Offen", @@ -108,12 +117,13 @@ "Points may take up to 10 days to be displayed.": "Es kann bis zu 10 Tage dauern, bis Punkte angezeigt werden.", "Points needed to level up": "Punkte, die zum Levelaufstieg benötigt werden", "Points needed to stay on level": "Erforderliche Punkte, um auf diesem Level zu bleiben", - "spendable points expiring by": "{points} Einlösbare punkte verfallen bis zum {date}", "Previous victories": "Bisherige Siege", "Read more": "Mehr lesen", "Read more about the hotel": "Lesen Sie mehr über das Hotel", "Remove card from member profile": "Karte aus dem Mitgliedsprofil entfernen", "Retype new password": "Neues Passwort erneut eingeben", + "Room facilities": "Zimmerausstattung", + "Rooms & Guests": "Zimmer & Gäste", "Save": "Speichern", "Scandic Friends Mastercard": "Scandic Friends Mastercard", "Scandic Friends Point Shop": "Scandic Friends Point Shop", @@ -121,65 +131,57 @@ "Select country of residence": "Wählen Sie das Land Ihres Wohnsitzes aus", "Select date of birth": "Geburtsdatum auswählen", "Select language": "Sprache auswählen", - "Show less": "Weniger anzeigen", - "Show more": "Mehr anzeigen", "Show all amenities": "Alle Annehmlichkeiten anzeigen", - "Skip to main content": "Direkt zum Inhalt", + "Show less": "Weniger anzeigen", + "Show map": "Karte anzeigen", + "Show more": "Mehr anzeigen", "Sign up bonus": "Anmelde-Bonus", - "Something went wrong!": "Etwas ist schief gelaufen!", + "Skip to main content": "Direkt zum Inhalt", "Something went wrong and we couldn't add your card. Please try again later.": "Ein Fehler ist aufgetreten und wir konnten Ihre Karte nicht hinzufügen. Bitte versuchen Sie es später erneut.", "Something went wrong and we couldn't remove your card. Please try again later.": "Ein Fehler ist aufgetreten und wir konnten Ihre Karte nicht entfernen. Bitte versuchen Sie es später noch einmal.", + "Something went wrong!": "Etwas ist schief gelaufen!", + "special character": "sonderzeichen", + "spendable points expiring by": "{points} Einlösbare punkte verfallen bis zum {date}", "Street": "Straße", "Successfully updated profile!": "Profil erfolgreich aktualisiert!", - "special character": "sonderzeichen", + "Summary": "Zusammenfassung", + "Tell us what information and updates you'd like to receive, and how, by clicking the link below.": "Teilen Sie uns mit, welche Informationen und Updates Sie wie erhalten möchten, indem Sie auf den unten stehenden Link klicken.", + "Thank you": "Danke", + "There are no transactions to display": "Es sind keine Transaktionen zum Anzeigen vorhanden", + "to": "zu", "Total Points": "Gesamtpunktzahl", - "Your points to spend": "Meine Punkte", "Transaction date": "Transaktionsdatum", "Transactions": "Transaktionen", "Tripadvisor reviews": "{rating} ({count} Bewertungen auf Tripadvisor)", - "to": "zu", "TUI Points": "TUI Points", - "User information": "Nutzerinformation", + "Type of bed": "Bettentyp", + "Type of room": "Zimmerart", "uppercase letter": "großbuchstabe", + "Use bonus cheque": "Bonusscheck nutzen", + "User information": "Nutzerinformation", + "View your booking": "Ihre Buchung ansehen", "Visiting address": "Besuchsadresse", "We could not add a card right now, please try again later.": "Wir konnten momentan keine Karte hinzufügen. Bitte versuchen Sie es später noch einmal.", - "Welcome to": "Willkommen zu", + "We have sent a detailed confirmation of your booking to your email:": "Wir haben eine detaillierte Bestätigung Ihrer Buchung an Ihre E-Mail gesendet:", + "We look forward to your visit!": "Wir freuen uns auf Ihren Besuch!", + "Weekdays": "Wochentage", + "Weekends": "Wochenenden", "Welcome": "Willkommen", + "Welcome to": "Willkommen zu", + "When": "Wann", "Where should you go next?": "Wo geht es als Nächstes hin?", + "Where to": "Wohin", "Which room class suits you the best?": "Welche Zimmerklasse passt am besten zu Ihnen?", "Year": "Jahr", - "You canceled adding a new credit card.": "Sie haben das Hinzufügen einer neuen Kreditkarte abgebrochen.", "Yes, remove my card": "Ja, meine Karte entfernen", + "You canceled adding a new credit card.": "Sie haben das Hinzufügen einer neuen Kreditkarte abgebrochen.", "You have no previous stays.": "Sie haben keine vorherigen Aufenthalte.", "You have no upcoming stays.": "Sie haben keine bevorstehenden Aufenthalte.", "Your card was successfully removed!": "Ihre Karte wurde erfolgreich entfernt!", "Your card was successfully saved!": "Ihre Karte wurde erfolgreich gespeichert!", "Your Challenges Conquer & Earn!": "Meistern Sie Ihre Herausforderungen und verdienen Sie Geld!", + "Your current level": "Ihr aktuelles Level", "Your level": "Dein level", - "Zip code": "PLZ", - "Room facilities": "Zimmerausstattung", - "Hotel facilities": "Hotel-Infos", - "Hotel surroundings": "Umgebung des Hotels", - "Show map": "Karte anzeigen", - "Check in": "Einchecken", - "Check out": "Auschecken", - "Summary": "Zusammenfassung", - "Thank you": "Danke", - "We look forward to your visit!": "Wir freuen uns auf Ihren Besuch!", - "We have sent a detailed confirmation of your booking to your email:": "Wir haben eine detaillierte Bestätigung Ihrer Buchung an Ihre E-Mail gesendet:", - "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", - "Booking codes and vouchers": "Buchungscodes und Gutscheine", - "Add code": "Code hinzufügen", - "Use bonus cheque": "Bonusscheck nutzen", - "Book reward night": "Bonusnacht buchen", - "Find hotels": "Hotels finden" -} + "Your points to spend": "Meine Punkte", + "Zip code": "PLZ" +} \ No newline at end of file diff --git a/i18n/dictionaries/en.json b/i18n/dictionaries/en.json index d164ae04e..9d10d7855 100644 --- a/i18n/dictionaries/en.json +++ b/i18n/dictionaries/en.json @@ -1,6 +1,7 @@ { "A photo of the room": "A photo of the room", "Activities": "Activities", + "Add code": "Add code", "Add new card": "Add new card", "Address": "Address", "All our beds are from Bliss, allowing you to adjust the firmness for your perfect comfort.": "All our beds are from Bliss, allowing you to adjust the firmness for your perfect comfort.", @@ -8,18 +9,24 @@ "Already a friend?": "Already a friend?", "Amenities": "Amenities", "An error occurred when adding a credit card, please try again later.": "An error occurred when adding a credit card, please try again later.", - "Are you sure you want to remove the card ending with": "Are you sure you want to remove the card ending with", "An error occurred when trying to update profile.": "An error occurred when trying to update profile.", + "Are you sure you want to remove the card ending with": "Are you sure you want to remove the card ending with", "Arrival date": "Arrival date", "as of today": "as of today", "As our": "As our {level}", "As our Close Friend": "As our Close Friend", + "At latest": "At latest", "At the hotel": "At the hotel", "Book": "Book", + "Book reward night": "Book reward night", + "Booking codes and vouchers": "Booking codes and vouchers", "Booking number": "Booking number", "Breakfast": "Breakfast", "by": "by", "Cancel": "Cancel", + "characters": "characters", + "Check in": "Check in", + "Check out": "Check out", "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", "Choose type of bed": "Choose type of bed", @@ -34,34 +41,41 @@ "Could not find requested resource": "Could not find requested resource", "Country": "Country", "Country code": "Country code", - "Your current level": "Your current level", - "Current password": "Current password", - "characters": "characters", "Credit card deleted successfully": "Credit card deleted successfully", + "Current password": "Current password", "Date of Birth": "Date of Birth", "Day": "Day", "Description": "Description", "Discard changes": "Discard changes", "Distance to city centre": "{number}km to city centre", "Do you want to start the day with Scandics famous breakfast buffé?": "Do you want to start the day with Scandics famous breakfast buffé?", + "Download the Scandic app": "Download the Scandic app", "Edit": "Edit", "Edit profile": "Edit profile", "Email": "Email", - "There are no transactions to display": "There are no transactions to display", "Explore all levels and benefits": "Explore all levels and benefits", - "Failed to delete credit card, please try again later.": "Failed to delete credit card, please try again later.", "Extras to your booking": "Extras to your booking", + "Failed to delete credit card, please try again later.": "Failed to delete credit card, please try again later.", "FAQ": "FAQ", "Find booking": "Find booking", - "Former Scandic Hotel": "Former Scandic Hotel", + "Find hotels": "Find hotels", "Flexibility": "Flexibility", + "Former Scandic Hotel": "Former Scandic Hotel", "From": "From", "from your member profile?": "from your member profile?", "Get inspired": "Get inspired", "Go back to overview": "Go back to overview", + "Highest level": "Highest level", + "Hotel facilities": "Hotel facilities", + "Hotel surroundings": "Hotel surroundings", "hotelPages.rooms.roomCard.person": "person", "hotelPages.rooms.roomCard.persons": "persons", "hotelPages.rooms.roomCard.seeRoomDetails": "See room details", + "How do you want to sleep?": "How do you want to sleep?", + "How it works": "How it works", + "Join Scandic Friends": "Join Scandic Friends", + "Language": "Language", + "Level": "Level", "Level 1": "Level 1", "Level 2": "Level 2", "Level 3": "Level 3", @@ -69,16 +83,11 @@ "Level 5": "Level 5", "Level 6": "Level 6", "Level 7": "Level 7", - "Highest level": "Highest level", - "How do you want to sleep?": "How do you want to sleep?", - "How it works": "How it works", - "Join Scandic Friends": "Join Scandic Friends", - "Language": "Language", - "Level": "Level", "Level up to unlock": "Level up to unlock", "Log in": "Log in", "Log in here": "Log in here", "Log out": "Log out", + "Manage preferences": "Manage preferences", "Meetings & Conferences": "Meetings & Conferences", "Members": "Members", "Membership cards": "Membership cards", @@ -92,13 +101,13 @@ "New password": "New password", "Next": "Next", "next level:": "next level:", - "No content published": "No content published", - "No, keep card": "No, keep card", - "No transactions available": "No transactions available", - "Not found": "Not found", "night": "night", "nights": "nights", "Nights needed to level up": "Nights needed to level up", + "No content published": "No content published", + "No transactions available": "No transactions available", + "No, keep card": "No, keep card", + "Not found": "Not found", "number": "number", "On your journey": "On your journey", "Open": "Open", @@ -109,89 +118,82 @@ "Phone is required": "Phone is required", "Phone number": "Phone number", "Please enter a valid phone number": "Please enter a valid phone number", - "Points": "Points", "points": "Points", + "Points": "Points", "Points being calculated": "Points being calculated", "Points earned prior to May 1, 2021": "Points earned prior to May 1, 2021", "Points may take up to 10 days to be displayed.": "Points may take up to 10 days to be displayed.", "Points needed to level up": "Points needed to level up", "Points needed to stay on level": "Points needed to stay on level", - "spendable points expiring by": "{points} spendable points expiring by {date}", "Previous victories": "Previous victories", "Read more": "Read more", "Read more about the hotel": "Read more about the hotel", "Remove card from member profile": "Remove card from member profile", "Restaurant & Bar": "Restaurant & Bar", "Retype new password": "Retype new password", + "Room facilities": "Room facilities", "Rooms": "Rooms", + "Rooms & Guests": "Rooms & Guests", "Save": "Save", - "See room details": "See room details", "Scandic Friends Mastercard": "Scandic Friends Mastercard", "Scandic Friends Point Shop": "Scandic Friends Point Shop", + "See room details": "See room details", "Select a country": "Select a country", "Select country of residence": "Select country of residence", "Select date of birth": "Select date of birth", "Select language": "Select language", - "Show less": "Show less", - "Show more": "Show more", "Show all amenities": "Show all amenities", - "Skip to main content": "Skip to main content", + "Show less": "Show less", + "Show map": "Show map", + "Show more": "Show more", "Sign up bonus": "Sign up bonus", - "Something went wrong!": "Something went wrong!", + "Skip to main content": "Skip to main content", "Something went wrong and we couldn't add your card. Please try again later.": "Something went wrong and we couldn't add your card. Please try again later.", "Something went wrong and we couldn't remove your card. Please try again later.": "Something went wrong and we couldn't remove your card. Please try again later.", + "Something went wrong!": "Something went wrong!", + "special character": "special character", + "spendable points expiring by": "{points} spendable points expiring by {date}", "Street": "Street", "Successfully updated profile!": "Successfully updated profile!", - "special character": "special character", + "Summary": "Summary", + "Tell us what information and updates you'd like to receive, and how, by clicking the link below.": "Tell us what information and updates you'd like to receive, and how, by clicking the link below.", + "Thank you": "Thank you", + "There are no transactions to display": "There are no transactions to display", + "to": "to", "Total Points": "Total Points", - "Your points to spend": "Your points to spend", - "You canceled adding a new credit card.": "You canceled adding a new credit card.", "Transaction date": "Transaction date", "Transactions": "Transactions", "Tripadvisor reviews": "{rating} ({count} reviews on Tripadvisor)", - "to": "to", "TUI Points": "TUI Points", - "User information": "User information", + "Type of bed": "Type of bed", + "Type of room": "Type of room", "uppercase letter": "uppercase letter", + "Use bonus cheque": "Use bonus cheque", + "User information": "User information", + "View your booking": "View your booking", "Visiting address": "Visiting address", "We could not add a card right now, please try again later.": "We could not add a card right now, please try again later.", + "We have sent a detailed confirmation of your booking to your email: ": "We have sent a detailed confirmation of your booking to your email: ", + "We look forward to your visit!": "We look forward to your visit!", + "Weekdays": "Weekdays", + "Weekends": "Weekends", "Welcome": "Welcome", "Welcome to": "Welcome to", "Wellness & Exercise": "Wellness & Exercise", + "When": "When", "Where should you go next?": "Where should you go next?", + "Where to": "Where to", "Which room class suits you the best?": "Which room class suits you the best?", "Year": "Year", "Yes, remove my card": "Yes, remove my card", + "You canceled adding a new credit card.": "You canceled adding a new credit card.", "You have no previous stays.": "You have no previous stays.", "You have no upcoming stays.": "You have no upcoming stays.", "Your card was successfully removed!": "Your card was successfully removed!", "Your card was successfully saved!": "Your card was successfully saved!", "Your Challenges Conquer & Earn!": "Your Challenges Conquer & Earn!", + "Your current level": "Your current level", "Your level": "Your level", - "Zip code": "Zip code", - "Room facilities": "Room facilities", - "Hotel facilities": "Hotel facilities", - "Hotel surroundings": "Hotel surroundings", - "Show map": "Show map", - "Check in": "Check in", - "Check out": "Check out", - "Summary": "Summary", - "Thank you": "Thank you", - "We look forward to your visit!": "We look forward to your visit!", - "We have sent a detailed confirmation of your booking to your email: ": "We have sent a detailed confirmation of your booking to your email: ", - "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", - "Booking codes and vouchers": "Booking codes and vouchers", - "Add code": "Add code", - "Use bonus cheque": "Use bonus cheque", - "Book reward night": "Book reward night", - "Find hotels": "Find hotels" -} + "Your points to spend": "Your points to spend", + "Zip code": "Zip code" +} \ No newline at end of file diff --git a/i18n/dictionaries/fi.json b/i18n/dictionaries/fi.json index c62ed9e98..d421d976a 100644 --- a/i18n/dictionaries/fi.json +++ b/i18n/dictionaries/fi.json @@ -1,6 +1,7 @@ { "A photo of the room": "Kuva huoneesta", "Activities": "Aktiviteetit", + "Add code": "Lisää koodi", "Add new card": "Lisää uusi kortti", "Address": "Osoite", "All our beds are from Bliss, allowing you to adjust the firmness for your perfect comfort.": "Kaikki sänkymme ovat Bliss, joten voit säätää kiinteyttä täydelliseen mukavuuteen.", @@ -8,18 +9,24 @@ "Already a friend?": "Oletko jo ystävä?", "Amenities": "Mukavuudet", "An error occurred when adding a credit card, please try again later.": "Luottokorttia lisättäessä tapahtui virhe. Yritä myöhemmin uudelleen.", - "Are you sure you want to remove the card ending with": "Haluatko varmasti poistaa kortin, joka päättyy numeroon", "An error occurred when trying to update profile.": "Profiilia päivitettäessä tapahtui virhe.", + "Are you sure you want to remove the card ending with": "Haluatko varmasti poistaa kortin, joka päättyy numeroon", "Arrival date": "Saapumispäivä", "as of today": "tänään", "As our": "{level}-etu", "As our Close Friend": "Läheisenä ystävänämme", + "At latest": "Viimeistään", "At the hotel": "Hotellissa", "Book": "Varaa", + "Book reward night": "Kirjapalkinto-ilta", + "Booking codes and vouchers": "Varauskoodit ja kupongit", "Booking number": "Varausnumero", "Breakfast": "Aamiainen", "by": "mennessä", "Cancel": "Peruuttaa", + "characters": "hahmoja", + "Check in": "Sisäänkirjautuminen", + "Check out": "Uloskirjautuminen", "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", "Choose type of bed": "Valitse sänkytyyppi", @@ -35,28 +42,35 @@ "Country": "Maa", "Country code": "Maatunnus", "Credit card deleted successfully": "Luottokortti poistettu onnistuneesti", - "Your current level": "Nykyinen tasosi", "Current password": "Nykyinen salasana", - "characters": "hahmoja", "Date of Birth": "Syntymäaika", "Day": "Päivä", "Description": "Kuvaus", "Discard changes": "Hylkää muutokset", "Do you want to start the day with Scandics famous breakfast buffé?": "Haluatko aloittaa päiväsi Scandicsin kuuluisalla aamiaisbuffella?", + "Download the Scandic app": "Lataa Scandic-sovellus", "Edit": "Muokata", "Edit profile": "Muokkaa profiilia", "Email": "Sähköposti", - "Extras to your booking": "Varauksessa lisäpalveluita", - "There are no transactions to display": "Näytettäviä tapahtumia ei ole", "Explore all levels and benefits": "Tutustu kaikkiin tasoihin ja etuihin", + "Extras to your booking": "Varauksessa lisäpalveluita", "Failed to delete credit card, please try again later.": "Luottokortin poistaminen epäonnistui, yritä myöhemmin uudelleen.", "Find booking": "Etsi varaus", + "Find hotels": "Etsi hotelleja", "Flexibility": "Joustavuus", "Former Scandic Hotel": "Entinen Scandic-hotelli", "From": "From", "from your member profile?": "jäsenprofiilistasi?", "Get inspired": "Inspiroidu", "Go back to overview": "Palaa yleiskatsaukseen", + "Highest level": "Korkein taso", + "Hotel facilities": "Hotellin palvelut", + "Hotel surroundings": "Hotellin ympäristö", + "How do you want to sleep?": "Kuinka haluat nukkua?", + "How it works": "Kuinka se toimii", + "Join Scandic Friends": "Liity jäseneksi", + "Language": "Kieli", + "Level": "Level", "Level 1": "Taso 1", "Level 2": "Taso 2", "Level 3": "Taso 3", @@ -64,16 +78,11 @@ "Level 5": "Taso 5", "Level 6": "Taso 6", "Level 7": "Taso 7", - "Highest level": "Korkein taso", - "How do you want to sleep?": "Kuinka haluat nukkua?", - "How it works": "Kuinka se toimii", - "Join Scandic Friends": "Liity jäseneksi", - "Language": "Kieli", - "Level": "Level", "Level up to unlock": "Nouse seuraavalle tasolle ja avaat seuraavan edun", "Log in": "Kirjaudu sisään", "Log in here": "Kirjaudu sisään", "Log out": "Kirjaudu ulos", + "Manage preferences": "Asetusten hallinta", "Meetings & Conferences": "Kokoukset & Konferenssit", "Members": "Jäsenet", "Membership cards": "Jäsenkortit", @@ -87,13 +96,13 @@ "New password": "Uusi salasana", "Next": "Seuraava", "next level:": "pistettä tasolle:", - "No content published": "Ei julkaistua sisältöä", - "No, keep card": "Ei, pidä kortti", - "No transactions available": "Ei tapahtumia saatavilla", - "Not found": "Ei löydetty", "night": "yö", "nights": "yötä", "Nights needed to level up": "Yöt, joita tarvitaan tasolle", + "No content published": "Ei julkaistua sisältöä", + "No transactions available": "Ei tapahtumia saatavilla", + "No, keep card": "Ei, pidä kortti", + "Not found": "Ei löydetty", "number": "määrä", "On your journey": "Matkallasi", "Open": "Avata", @@ -111,14 +120,14 @@ "Points may take up to 10 days to be displayed.": "Pisteiden näyttäminen voi kestää jopa 10 päivää.", "Points needed to level up": "Tarvitset vielä", "Points needed to stay on level": "Tällä tasolla pysymiseen tarvittavat pisteet", - "spendable points expiring by": "{points} pistettä vanhenee {date} mennessä", - "Previous victories": "Edelliset voitot", "Read more": "Lue lisää", "Read more about the hotel": "Lue lisää hotellista", "Remove card from member profile": "Poista kortti jäsenprofiilista", "Restaurant & Bar": "Ravintola & Baari", "Retype new password": "Kirjoita uusi salasana uudelleen", + "Room facilities": "Huoneen varustelu", "Rooms": "Huoneet", + "Rooms & Guestss": "Huoneet & Vieraat", "Save": "Tallentaa", "Scandic Friends Mastercard": "Scandic Friends Mastercard", "Scandic Friends Point Shop": "Scandic Friends Point Shop", @@ -126,66 +135,58 @@ "Select country of residence": "Valitse asuinmaa", "Select date of birth": "Valitse syntymäaika", "Select language": "Valitse kieli", - "Show less": "Näytä vähemmän", - "Show more": "Näytä lisää", "Show all amenities": "Näytä kaikki mukavuudet", - "Skip to main content": "Siirry pääsisältöön", + "Show less": "Näytä vähemmän", + "Show map": "Näytä kartta", + "Show more": "Näytä lisää", "Sign up bonus": "Liittymisbonus", - "Something went wrong!": "Jotain meni pieleen!", + "Skip to main content": "Siirry pääsisältöön", "Something went wrong and we couldn't add your card. Please try again later.": "Jotain meni pieleen, emmekä voineet lisätä korttiasi. Yritä myöhemmin uudelleen.", "Something went wrong and we couldn't remove your card. Please try again later.": "Jotain meni pieleen, emmekä voineet poistaa korttiasi. Yritä myöhemmin uudelleen.", + "Something went wrong!": "Jotain meni pieleen!", + "special character": "erikoishahmo", + "spendable points expiring by": "{points} pistettä vanhenee {date} mennessä", "Street": "Katu", "Successfully updated profile!": "Profiilin päivitys onnistui!", - "special character": "erikoishahmo", + "Summary": "Yhteenveto", + "Tell us what information and updates you'd like to receive, and how, by clicking the link below.": "Kerro meille, mitä tietoja ja päivityksiä haluat saada ja miten, napsauttamalla alla olevaa linkkiä.", + "Thank you": "Kiitos", + "There are no transactions to display": "Näytettäviä tapahtumia ei ole", + "to": "to", "Total Points": "Kokonaispisteet", - "Your points to spend": "Käytettävissä olevat pisteesi", "Transaction date": "Tapahtuman päivämäärä", "Transactions": "Tapahtumat", "Tripadvisor reviews": "{rating} ({count} arvostelua TripAdvisorissa)", - "to": "to", "TUI Points": "TUI Points", - "User information": "Käyttäjän tiedot", + "Type of bed": "Vuodetyyppi", + "Type of room": "Huonetyyppi", "uppercase letter": "iso kirjain", + "Use bonus cheque": "Käytä bonussekkiä", + "User information": "Käyttäjän tiedot", + "View your booking": "Näytä varauksesi", "Visiting address": "Käyntiosoite", "We could not add a card right now, please try again later.": "Emme voineet lisätä korttia juuri nyt. Yritä myöhemmin uudelleen.", + "We have sent a detailed confirmation of your booking to your email:": "Olemme lähettäneet yksityiskohtaisen varausvahvistuksen sähköpostiisi:", + "We look forward to your visit!": "Odotamme innolla vierailuasi!", + "Weekdays": "Arkisin", + "Weekends": "Viikonloppuisin", "Welcome": "Tervetuloa", "Welcome to": "Tervetuloa", "Wellness & Exercise": "Hyvinvointi & Liikunta", + "When": "Kun", "Where should you go next?": "Mihin menisit seuraavaksi?", + "Where to": "Minne", "Which room class suits you the best?": "Mikä huoneluokka sopii sinulle parhaiten?", "Year": "Vuosi", "Yes, remove my card": "Kyllä, poista korttini", + "You canceled adding a new credit card.": "Peruutit uuden luottokortin lisäämisen.", "You have no previous stays.": "Sinulla ei ole aiempia majoituksia.", "You have no upcoming stays.": "Sinulla ei ole tulevia majoituksia.", "Your card was successfully removed!": "Korttisi poistettiin onnistuneesti!", "Your card was successfully saved!": "Korttisi tallennettu onnistuneesti!", - "You canceled adding a new credit card.": "Peruutit uuden luottokortin lisäämisen.", "Your Challenges Conquer & Earn!": "Voita ja ansaitse haasteesi!", + "Your current level": "Nykyinen tasosi", "Your level": "Tasosi", - "Zip code": "Postinumero", - "Room facilities": "Huoneen varustelu", - "Hotel facilities": "Hotellin palvelut", - "Hotel surroundings": "Hotellin ympäristö", - "Show map": "Näytä kartta", - "Check in": "Sisäänkirjautuminen", - "Check out": "Uloskirjautuminen", - "Summary": "Yhteenveto", - "Thank you": "Kiitos", - "We look forward to your visit!": "Odotamme innolla vierailuasi!", - "We have sent a detailed confirmation of your booking to your email:": "Olemme lähettäneet yksityiskohtaisen varausvahvistuksen sähköpostiisi:", - "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", - "Booking codes and vouchers": "Varauskoodit ja kupongit", - "Add code": "Lisää koodi", - "Use bonus cheque": "Käytä bonussekkiä", - "Book reward night": "Kirjapalkinto-ilta", - "Find hotels": "Etsi hotelleja" -} + "Your points to spend": "Käytettävissä olevat pisteesi", + "Zip code": "Postinumero" +} \ No newline at end of file diff --git a/i18n/dictionaries/no.json b/i18n/dictionaries/no.json index bd059414e..5fc40010e 100644 --- a/i18n/dictionaries/no.json +++ b/i18n/dictionaries/no.json @@ -1,6 +1,7 @@ { "A photo of the room": "Et bilde av rommet", "Activities": "Aktiviteter", + "Add code": "Legg til kode", "Add new card": "Legg til nytt kort", "Address": "Adresse", "All our beds are from Bliss, allowing you to adjust the firmness for your perfect comfort.": "Alle sengene våre er fra Bliss, slik at du kan justere fastheten for din perfekte komfort.", @@ -8,18 +9,24 @@ "Already a friend?": "Allerede Friend?", "Amenities": "Fasiliteter", "An error occurred when adding a credit card, please try again later.": "Det oppstod en feil ved å legge til et kredittkort. Prøv igjen senere.", - "Are you sure you want to remove the card ending with": "Er du sikker på at du vil fjerne kortet som slutter på", "An error occurred when trying to update profile.": "Det oppstod en feil under forsøk på å oppdatere profilen.", + "Are you sure you want to remove the card ending with": "Er du sikker på at du vil fjerne kortet som slutter på", "Arrival date": "Ankomstdato", "as of today": "per idag", "As our": "Som vår {level}", "As our Close Friend": "Som vår nære venn", + "At latest": "Senest", "At the hotel": "På hotellet", "Book": "Bestill", + "Book reward night": "Bestill belønningskveld", + "Booking codes and vouchers": "Bestillingskoder og kuponger", "Booking number": "Bestillingsnummer", "Breakfast": "Frokost", "by": "innen", "Cancel": "Avbryt", + "characters": "tegn", + "Check in": "Sjekk inn", + "Check out": "Sjekk ut", "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", "Choose type of bed": "Velg type seng", @@ -34,29 +41,36 @@ "Could not find requested resource": "Kunne ikke finne den forespurte ressursen", "Country": "Land", "Country code": "Landskode", - "Your current level": "Ditt nåværende nivå", - "Current password": "Nåværende passord", - "characters": "tegn", "Credit card deleted successfully": "Kredittkort slettet", + "Current password": "Nåværende passord", "Date of Birth": "Fødselsdato", "Day": "Dag", "Description": "Beskrivelse", "Discard changes": "Forkaste endringer", "Do you want to start the day with Scandics famous breakfast buffé?": "Vil du starte dagen med Scandics berømte frokostbuffé?", + "Download the Scandic app": "Last ned Scandic-appen", "Edit": "Redigere", "Edit profile": "Rediger profil", "Email": "E-post", - "Extras to your booking": "Tilvalg til bestillingen din", - "There are no transactions to display": "Det er ingen transaksjoner å vise", "Explore all levels and benefits": "Utforsk alle nivåer og fordeler", + "Extras to your booking": "Tilvalg til bestillingen din", "Failed to delete credit card, please try again later.": "Kunne ikke slette kredittkortet, prøv igjen senere.", "Find booking": "Finn booking", + "Find hotels": "Finn hotell", "Flexibility": "Fleksibilitet", "Former Scandic Hotel": "Tidligere Scandic-hotell", "From": "Fra", "from your member profile?": "fra medlemsprofilen din?", "Get inspired": "Bli inspirert", "Go back to overview": "Gå tilbake til oversikten", + "Highest level": "Høyeste nivå", + "Hotel facilities": "Hotelfaciliteter", + "Hotel surroundings": "Hotellomgivelser", + "How do you want to sleep?": "Hvordan vil du sove?", + "How it works": "Hvordan det fungerer", + "Join Scandic Friends": "Bli med i Scandic Friends", + "Language": "Språk", + "Level": "Nivå", "Level 1": "Nivå 1", "Level 2": "Nivå 2", "Level 3": "Nivå 3", @@ -64,16 +78,11 @@ "Level 5": "Nivå 5", "Level 6": "Nivå 6", "Level 7": "Nivå 7", - "Highest level": "Høyeste nivå", - "How do you want to sleep?": "Hvordan vil du sove?", - "How it works": "Hvordan det fungerer", - "Join Scandic Friends": "Bli med i Scandic Friends", - "Language": "Språk", - "Level": "Nivå", "Level up to unlock": "Nivå opp for å låse opp", "Log in": "Logg Inn", "Log in here": "Logg inn her", "Log out": "Logg ut", + "Manage preferences": "Administrer preferanser", "Meetings & Conferences": "Møter & Konferanser", "Members": "Medlemmer", "Membership cards": "Medlemskort", @@ -87,13 +96,13 @@ "New password": "Nytt passord", "Next": "Neste", "next level:": "Neste nivå:", - "No content published": "Ingen innhold publisert", - "No, keep card": "Nei, behold kortet", - "No transactions available": "Ingen transaksjoner tilgjengelig", - "Not found": "Ikke funnet", "night": "natt", "nights": "netter", "Nights needed to level up": "Netter som trengs for å komme opp i nivå", + "No content published": "Ingen innhold publisert", + "No transactions available": "Ingen transaksjoner tilgjengelig", + "No, keep card": "Nei, behold kortet", + "Not found": "Ikke funnet", "number": "antall", "On your journey": "På reisen din", "Open": "Åpen", @@ -111,14 +120,15 @@ "Points may take up to 10 days to be displayed.": "Det kan ta opptil 10 dager før poeng vises.", "Points needed to level up": "Poeng som trengs for å komme opp i nivå", "Points needed to stay on level": "Poeng som trengs for å holde seg på nivå", - "spendable points expiring by": "{points} Brukbare poeng utløper innen {date}", "Previous victories": "Tidligere seire", "Read more": "Les mer", "Read more about the hotel": "Les mer om hotellet", "Remove card from member profile": "Fjern kortet fra medlemsprofilen", "Restaurant & Bar": "Restaurant & Bar", "Retype new password": "Skriv inn nytt passord på nytt", + "Room facilities": "Romfasiliteter", "Rooms": "Rom", + "Rooms & Guests": "Rom og gjester", "Save": "Lagre", "Scandic Friends Mastercard": "Scandic Friends Mastercard", "Scandic Friends Point Shop": "Scandic Friends Point Shop", @@ -126,66 +136,58 @@ "Select country of residence": "Velg bostedsland", "Select date of birth": "Velg fødselsdato", "Select language": "Velg språk", - "Show less": "Vis mindre", - "Show more": "Vis mer", "Show all amenities": "Vis alle fasiliteter", - "Skip to main content": "Gå videre til hovedsiden", + "Show less": "Vis mindre", + "Show map": "Vis kart", + "Show more": "Vis mer", "Sign up bonus": "Velkomstbonus", - "Something went wrong!": "Noe gikk galt!", + "Skip to main content": "Gå videre til hovedsiden", "Something went wrong and we couldn't add your card. Please try again later.": "Noe gikk galt, og vi kunne ikke legge til kortet ditt. Prøv igjen senere.", "Something went wrong and we couldn't remove your card. Please try again later.": "Noe gikk galt, og vi kunne ikke fjerne kortet ditt. Vennligst prøv igjen senere.", + "Something went wrong!": "Noe gikk galt!", + "special character": "spesiell karakter", + "spendable points expiring by": "{points} Brukbare poeng utløper innen {date}", "Street": "Gate", "Successfully updated profile!": "Vellykket oppdatert profil!", - "special character": "spesiell karakter", + "Summary": "Sammendrag", + "Tell us what information and updates you'd like to receive, and how, by clicking the link below.": "Fortell oss hvilken informasjon og hvilke oppdateringer du ønsker å motta, og hvordan, ved å klikke på lenken nedenfor.", + "Thank you": "Takk", + "There are no transactions to display": "Det er ingen transaksjoner å vise", + "to": "til", "Total Points": "Totale poeng", - "Your points to spend": "Dine brukbare poeng", "Transaction date": "Transaksjonsdato", "Transactions": "Transaksjoner", "Tripadvisor reviews": "{rating} ({count} anmeldelser på Tripadvisor)", - "to": "til", "TUI Points": "TUI Points", - "User information": "Brukerinformasjon", + "Type of bed": "Sengtype", + "Type of room": "Romtype", "uppercase letter": "stor bokstav", + "Use bonus cheque": "Bruk bonussjekk", + "User information": "Brukerinformasjon", + "View your booking": "Se din bestilling", "Visiting address": "Besøksadresse", "We could not add a card right now, please try again later.": "Vi kunne ikke legge til et kort akkurat nå. Prøv igjen senere.", + "We have sent a detailed confirmation of your booking to your email:": "Vi har sendt en detaljert bekreftelse av din bestilling til din e-post:", + "We look forward to your visit!": "Vi ser frem til ditt besøk!", + "Weekdays": "Hverdager", + "Weekends": "Helger", "Welcome": "Velkommen", "Welcome to": "Velkommen til", "Wellness & Exercise": "Velvære & Trening", + "When": "Når", "Where should you go next?": "Hvor ønsker du å reise neste gang?", + "Where to": "Hvor skal du", "Which room class suits you the best?": "Hvilken romklasse passer deg best?", "Year": "År", - "You canceled adding a new credit card.": "Du kansellerte å legge til et nytt kredittkort.", "Yes, remove my card": "Ja, fjern kortet mitt", + "You canceled adding a new credit card.": "Du kansellerte å legge til et nytt kredittkort.", "You have no previous stays.": "Du har ingen tidligere opphold.", "You have no upcoming stays.": "Du har ingen kommende opphold.", "Your card was successfully removed!": "Kortet ditt ble fjernet!", "Your card was successfully saved!": "Kortet ditt ble lagret!", "Your Challenges Conquer & Earn!": "Dine utfordringer Erobre og tjen!", + "Your current level": "Ditt nåværende nivå", "Your level": "Ditt nivå", - "Zip code": "Post kode", - "Room facilities": "Romfasiliteter", - "Hotel facilities": "Hotelfaciliteter", - "Hotel surroundings": "Hotellomgivelser", - "Show map": "Vis kart", - "Check in": "Sjekk inn", - "Check out": "Sjekk ut", - "Summary": "Sammendrag", - "Thank you": "Takk", - "We look forward to your visit!": "Vi ser frem til ditt besøk!", - "We have sent a detailed confirmation of your booking to your email:": "Vi har sendt en detaljert bekreftelse av din bestilling til din e-post:", - "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", - "Booking codes and vouchers": "Bestillingskoder og kuponger", - "Add code": "Legg til kode", - "Use bonus cheque": "Bruk bonussjekk", - "Book reward night": "Bestill belønningskveld", - "Find hotels": "Finn hotell" -} + "Your points to spend": "Dine brukbare poeng", + "Zip code": "Post kode" +} \ No newline at end of file diff --git a/i18n/dictionaries/sv.json b/i18n/dictionaries/sv.json index e4f7b307b..9fdf157d8 100644 --- a/i18n/dictionaries/sv.json +++ b/i18n/dictionaries/sv.json @@ -1,6 +1,7 @@ { "A photo of the room": "Ett foto av rummet", "Activities": "Aktiviteter", + "Add code": "Lägg till kod", "Add new card": "Lägg till nytt kort", "Address": "Adress", "All our beds are from Bliss, allowing you to adjust the firmness for your perfect comfort.": "Alla våra sängar är från Bliss, med möjlighet att justera fastheten för perfekt komfort.", @@ -8,18 +9,24 @@ "Already a friend?": "Är du redan en vän?", "Amenities": "Bekvämligheter", "An error occurred when adding a credit card, please try again later.": "Ett fel uppstod när ett kreditkort lades till, försök igen senare.", - "Are you sure you want to remove the card ending with": "Är du säker på att du vill ta bort kortet som slutar med", "An error occurred when trying to update profile.": "Ett fel uppstod när du försökte uppdatera profilen.", + "Are you sure you want to remove the card ending with": "Är du säker på att du vill ta bort kortet som slutar med", "Arrival date": "Ankomstdatum", "as of today": "från och med idag", "As our": "Som vår {level}", "As our Close Friend": "Som vår nära vän", + "At latest": "Senast", "At the hotel": "På hotellet", "Book": "Boka", + "Book reward night": "Boka frinatt", + "Booking codes and vouchers": "Bokningskoder och kuponger", "Booking number": "Bokningsnummer", "Breakfast": "Frukost", "by": "innan", "Cancel": "Avbryt", + "characters": "tecken", + "Check in": "Checka in", + "Check out": "Checka ut", "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", "Choose type of bed": "Välj typ av säng", @@ -35,28 +42,37 @@ "Country": "Land", "Country code": "Landskod", "Credit card deleted successfully": "Kreditkort har tagits bort", - "Your current level": "Din nuvarande nivå", "Current password": "Nuvarande lösenord", - "characters": "tecken", "Date of Birth": "Födelsedatum", "Day": "Dag", "Description": "Beskrivning", "Discard changes": "Ignorera ändringar", "Do you want to start the day with Scandics famous breakfast buffé?": "Vill du starta dagen med Scandics berömda frukostbuffé?", + "Download the Scandic app": "Ladda ner Scandic-appen", "Edit": "Redigera", "Edit profile": "Redigera profil", "Email": "E-post", - "Extras to your booking": "Extra tillval till din bokning", - "There are no transactions to display": "Det finns inga transaktioner att visa", "Explore all levels and benefits": "Utforska alla nivåer och fördelar", + "Extras to your booking": "Extra tillval till din bokning", "Failed to delete credit card, please try again later.": "Det gick inte att ta bort kreditkortet, försök igen senare.", "Find booking": "Hitta bokning", + "Find hotels": "Hitta hotell", "Flexibility": "Flexibilitet", "Former Scandic Hotel": "Tidigare Scandichotell", "From": "Från", "from your member profile?": "från din medlemsprofil?", "Get inspired": "Bli inspirerad", "Go back to overview": "Gå tillbaka till översikten", + "Highest level": "Högsta nivå", + "Hotel facilities": "Hotellfaciliteter", + "Hotel surroundings": "Hotellomgivning", + "hotelPages.rooms.roomCard.person": "person", + "hotelPages.rooms.roomCard.persons": "personer", + "How do you want to sleep?": "Hur vill du sova?", + "How it works": "Hur det fungerar", + "Join Scandic Friends": "Gå med i Scandic Friends", + "Language": "Språk", + "Level": "Nivå", "Level 1": "Nivå 1", "Level 2": "Nivå 2", "Level 3": "Nivå 3", @@ -64,19 +80,11 @@ "Level 5": "Nivå 5", "Level 6": "Nivå 6", "Level 7": "Nivå 7", - "Highest level": "Högsta nivå", - "How do you want to sleep?": "Hur vill du sova?", - "How it works": "Hur det fungerar", - "hotelPages.rooms.roomCard.person": "person", - "hotelPages.rooms.roomCard.persons": "personer", - "See room details": "Se rumsdetaljer", - "Join Scandic Friends": "Gå med i Scandic Friends", - "Language": "Språk", - "Level": "Nivå", "Level up to unlock": "Levla upp för att låsa upp", "Log in": "Logga in", "Log in here": "Logga in här", "Log out": "Logga ut", + "Manage preferences": "Hantera inställningar", "Meetings & Conferences": "Möten & Konferenser", "Members": "Medlemmar", "Membership cards": "Medlemskort", @@ -90,13 +98,13 @@ "New password": "Nytt lösenord", "Next": "Nästa", "next level:": "Nästa nivå:", - "No content published": "Inget innehåll publicerat", - "No, keep card": "Nej, behåll kortet", - "No transactions available": "Inga transaktioner tillgängliga", - "Not found": "Hittades inte", "night": "natt", "nights": "nätter", "Nights needed to level up": "Nätter som behövs för att gå upp i nivå", + "No content published": "Inget innehåll publicerat", + "No transactions available": "Inga transaktioner tillgängliga", + "No, keep card": "Nej, behåll kortet", + "Not found": "Hittades inte", "number": "nummer", "On your journey": "På din resa", "Open": "Öppna", @@ -114,80 +122,73 @@ "Points may take up to 10 days to be displayed.": "Det kan ta upp till 10 dagar innan poäng visas.", "Points needed to level up": "Poäng som behövs för att gå upp i nivå", "Points needed to stay on level": "Poäng som behövs för att hålla sig på nivå", - "spendable points expiring by": "{points} poäng förfaller {date}", "Previous victories": "Tidigare segrar", "Read more": "Läs mer", "Read more about the hotel": "Läs mer om hotellet", "Remove card from member profile": "Ta bort kortet från medlemsprofilen", "Restaurant & Bar": "Restaurang & Bar", "Retype new password": "Upprepa nytt lösenord", + "Room facilities": "Rumfaciliteter", "Rooms": "Rum", + "Rooms & Guests": "Rum och gäster", "Save": "Spara", "Scandic Friends Mastercard": "Scandic Friends Mastercard", "Scandic Friends Point Shop": "Scandic Friends Point Shop", + "See room details": "Se rumsdetaljer", "Select a country": "Välj ett land", "Select country of residence": "Välj bosättningsland", "Select date of birth": "Välj födelsedatum", "Select language": "Välj språk", - "Show less": "Visa mindre", - "Show more": "Visa mer", "Show all amenities": "Visa alla bekvämligheter", - "Skip to main content": "Fortsätt till huvudinnehåll", + "Show less": "Visa mindre", + "Show map": "Visa karta", + "Show more": "Visa mer", "Sign up bonus": "Välkomstbonus", - "Something went wrong!": "Något gick fel!", + "Skip to main content": "Fortsätt till huvudinnehåll", "Something went wrong and we couldn't add your card. Please try again later.": "Något gick fel och vi kunde inte lägga till ditt kort. Försök igen senare.", "Something went wrong and we couldn't remove your card. Please try again later.": "Något gick fel och vi kunde inte ta bort ditt kort. Försök igen senare.", + "Something went wrong!": "Något gick fel!", + "special character": "speciell karaktär", + "spendable points expiring by": "{points} poäng förfaller {date}", "Street": "Gata", "Successfully updated profile!": "Profilen har uppdaterats framgångsrikt!", - "special character": "speciell karaktär", + "Summary": "Sammanfattning", + "Tell us what information and updates you'd like to receive, and how, by clicking the link below.": "Berätta för oss vilken information och vilka uppdateringar du vill få och hur genom att klicka på länken nedan.", + "Thank you": "Tack", + "There are no transactions to display": "Det finns inga transaktioner att visa", + "to": "till", "Total Points": "Poäng totalt", - "Your points to spend": "Poäng att använda", - "Transaction date": "Transaktionsdatum", "Transactions": "Transaktioner", "Tripadvisor reviews": "{rating} ({count} recensioner på Tripadvisor)", - "to": "till", "TUI Points": "TUI Points", - "User information": "Användar information", + "Type of bed": "Sängtyp", + "Type of room": "Rumstyp", "uppercase letter": "stor bokstav", + "Use bonus cheque": "Use bonus cheque", + "User information": "Användar information", + "View your booking": "Visa din bokning", "Visiting address": "Besöksadress", "We could not add a card right now, please try again later.": "Vi kunde inte lägga till ett kort just nu, vänligen försök igen senare.", + "We have sent a detailed confirmation of your booking to your email:": "Vi har skickat en detaljerad bekräftelse av din bokning till din e-post:", + "We look forward to your visit!": "Vi ser fram emot ditt besök!", + "Weekdays": "Vardagar", + "Weekends": "Helger", "Welcome": "Välkommen", "Wellness & Exercise": "Hälsa & Träning", + "When": "När", "Where should you go next?": "Låter inte en spontanweekend härligt?", + "Where to": "Vart", "Which room class suits you the best?": "Vilken rumsklass passar dig bäst?", "Year": "År", - "You canceled adding a new credit card.": "Du avbröt att lägga till ett nytt kreditkort.", "Yes, remove my card": "Ja, ta bort mitt kort", + "You canceled adding a new credit card.": "Du avbröt att lägga till ett nytt kreditkort.", "You have no previous stays.": "Du har inga tidigare vistelser.", "You have no upcoming stays.": "Du har inga planerade resor.", "Your card was successfully removed!": "Ditt kort har tagits bort!", "Your card was successfully saved!": "Ditt kort har sparats!", "Your Challenges Conquer & Earn!": "Dina utmaningar Erövra och tjäna!", + "Your current level": "Din nuvarande nivå", "Your level": "Din nivå", - "Zip code": "Postnummer", - "Room facilities": "Rumfaciliteter", - "Hotel facilities": "Hotellfaciliteter", - "Hotel surroundings": "Hotellomgivning", - "Show map": "Visa karta", - "Check in": "Checka in", - "Check out": "Checka ut", - "Summary": "Sammanfattning", - "Thank you": "Tack", - "We look forward to your visit!": "Vi ser fram emot ditt besök!", - "We have sent a detailed confirmation of your booking to your email:": "Vi har skickat en detaljerad bekräftelse av din bokning till din e-post:", - "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", - "Booking codes and vouchers": "Bokningskoder och kuponger", - "Add code": "Add code", - "Use bonus cheque": "Use bonus cheque", - "Book reward night": "Book reward night", - "Find hotels": "Hitta hotell" -} + "Your points to spend": "Dina spenderbara poäng", + "Zip code": "Postnummer" +} \ No newline at end of file diff --git a/lib/graphql/Fragments/LoyaltyPage/MetaData.graphql b/lib/graphql/Fragments/LoyaltyPage/MetaData.graphql deleted file mode 100644 index a169b5182..000000000 --- a/lib/graphql/Fragments/LoyaltyPage/MetaData.graphql +++ /dev/null @@ -1,20 +0,0 @@ -#import "../Image.graphql" - -fragment LoyaltyPageMetaData on LoyaltyPage { - web { - seo_metadata { - title - description - imageConnection { - edges { - node { - ...Image - } - } - } - } - breadcrumbs { - title - } - } -} diff --git a/lib/graphql/Fragments/MyPages/MetaData.graphql b/lib/graphql/Fragments/MyPages/MetaData.graphql deleted file mode 100644 index 644594401..000000000 --- a/lib/graphql/Fragments/MyPages/MetaData.graphql +++ /dev/null @@ -1,20 +0,0 @@ -#import "../Image.graphql" - -fragment MyPagesMetaData on AccountPage { - web { - seo_metadata { - title - description - imageConnection { - edges { - node { - ...Image - } - } - } - } - breadcrumbs { - title - } - } -} diff --git a/lib/graphql/Query/MetaDataLoyaltyPage.graphql b/lib/graphql/Query/MetaDataLoyaltyPage.graphql index 9b6ba5d77..01ea5f768 100644 --- a/lib/graphql/Query/MetaDataLoyaltyPage.graphql +++ b/lib/graphql/Query/MetaDataLoyaltyPage.graphql @@ -1,11 +1,24 @@ -#import "../Fragments/LoyaltyPage/MetaData.graphql" +#import "../Fragments/Image.graphql" -query GetLoyaltyPageMetaData($locale: String!, $url: String!) { - all_loyalty_page(locale: $locale, where: { url: $url }) { - items { - ...LoyaltyPageMetaData - system { - uid +query GetLoyaltyPageMetaData($locale: String!, $uid: String!) { + loyalty_page(locale: $locale, uid: $uid) { + system { + uid + } + web { + seo_metadata { + description + title + imageConnection { + edges { + node { + ...Image + } + } + } + } + breadcrumbs { + title } } } diff --git a/lib/graphql/Query/MetaDataMyPages.graphql b/lib/graphql/Query/MetaDataMyPages.graphql index 14e255f02..c30d086f5 100644 --- a/lib/graphql/Query/MetaDataMyPages.graphql +++ b/lib/graphql/Query/MetaDataMyPages.graphql @@ -1,11 +1,24 @@ -#import "../Fragments/MyPages/MetaData.graphql" +#import "../Fragments/Image.graphql" -query GetMyPagesMetaData($locale: String!, $url: String!) { - all_account_page(locale: $locale, where: { url: $url }) { - items { - ...MyPagesMetaData - system { - uid +query GetMyPagesMetaData($locale: String!, $uid: String!) { + account_page(locale: $locale, uid: $uid) { + system { + uid + } + web { + breadcrumbs { + title + } + seo_metadata { + description + title + imageConnection { + edges { + node { + ...Image + } + } + } } } } diff --git a/lib/graphql/_request.ts b/lib/graphql/_request.ts index 5df74dce6..174202e70 100644 --- a/lib/graphql/_request.ts +++ b/lib/graphql/_request.ts @@ -12,11 +12,17 @@ export async function request( client: GraphQLClient, query: string | DocumentNode, variables?: {}, - next?: NextFetchRequestConfig + params?: RequestInit ): Promise> { try { - if (next) { - client.requestConfig.next = next + if (params?.cache) { + client.requestConfig.cache = params.cache + } + if (params?.headers) { + client.requestConfig.headers = params.headers + } + if (params?.next) { + client.requestConfig.next = params.next } if (env.PRINT_QUERY) { diff --git a/lib/graphql/batchRequest.ts b/lib/graphql/batchRequest.ts index d254677d8..4cbd0ee65 100644 --- a/lib/graphql/batchRequest.ts +++ b/lib/graphql/batchRequest.ts @@ -7,12 +7,12 @@ import type { BatchRequestDocument } from "graphql-request" import type { Data } from "@/types/request" export async function batchRequest( - queries: (BatchRequestDocument & NextFetchRequestConfig)[] + queries: (BatchRequestDocument & { options?: RequestInit })[] ): Promise> { try { const response = await Promise.allSettled( queries.map((query) => - request(query.document, query.variables, { tags: query.tags }) + request(query.document, query.variables, query.options) ) ) diff --git a/lib/graphql/edgeRequest.ts b/lib/graphql/edgeRequest.ts index c1e3f53f3..2f4d42f78 100644 --- a/lib/graphql/edgeRequest.ts +++ b/lib/graphql/edgeRequest.ts @@ -14,7 +14,7 @@ const client = new GraphQLClient(env.CMS_URL, { export async function edgeRequest( query: string | DocumentNode, variables?: {}, - next?: NextFetchRequestConfig + params?: RequestInit ): Promise> { - return _request(client, query, variables, next) + return _request(client, query, variables, params) } diff --git a/lib/graphql/request.ts b/lib/graphql/request.ts index a4d6296b0..1b7f8fa18 100644 --- a/lib/graphql/request.ts +++ b/lib/graphql/request.ts @@ -14,20 +14,20 @@ const client = new GraphQLClient(env.CMS_URL, { url: URL | RequestInfo, params: RequestInit | undefined ) { - const fetch = fetchRetry(global.fetch, { + const wrappedFetch = fetchRetry(global.fetch, { retries: 3, retryDelay: function (attempt, error, response) { return Math.pow(2, attempt) * 150 // 150, 300, 600 }, }) - return fetch(url, params) + return wrappedFetch(url, params) }), }) export async function request( query: string | DocumentNode, variables?: {}, - next?: NextFetchRequestConfig + params?: RequestInit ): Promise> { - return _request(client, query, variables, next) + return _request(client, query, variables, params) } diff --git a/middlewares/bookingFlow.ts b/middlewares/bookingFlow.ts index 79d9f0737..691d9b869 100644 --- a/middlewares/bookingFlow.ts +++ b/middlewares/bookingFlow.ts @@ -4,12 +4,19 @@ import { hotelReservation } from "@/constants/routes/hotelReservation" import { findLang } from "@/utils/languages" +import { getDefaultRequestHeaders } from "./utils" + import type { NextMiddleware } from "next/server" import type { MiddlewareMatcher } from "@/types/middleware" -export const middleware: NextMiddleware = () => { - return NextResponse.next() +export const middleware: NextMiddleware = (request) => { + const headers = getDefaultRequestHeaders(request) + return NextResponse.next({ + request: { + headers, + }, + }) } export const matcher: MiddlewareMatcher = (request) => { diff --git a/server/routers/contentstack/accountPage/query.ts b/server/routers/contentstack/accountPage/query.ts index 424092343..141bd20cb 100644 --- a/server/routers/contentstack/accountPage/query.ts +++ b/server/routers/contentstack/accountPage/query.ts @@ -71,7 +71,10 @@ export const accountPageQueryRouter = router({ uid, }, { - tags: [generateRefsResponseTag(lang, uid)], + cache: "force-cache", + next: { + tags: [generateRefsResponseTag(lang, uid)], + }, } ) @@ -132,7 +135,12 @@ export const accountPageQueryRouter = router({ locale: lang, uid, }, - { tags } + { + cache: "force-cache", + next: { + tags, + }, + } ) if (!response.data) { diff --git a/server/routers/contentstack/base/query.ts b/server/routers/contentstack/base/query.ts index d534279ff..12b1fa6d6 100644 --- a/server/routers/contentstack/base/query.ts +++ b/server/routers/contentstack/base/query.ts @@ -13,7 +13,11 @@ import { request } from "@/lib/graphql/request" import { notFound } from "@/server/errors/trpc" import { contentstackBaseProcedure, router } from "@/server/trpc" -import { generateTag } from "@/utils/generateTag" +import { + generateRefsResponseTag, + generateRefTag, + generateTag, +} from "@/utils/generateTag" import { langInput } from "./input" import { @@ -82,9 +86,18 @@ export const baseQueryRouter = router({ "contentstack.contactConfig start", JSON.stringify({ query: { lang } }) ) - const response = await request(GetContactConfig, { - locale: lang, - }) + const response = await request( + GetContactConfig, + { + locale: lang, + }, + { + cache: "force-cache", + next: { + tags: [`${lang}:contact`], + }, + } + ) if (!response.data) { const notFoundError = notFound(response) @@ -137,9 +150,18 @@ export const baseQueryRouter = router({ "contentstack.header.ref start", JSON.stringify({ query: { lang: input.lang } }) ) - const responseRef = await request(GetCurrentHeaderRef, { - locale: input.lang, - }) + const responseRef = await request( + GetCurrentHeaderRef, + { + locale: input.lang, + }, + { + cache: "force-cache", + next: { + tags: [generateRefsResponseTag(input.lang, "current_header")], + }, + } + ) getHeaderCounter.add(1, { lang: input.lang }) console.info( "contentstack.header start", @@ -148,17 +170,17 @@ export const baseQueryRouter = router({ }) ) + const currentHeaderUID = + responseRef.data.all_current_header.items[0].system.uid // There's currently no error handling/validation for the responseRef, should it be added? const response = await request( GetCurrentHeader, { locale: input.lang }, { - tags: [ - generateTag( - input.lang, - responseRef.data.all_current_header.items[0].system.uid - ), - ], + cache: "force-cache", + next: { + tags: [generateTag(input.lang, currentHeaderUID)], + }, } ) @@ -226,9 +248,18 @@ export const baseQueryRouter = router({ "contentstack.footer.ref start", JSON.stringify({ query: { lang: input.lang } }) ) - const responseRef = await request(GetCurrentFooterRef, { - locale: input.lang, - }) + const responseRef = await request( + GetCurrentFooterRef, + { + locale: input.lang, + }, + { + cache: "force-cache", + next: { + tags: [generateRefsResponseTag(input.lang, "current_footer")], + }, + } + ) // There's currently no error handling/validation for the responseRef, should it be added? getFooterCounter.add(1, { lang: input.lang }) console.info( @@ -239,18 +270,18 @@ export const baseQueryRouter = router({ }, }) ) + const currentFooterUID = + responseRef.data.all_current_footer.items[0].system.uid const response = await request( GetCurrentFooter, { locale: input.lang, }, { - tags: [ - generateTag( - input.lang, - responseRef.data.all_current_footer.items[0].system.uid - ), - ], + cache: "force-cache", + next: { + tags: [generateTag(input.lang, currentFooterUID)], + }, } ) diff --git a/server/routers/contentstack/breadcrumbs/utils.ts b/server/routers/contentstack/breadcrumbs/utils.ts index 6a3cc6d04..d16c79049 100644 --- a/server/routers/contentstack/breadcrumbs/utils.ts +++ b/server/routers/contentstack/breadcrumbs/utils.ts @@ -68,7 +68,10 @@ export type Variables = { export async function getRefsResponse(query: string, variables: Variables) { const refsResponse = await request(query, variables, { - tags: [generateRefsResponseTag(variables.locale, variables.url, affix)], + cache: "force-cache", + next: { + tags: [generateRefsResponseTag(variables.locale, variables.url, affix)], + }, }) if (!refsResponse.data) { throw notFound(refsResponse) @@ -89,7 +92,10 @@ export async function getResponse( variables: Variables, tags: string[] ) { - const response = await request(query, variables, { tags }) + const response = await request(query, variables, { + cache: "force-cache", + next: { tags }, + }) if (!response.data) { throw notFound(response) } diff --git a/server/routers/contentstack/contentPage/query.ts b/server/routers/contentstack/contentPage/query.ts index 4cb632785..73de1479e 100644 --- a/server/routers/contentstack/contentPage/query.ts +++ b/server/routers/contentstack/contentPage/query.ts @@ -31,7 +31,12 @@ export const contentPageQueryRouter = router({ locale: lang, uid, }, - { tags: [generateTag(lang, uid)] } + { + cache: "force-cache", + next: { + tags: [generateTag(lang, uid)], + }, + } ) if (!response.data) { diff --git a/server/routers/contentstack/hotelPage/query.ts b/server/routers/contentstack/hotelPage/query.ts index fe4e4eea1..6be9e7306 100644 --- a/server/routers/contentstack/hotelPage/query.ts +++ b/server/routers/contentstack/hotelPage/query.ts @@ -3,7 +3,9 @@ import { metrics } from "@opentelemetry/api" import { GetHotelPage } from "@/lib/graphql/Query/HotelPage.graphql" import { request } from "@/lib/graphql/request" import { notFound } from "@/server/errors/trpc" -import { contentstackBaseProcedure, router } from "@/server/trpc" +import { contentstackExtendedProcedureUID, router } from "@/server/trpc" + +import { generateTag } from "@/utils/generateTag" import { HotelPage, HotelPageDataRaw, validateHotelPageSchema } from "./output" @@ -20,7 +22,7 @@ const getHotelPageFailCounter = meter.createCounter( ) export const hotelPageQueryRouter = router({ - get: contentstackBaseProcedure.query(async ({ ctx }) => { + get: contentstackExtendedProcedureUID.query(async ({ ctx }) => { const { lang, uid } = ctx getHotelPageCounter.add(1, { lang, uid: `${uid}` }) console.info( @@ -29,10 +31,19 @@ export const hotelPageQueryRouter = router({ query: { lang, uid }, }) ) - const response = await request(GetHotelPage, { - locale: lang, - uid, - }) + const response = await request( + GetHotelPage, + { + locale: lang, + uid, + }, + { + cache: "force-cache", + next: { + tags: [generateTag(lang, uid)], + }, + } + ) if (!response.data) { const notFoundError = notFound(response) getHotelPageFailCounter.add(1, { diff --git a/server/routers/contentstack/languageSwitcher/query.ts b/server/routers/contentstack/languageSwitcher/query.ts index c654e8e5a..e51219184 100644 --- a/server/routers/contentstack/languageSwitcher/query.ts +++ b/server/routers/contentstack/languageSwitcher/query.ts @@ -71,12 +71,22 @@ async function getLanguageSwitcher(options: LanguageSwitcherVariables) { { document: GetDaDeEnUrlsAccountPage, variables, - tags: tagsDaDeEn, + options: { + cache: "force-cache", + next: { + tags: tagsDaDeEn, + }, + }, }, { document: GetFiNoSvUrlsAccountPage, variables, - tags: tagsFiNoSv, + options: { + cache: "force-cache", + next: { + tags: tagsFiNoSv, + }, + }, }, ]) case PageTypeEnum.currentBlocksPage: @@ -84,12 +94,22 @@ async function getLanguageSwitcher(options: LanguageSwitcherVariables) { { document: GetDaDeEnUrlsCurrentBlocksPage, variables, - tags: tagsDaDeEn, + options: { + cache: "force-cache", + next: { + tags: tagsDaDeEn, + }, + }, }, { document: GetFiNoSvUrlsCurrentBlocksPage, variables, - tags: tagsFiNoSv, + options: { + cache: "force-cache", + next: { + tags: tagsFiNoSv, + }, + }, }, ]) case PageTypeEnum.loyaltyPage: @@ -97,12 +117,22 @@ async function getLanguageSwitcher(options: LanguageSwitcherVariables) { { document: GetDaDeEnUrlsLoyaltyPage, variables, - tags: tagsDaDeEn, + options: { + cache: "force-cache", + next: { + tags: tagsDaDeEn, + }, + }, }, { document: GetFiNoSvUrlsLoyaltyPage, variables, - tags: tagsFiNoSv, + options: { + cache: "force-cache", + next: { + tags: tagsFiNoSv, + }, + }, }, ]) case PageTypeEnum.hotelPage: @@ -110,12 +140,22 @@ async function getLanguageSwitcher(options: LanguageSwitcherVariables) { { document: GetDaDeEnUrlsHotelPage, variables, - tags: tagsDaDeEn, + options: { + cache: "force-cache", + next: { + tags: tagsDaDeEn, + }, + }, }, { document: GetFiNoSvUrlsHotelPage, variables, - tags: tagsFiNoSv, + options: { + cache: "force-cache", + next: { + tags: tagsFiNoSv, + }, + }, }, ]) case PageTypeEnum.contentPage: @@ -123,12 +163,22 @@ async function getLanguageSwitcher(options: LanguageSwitcherVariables) { { document: GetDaDeEnUrlsContentPage, variables, - tags: tagsDaDeEn, + options: { + cache: "force-cache", + next: { + tags: tagsDaDeEn, + }, + }, }, { document: GetFiNoSvUrlsContentPage, variables, - tags: tagsFiNoSv, + options: { + cache: "force-cache", + next: { + tags: tagsFiNoSv, + }, + }, }, ]) diff --git a/server/routers/contentstack/loyaltyPage/query.ts b/server/routers/contentstack/loyaltyPage/query.ts index b4541815a..58e630939 100644 --- a/server/routers/contentstack/loyaltyPage/query.ts +++ b/server/routers/contentstack/loyaltyPage/query.ts @@ -73,7 +73,10 @@ export const loyaltyPageQueryRouter = router({ uid, }, { - tags: [generateRefsResponseTag(lang, uid)], + cache: "force-cache", + next: { + tags: [generateRefsResponseTag(lang, uid)], + }, } ) @@ -146,7 +149,12 @@ export const loyaltyPageQueryRouter = router({ locale: lang, uid, }, - { tags } + { + cache: "force-cache", + next: { + tags, + }, + } ) if (!response.data) { diff --git a/server/routers/contentstack/metadata/output.ts b/server/routers/contentstack/metadata/output.ts index 12024b3c6..f5fc9a945 100644 --- a/server/routers/contentstack/metadata/output.ts +++ b/server/routers/contentstack/metadata/output.ts @@ -45,12 +45,8 @@ const page = z.object({ export type Page = z.infer -const metaDataItems = z.object({ - items: z.array(page), -}) - export const validateMyPagesMetaDataContentstackSchema = z.object({ - all_account_page: metaDataItems, + account_page: page, }) export type GetMyPagesMetaDataData = z.infer< @@ -58,7 +54,7 @@ export type GetMyPagesMetaDataData = z.infer< > export const validateLoyaltyPageMetaDataContentstackSchema = z.object({ - all_loyalty_page: metaDataItems, + loyalty_page: page, }) export type GetLoyaltyPageMetaDataData = z.infer< diff --git a/server/routers/contentstack/metadata/query.ts b/server/routers/contentstack/metadata/query.ts index 7d7cef257..ad4523a19 100644 --- a/server/routers/contentstack/metadata/query.ts +++ b/server/routers/contentstack/metadata/query.ts @@ -1,6 +1,6 @@ import { GetLoyaltyPageMetaData } from "@/lib/graphql/Query/MetaDataLoyaltyPage.graphql" import { GetMyPagesMetaData } from "@/lib/graphql/Query/MetaDataMyPages.graphql" -import { contentstackBaseProcedure, router } from "@/server/trpc" +import { contentstackExtendedProcedureUID, router } from "@/server/trpc" import { type GetLoyaltyPageMetaDataData, @@ -8,7 +8,7 @@ import { validateLoyaltyPageMetaDataContentstackSchema, validateMyPagesMetaDataContentstackSchema, } from "./output" -import { getMetaData, getResponse, Variables } from "./utils" +import { getMetaData, getResponse, type Variables } from "./utils" import { PageTypeEnum } from "@/types/requests/pageType" @@ -23,13 +23,13 @@ async function getLoyaltyPageMetaData(variables: Variables) { if (!validatedMetaDataData.success) { console.error( - `Failed to validate Loyaltypage MetaData Data - (url: ${variables.url})` + `Failed to validate Loyaltypage MetaData Data - (uid: ${variables.uid})` ) console.error(validatedMetaDataData.error) return null } - return getMetaData(validatedMetaDataData.data.all_loyalty_page.items[0]) + return getMetaData(validatedMetaDataData.data.loyalty_page) } async function getMyPagesMetaData(variables: Variables) { @@ -43,24 +43,20 @@ async function getMyPagesMetaData(variables: Variables) { if (!validatedMetaDataData.success) { console.error( - `Failed to validate My Page MetaData Data - (url: ${variables.url})` + `Failed to validate My Page MetaData Data - (uid: ${variables.uid})` ) console.error(validatedMetaDataData.error) return null } - return getMetaData(validatedMetaDataData.data.all_account_page.items[0]) + return getMetaData(validatedMetaDataData.data.account_page) } export const metaDataQueryRouter = router({ - get: contentstackBaseProcedure.query(async ({ ctx }) => { - if (!ctx.uid) { - return [] - } - + get: contentstackExtendedProcedureUID.query(async ({ ctx }) => { const variables = { locale: ctx.lang, - url: ctx.pathname, + uid: ctx.uid, } switch (ctx.contentType) { @@ -69,7 +65,7 @@ export const metaDataQueryRouter = router({ case PageTypeEnum.loyaltyPage: return await getLoyaltyPageMetaData(variables) default: - return [] + return null } }), }) diff --git a/server/routers/contentstack/metadata/utils.ts b/server/routers/contentstack/metadata/utils.ts index 661c2b89d..a575e55e1 100644 --- a/server/routers/contentstack/metadata/utils.ts +++ b/server/routers/contentstack/metadata/utils.ts @@ -2,15 +2,22 @@ import { Lang } from "@/constants/languages" import { request } from "@/lib/graphql/request" import { internalServerError, notFound } from "@/server/errors/trpc" +import { generateTag } from "@/utils/generateTag" + import { getMetaDataSchema, Page } from "./output" export type Variables = { locale: Lang - url: string + uid: string } export async function getResponse(query: string, variables: Variables) { - const response = await request(query, variables) + const response = await request(query, variables, { + cache: "force-cache", + next: { + tags: [generateTag(variables.locale, variables.uid)], + }, + }) if (!response.data) { throw notFound(response) } diff --git a/server/routers/contentstack/myPages/navigation/query.ts b/server/routers/contentstack/myPages/navigation/query.ts index 0328a3719..c47f6ac5f 100644 --- a/server/routers/contentstack/myPages/navigation/query.ts +++ b/server/routers/contentstack/myPages/navigation/query.ts @@ -13,19 +13,15 @@ import { generateTag, generateTags, } from "@/utils/generateTag" -import { removeMultipleSlashes } from "@/utils/url" import { type GetNavigationMyPagesData, type GetNavigationMyPagesRefsData, getNavigationSchema, - type MenuItems, navigationPayloadSchema, navigationRefsPayloadSchema, } from "./output" -import { getConnections } from "./utils" - -import { PageLinkEnum } from "@/types/requests/pageLinks" +import { getConnections, mapMenuItems } from "./utils" const meter = metrics.getMeter("trpc.navigationMyPages") const getNavigationMyPagesRefsCounter = meter.createCounter( @@ -47,39 +43,6 @@ const getNavigationMyPagesFailCounter = meter.createCounter( "trpc.contentstack.navigationMyPages.get-fail" ) -export function mapMenuItems(menuItems: MenuItems) { - return menuItems.map((menuItem) => { - return { - ...menuItem, - links: menuItem.links - .filter((link) => { - // If content is unpublished or in other way inaccessible in Contentstack - // there will be no edges, filter out those links. - return !!link.page.edges[0] - }) - .map((link) => { - const page = link.page.edges[0].node - let originalUrl = undefined - if ( - page.__typename === PageLinkEnum.ContentPage || - page.__typename === PageLinkEnum.LoyaltyPage - ) { - if (page.web.original_url) { - originalUrl = page.web.original_url - } - } - return { - lang: page.system.locale, - linkText: link.link_text ? link.link_text : page.title, - uid: page.system.uid, - url: removeMultipleSlashes(`/${page.system.locale}/${page.url}`), - originalUrl, - } - }), - } - }) -} - export const navigationQueryRouter = router({ get: contentstackBaseProcedure.query(async function ({ ctx }) { const { lang } = ctx @@ -92,7 +55,10 @@ export const navigationQueryRouter = router({ GetNavigationMyPagesRefs, { locale: lang }, { - tags: [generateRefsResponseTag(lang, "navigation_my_pages")], + cache: "force-cache", + next: { + tags: [generateRefsResponseTag(lang, "navigation_my_pages")], + }, } ) @@ -157,7 +123,10 @@ export const navigationQueryRouter = router({ const response = await request( GetNavigationMyPages, { locale: lang }, - { tags } + { + cache: "force-cache", + next: { tags }, + } ) if (!response.data) { diff --git a/server/routers/contentstack/myPages/navigation/utils.ts b/server/routers/contentstack/myPages/navigation/utils.ts index 40d140f35..3a3083c85 100644 --- a/server/routers/contentstack/myPages/navigation/utils.ts +++ b/server/routers/contentstack/myPages/navigation/utils.ts @@ -1,6 +1,9 @@ +import { removeMultipleSlashes } from "@/utils/url" + +import { PageLinkEnum } from "@/types/requests/pageLinks" import type { Edges } from "@/types/requests/utils/edges" import type { NodeRefs } from "@/types/requests/utils/refs" -import type { GetNavigationMyPagesRefsData } from "./output" +import type { GetNavigationMyPagesRefsData, MenuItems } from "./output" export function getConnections(refs: GetNavigationMyPagesRefsData) { const connections: Edges[] = [] @@ -14,3 +17,36 @@ export function getConnections(refs: GetNavigationMyPagesRefsData) { return connections } + +export function mapMenuItems(menuItems: MenuItems) { + return menuItems.map((menuItem) => { + return { + ...menuItem, + links: menuItem.links + .filter((link) => { + // If content is unpublished or in other way inaccessible in Contentstack + // there will be no edges, filter out those links. + return !!link.page.edges[0] + }) + .map((link) => { + const page = link.page.edges[0].node + let originalUrl = undefined + if ( + page.__typename === PageLinkEnum.ContentPage || + page.__typename === PageLinkEnum.LoyaltyPage + ) { + if (page.web.original_url) { + originalUrl = page.web.original_url + } + } + return { + lang: page.system.locale, + linkText: link.link_text ? link.link_text : page.title, + uid: page.system.uid, + url: removeMultipleSlashes(`/${page.system.locale}/${page.url}`), + originalUrl, + } + }), + } + }) +} diff --git a/server/routers/hotels/query.ts b/server/routers/hotels/query.ts index 7398b4c08..404af8510 100644 --- a/server/routers/hotels/query.ts +++ b/server/routers/hotels/query.ts @@ -25,7 +25,7 @@ const getHotelSuccessCounter = meter.createCounter("trpc.hotel.get-success") const getHotelFailCounter = meter.createCounter("trpc.hotel.get-fail") export const hotelQueryRouter = router({ - getHotel: serviceProcedure + get: serviceProcedure .input(getHotelInputSchema) .query(async ({ ctx, input }) => { const { hotelId, language, include } = input @@ -152,62 +152,69 @@ export const hotelQueryRouter = router({ roomCategories: roomCategories, } }), - getRates: publicProcedure - .input(getRatesInputSchema) - .query(async ({ input, ctx }) => { - // TODO: Do a real API call when the endpoint is ready - // const { hotelId } = input + rates: router({ + get: publicProcedure + .input(getRatesInputSchema) + .query(async ({ input, ctx }) => { + // TODO: Do a real API call when the endpoint is ready + // const { hotelId } = input - // const params = new URLSearchParams() - // const apiLang = toApiLang(language) - // params.set("hotelId", hotelId.toString()) - // params.set("language", apiLang) + // const params = new URLSearchParams() + // const apiLang = toApiLang(language) + // params.set("hotelId", hotelId.toString()) + // params.set("language", apiLang) - console.info("api.hotels.rates start", JSON.stringify({})) - const validatedHotelData = getRatesSchema.safeParse(tempRatesData) + console.info("api.hotels.rates start", JSON.stringify({})) + const validatedHotelData = getRatesSchema.safeParse(tempRatesData) - if (!tempRatesData) { - console.error("api.hotels.rates error", JSON.stringify({ error: null })) - //Can't return null here since consuming component does not handle null yet - // return null - } - if (!validatedHotelData.success) { - console.error( - "api.hotels.rates validation error", - JSON.stringify({ - error: validatedHotelData.error, - }) - ) - throw badRequestError() - } - console.info("api.hotels.rates success", JSON.stringify({})) - return validatedHotelData.data - }), - getFilters: publicProcedure - .input(getFiltersInputSchema) - .query(async ({ input, ctx }) => { - console.info("api.hotels.filters start", JSON.stringify({})) + if (!tempRatesData) { + console.error( + "api.hotels.rates error", + JSON.stringify({ error: null }) + ) + //Can't return null here since consuming component does not handle null yet + // return null + } + if (!validatedHotelData.success) { + console.error( + "api.hotels.rates validation error", + JSON.stringify({ + error: validatedHotelData.error, + }) + ) + throw badRequestError() + } + console.info("api.hotels.rates success", JSON.stringify({})) + return validatedHotelData.data + }), + }), + filters: router({ + get: publicProcedure + .input(getFiltersInputSchema) + .query(async ({ input, ctx }) => { + console.info("api.hotels.filters start", JSON.stringify({})) - if (!tempFilterData) { - console.error( - "api.hotels.filters error", - JSON.stringify({ error: null }) - ) - //Can't return null here since consuming component does not handle null yet - // return null - } - const validateFilterData = getFiltersSchema.safeParse(tempFilterData) + if (!tempFilterData) { + console.error( + "api.hotels.filters error", + JSON.stringify({ error: null }) + ) + //Can't return null here since consuming component does not handle null yet + // return null + } + const validateFilterData = getFiltersSchema.safeParse(tempFilterData) - if (!validateFilterData.success) { - console.error( - "api.hotels.filters validation error", - JSON.stringify({ - error: validateFilterData.error, - }) - ) - throw badRequestError() - } - console.info("api.hotels.rates success", JSON.stringify({})) - return validateFilterData.data - }), + if (!validateFilterData.success) { + console.error( + "api.hotels.filters validation error", + JSON.stringify({ + error: validateFilterData.error, + }) + ) + throw badRequestError() + } + console.info("api.hotels.rates success", JSON.stringify({})) + return validateFilterData.data + }), + }), }) diff --git a/utils/entry.ts b/utils/entry.ts index c66f42e0e..cc38dc4fd 100644 --- a/utils/entry.ts +++ b/utils/entry.ts @@ -13,7 +13,9 @@ export async function resolve(url: string, lang = Lang.en) { url, }, { - revalidate: 3600, + next: { + revalidate: 3600, + }, } ) diff --git a/utils/generateMetadata.ts b/utils/generateMetadata.ts index 547c5ccd6..ba56b33c9 100644 --- a/utils/generateMetadata.ts +++ b/utils/generateMetadata.ts @@ -1,14 +1,9 @@ -import { Metadata } from "next" - import { serverClient } from "@/lib/trpc/server" -import { MetaData } from "@/types/components/metadata" +export async function generateMetadata() { + const metaData = await serverClient().contentstack.metaData.get() -export async function generateMetadata(): Promise { - const metaData: MetaData | never[] | null = - await serverClient().contentstack.metaData.get() - - if (Array.isArray(metaData)) { + if (!metaData) { return { title: "", description: "",