Merged in feat/lokalise-rebuild (pull request #2993)

Feat/lokalise rebuild

* chore(lokalise): update translation ids

* chore(lokalise): easier to switch between projects

* chore(lokalise): update translation ids

* .

* .

* .

* .

* .

* .

* chore(lokalise): update translation ids

* chore(lokalise): update translation ids

* .

* .

* .

* chore(lokalise): update translation ids

* chore(lokalise): update translation ids

* .

* .

* chore(lokalise): update translation ids

* chore(lokalise): update translation ids

* chore(lokalise): new translations

* merge

* switch to errors for missing id's

* merge

* sync translations


Approved-by: Linus Flood
This commit is contained in:
Joakim Jäderberg
2025-10-22 11:00:03 +00:00
parent bdfe2ab213
commit aafad9781f
499 changed files with 93363 additions and 99164 deletions

View File

@@ -25,6 +25,7 @@ export default function Error({
<strong>
{intl.formatMessage(
{
id: "myPages.breadcrumbsError",
defaultMessage: "Breadcrumbs failed for this page ({errorId})",
},
{

View File

@@ -25,6 +25,7 @@ export default function Error({
<strong>
{intl.formatMessage(
{
id: "myPages.errorLoadingPage",
defaultMessage: "Error loading this page ({errorId})",
},
{

View File

@@ -64,6 +64,7 @@ export default async function MyPages({}: PageArgs<
) : (
<p>
{intl.formatMessage({
id: "myPages.missingContent",
defaultMessage: "No content published",
})}
</p>

View File

@@ -28,6 +28,7 @@ export default function Error({
<strong>
{intl.formatMessage(
{
id: "destinationOverviewPage.errorOccurred",
defaultMessage: "An error occurred ({errorId})",
},
{

View File

@@ -38,6 +38,7 @@ export async function generateMetadata({
const title = intl.formatMessage(
{
id: "alternativeHotels.title",
defaultMessage: "Alternatives for {value}",
},
{

View File

@@ -40,6 +40,7 @@ export async function generateMetadata({
const title = intl.formatMessage(
{
id: "alternativeHotels.title",
defaultMessage: "Alternatives for {value}",
},
{

View File

@@ -17,6 +17,9 @@ export async function generateMetadata() {
const intl = await getIntl()
return {
title: intl.formatMessage({ defaultMessage: "Find booking" }),
title: intl.formatMessage({
id: "booking.findBooking",
defaultMessage: "Find booking",
}),
}
}

View File

@@ -63,6 +63,7 @@ export default function Error({
<section className={styles.layout}>
<div className={styles.content}>
{intl.formatMessage({
id: "errorMessage.somethingWentWrong",
defaultMessage: "Something went wrong!",
})}
{env.NEXT_PUBLIC_NODE_ENV === "development" && (

View File

@@ -47,6 +47,7 @@ export default function LinkEmploymentErrorPage() {
/>
<span className={styles.navBackText}>
{intl.formatMessage({
id: "common.goBack",
defaultMessage: "Go back",
})}
</span>
@@ -69,6 +70,7 @@ export default function LinkEmploymentErrorPage() {
<Typography variant="Title/Subtitle/md">
<h3>
{intl.formatMessage({
id: "linkEmploymentError.contactHeading",
defaultMessage: "Contact our member service",
})}
</h3>
@@ -102,9 +104,11 @@ export default function LinkEmploymentErrorPage() {
const getErrorContent = (error: string | null, intl: IntlShape) => {
const defaultErrorContent = {
heading: intl.formatMessage({
id: "linkEmploymentError.genericHeading",
defaultMessage: "Your account could not be connected",
}),
message: intl.formatMessage({
id: "linkEmploymentError.genericMessage",
defaultMessage:
"We couldn't connect your accounts. Please contact us and we'll help you resolve this.",
}),
@@ -114,9 +118,11 @@ const getErrorContent = (error: string | null, intl: IntlShape) => {
case "unable_to_verify_employee_id":
return {
heading: intl.formatMessage({
id: "linkEmploymentError.notEligibleHeading",
defaultMessage: "You're not eligible for employee benefits",
}),
message: intl.formatMessage({
id: "linkEmploymentError.notEligibleMessage",
defaultMessage:
"This may be because your employment has not yet started, has ended, or you are a consultant. If you believe this is an error, please contact us for assistance.",
}),
@@ -124,10 +130,12 @@ const getErrorContent = (error: string | null, intl: IntlShape) => {
case "employee_id_already_linked":
return {
heading: intl.formatMessage({
id: "linkEmploymentError.alreadyLinkedHeading",
defaultMessage:
"Employee number already linked to another Scandic Friends membership.",
}),
message: intl.formatMessage({
id: "linkEmploymentError.alreadyLinkedMessage",
defaultMessage:
"If you believe this is an error, please contact us for assistance.",
}),

View File

@@ -25,6 +25,7 @@ export function AlreadyLinkedError() {
<Typography variant="Title/Subtitle/lg">
<h1>
{intl.formatMessage({
id: "linkEuroBonusAccount.alreadyLinkedHeading",
defaultMessage:
"Your Scandic Friends and SAS EuroBonus accounts are already connected",
})}
@@ -33,6 +34,7 @@ export function AlreadyLinkedError() {
<Typography variant="Body/Paragraph/mdRegular">
<p>
{intl.formatMessage({
id: "linkEuroBonusAccount.alreadyLinkedMessage",
defaultMessage:
"Great news! You can go straight to My Pages to explore all your perks and rewards!",
})}
@@ -46,6 +48,7 @@ export function AlreadyLinkedError() {
size={"Large"}
>
{intl.formatMessage({
id: "linkEuroBonusAccount.viewLinkedAccountsButton",
defaultMessage: "View your linked accounts",
})}
</ButtonLink>

View File

@@ -26,6 +26,7 @@ export function DateOfBirthError() {
<Typography variant="Title/Subtitle/lg">
<h1>
{intl.formatMessage({
id: "linkEuroBonusAccount.dateOfBirthErrorHeading",
defaultMessage: "Date of birth not matching",
})}
</h1>
@@ -33,6 +34,7 @@ export function DateOfBirthError() {
<Typography variant="Body/Paragraph/mdRegular">
<p>
{intl.formatMessage({
id: "linkEuroBonusAccount.couldntConnectAccountsErrorMessage",
defaultMessage:
"We couldnt connect your accounts. Please contact us and well help you resolve this.",
})}
@@ -41,6 +43,7 @@ export function DateOfBirthError() {
<Button theme="base" asChild>
<Link href={profile[lang]}>
{intl.formatMessage({
id: "linkEuroBonusAccount.viewYourDetailsButton",
defaultMessage: "View your details",
})}
</Link>

View File

@@ -19,6 +19,7 @@ export function SASModalDivider() {
<Typography variant="Body/Paragraph/mdRegular">
<span>
{intl.formatMessage({
id: "common.or",
defaultMessage: "or",
})}
</span>
@@ -31,6 +32,7 @@ export function SASModalContactBlock() {
const intl = useIntl()
const phone = intl.formatMessage({
id: "linkEuroBonusAccount.contactPhoneNumber",
defaultMessage: "+46 8 517 517 00",
})
@@ -39,6 +41,7 @@ export function SASModalContactBlock() {
<Typography variant="Title/Subtitle/md">
<h4 className={styles.contactBlockTitle}>
{intl.formatMessage({
id: "common.contactUs",
defaultMessage: "Contact us",
})}
</h4>

View File

@@ -13,6 +13,7 @@ export function TooManyCodesError() {
return (
<GenericError
title={intl.formatMessage({
id: "linkEuroBonusAccount.tooManyCodesErrorHeading",
defaultMessage: "Youve requested too many codes",
})}
variant="info"
@@ -20,12 +21,14 @@ export function TooManyCodesError() {
<Typography variant="Body/Paragraph/mdRegular">
<p>
{intl.formatMessage({
id: "linkEuroBonusAccount.tooManyFailedAttemptsErrorMessage",
defaultMessage: "Please wait 1 hour before trying again.",
})}
</p>
</Typography>
<Button theme="base" disabled>
{intl.formatMessage({
id: "linkEuroBonusAccount.sendNewCodeButton",
defaultMessage: "Send new code",
})}
</Button>

View File

@@ -13,6 +13,7 @@ export function TooManyFailedAttemptsError() {
return (
<GenericError
title={intl.formatMessage({
id: "linkEuroBonusAccount.tooManyFailedAttemptsErrorHeading",
defaultMessage: "Too many failed attempts.",
})}
variant="info"
@@ -20,12 +21,14 @@ export function TooManyFailedAttemptsError() {
<Typography variant="Body/Paragraph/mdRegular">
<p>
{intl.formatMessage({
id: "linkEuroBonusAccount.tooManyFailedAttemptsErrorMessage",
defaultMessage: "Please wait 1 hour before trying again.",
})}
</p>
</Typography>
<Button theme="base" disabled>
{intl.formatMessage({
id: "linkEuroBonusAccount.sendNewCodeButton",
defaultMessage: "Send new code",
})}
</Button>

View File

@@ -13,12 +13,14 @@ export function UnlinkError() {
return (
<GenericError
title={intl.formatMessage({
id: "unlinkEuroBonusAccount.errorHeading",
defaultMessage: "We could not unlink your accounts",
})}
>
<Typography variant="Body/Paragraph/mdRegular">
<p>
{intl.formatMessage({
id: "unlinkEuroBonusAccount.errorMessage",
defaultMessage:
"We couldnt unlink your accounts. Please contact us and well help you resolve this.",
})}

View File

@@ -27,12 +27,14 @@ export default function Error({
return (
<GenericError
title={intl.formatMessage({
id: "linkEuroBonusAccount.genericErrorHeading",
defaultMessage: "Something went wrong",
})}
>
<Typography variant="Body/Paragraph/mdRegular">
<p>
{intl.formatMessage({
id: "linkEuroBonusAccount.genericErrorMessage",
defaultMessage: "Please try again later",
})}
</p>

View File

@@ -13,9 +13,10 @@ import { UnlinkError } from "../components/UnlinkError"
import type { LangParams, PageArgs, SearchParams } from "@/types/params"
export default async function Page(
props: PageArgs<LangParams> & SearchParams<{ errorCode?: "dateOfBirthMismatch" }>
props: PageArgs<LangParams> &
SearchParams<{ errorCode?: "dateOfBirthMismatch" }>
) {
const searchParams = await props.searchParams;
const searchParams = await props.searchParams
const intl = await getIntl()
const { errorCode } = searchParams
@@ -43,12 +44,14 @@ export default async function Page(
return (
<GenericError
title={intl.formatMessage({
id: "linkEuroBonusAccount.genericErrorTitle",
defaultMessage: "We could not connect your accounts",
})}
>
<Typography variant="Body/Paragraph/mdRegular">
<p>
{intl.formatMessage({
id: "linkEuroBonusAccount.couldntConnectAccountsErrorMessage",
defaultMessage:
"We couldnt connect your accounts. Please contact us and well help you resolve this.",
})}

View File

@@ -33,11 +33,13 @@ export default async function SasXScandicLayout(
<ArrowLeft height={20} width={20} />
<span className={styles.long}>
{intl.formatMessage({
id: "header.backToScandicHotelsCom",
defaultMessage: "Back to scandichotels.com",
})}
</span>
<span className={styles.short}>
{intl.formatMessage({
id: "common.back",
defaultMessage: "Back",
})}
</span>
@@ -55,6 +57,7 @@ async function MainMenuLogo() {
return (
<Logo
alt={intl.formatMessage({
id: "header.backToScandicHotelsCom",
defaultMessage: "Back to scandichotels.com",
})}
/>

View File

@@ -62,6 +62,7 @@ export function LinkAccountForm({
<Typography variant="Title/Subtitle/lg">
<h3>
{intl.formatMessage({
id: "linkEuroBonusAccount.linkYourAccountsTitle",
defaultMessage: "Link your accounts",
})}
</h3>
@@ -73,6 +74,7 @@ export function LinkAccountForm({
{userDateOfBirth
? intl.formatMessage(
{
id: "linkEuroBonusAccount.birthDate",
defaultMessage:
"Birth date: {dateOfBirth, date, ::MMMM d yyyy}",
},
@@ -81,6 +83,7 @@ export function LinkAccountForm({
}
)
: intl.formatMessage({
id: "linkEuroBonusAccount.birthDateMissing",
defaultMessage: "Birth date is missing",
})}
</p>
@@ -88,6 +91,7 @@ export function LinkAccountForm({
<Typography variant="Label/xsRegular">
<p className={styles.dateOfBirthDescription}>
{intl.formatMessage({
id: "linkEuroBonusAccount.birthDateDescription",
defaultMessage:
"We require your birth date in order to link your Scandic Friends account with your SAS EuroBonus account. Please check that it is correct.",
})}
@@ -100,6 +104,7 @@ export function LinkAccountForm({
textDecoration="underline"
>
{intl.formatMessage({
id: "linkEuroBonusAccount.editPersonalDetailsLink",
defaultMessage: "Edit your personal details",
})}
@@ -113,6 +118,7 @@ export function LinkAccountForm({
required: {
value: true,
message: intl.formatMessage({
id: "common.mustAcceptTermsError",
defaultMessage: "You must accept the terms and conditions",
}),
},
@@ -122,6 +128,7 @@ export function LinkAccountForm({
<Typography variant="Body/Paragraph/mdRegular">
<p>
{intl.formatMessage({
id: "booking.acceptBookingTerms",
defaultMessage: "I accept the booking and cancellation terms",
})}
</p>
@@ -131,6 +138,7 @@ export function LinkAccountForm({
<p className={styles.termsDescription}>
{intl.formatMessage(
{
id: "linkEuroBonusAccount.termsAndConditionsDescription",
defaultMessage:
"By linking your accounts you accept the <sasScandicTermsAndConditionsLink>Terms & Conditions for Scandic Friends and SAS EuroBonus Account Linking</sasScandicTermsAndConditionsLink>.",
},
@@ -158,6 +166,7 @@ export function LinkAccountForm({
disabled={isPending || disableSubmit}
>
{intl.formatMessage({
id: "linkEuroBonusAccount.linkMyAccountsButton",
defaultMessage: "Link my accounts",
})}
</Button>

View File

@@ -26,6 +26,7 @@ export default async function SASxScandicLinkPage(props: PageArgs<LangParams>) {
<Typography variant="Title/Subtitle/lg">
<h1>
{intl.formatMessage({
id: "linkEuroBonusAccount.successTitle",
defaultMessage: "Your accounts are linked",
})}
</h1>
@@ -34,6 +35,7 @@ export default async function SASxScandicLinkPage(props: PageArgs<LangParams>) {
<Typography variant="Body/Paragraph/mdRegular">
<p>
{intl.formatMessage({
id: "linkEuroBonusAccount.successMessage",
defaultMessage: "We successfully connected your accounts!",
})}
</p>
@@ -41,6 +43,7 @@ export default async function SASxScandicLinkPage(props: PageArgs<LangParams>) {
<Typography variant="Body/Paragraph/mdRegular">
<p>
{intl.formatMessage({
id: "linkEuroBonusAccount.redirectMyPagesMessage",
defaultMessage: "Redirecting you to My Pages.",
})}
</p>

View File

@@ -54,14 +54,17 @@ export default async function SASxScandicLoginPage(
const intentDescriptions: Record<Intent, string> = {
link: intl.formatMessage({
id: "linkEuroBonusAccount.loginRequired",
defaultMessage:
"Log in to your SAS EuroBonus account to confirm account linking.",
}),
unlink: intl.formatMessage({
id: "unlinkEuroBonusAccount.loginRequired",
defaultMessage:
"Log in to your SAS EuroBonus account to confirm account unlinking.",
}),
transfer: intl.formatMessage({
id: "transferEuroBonusPoints.loginRequired",
defaultMessage:
"In order to exchange your points, we'll ask you to sign in to your SAS EuroBonus account.",
}),
@@ -80,6 +83,7 @@ export default async function SASxScandicLoginPage(
<Typography variant="Title/Subtitle/lg">
<h1>
{intl.formatMessage({
id: "linkEuroBonusAccount.redirectingToSAS",
defaultMessage: "Redirecting you to SAS",
})}
</h1>
@@ -92,6 +96,7 @@ export default async function SASxScandicLoginPage(
<Footnote textAlign="center">
{intl.formatMessage(
{
id: "linkEuroBonusAccount.manualRedirectLinkMessage",
defaultMessage:
"If you are not redirected automatically, please <loginLink>click here</loginLink>.",
},

View File

@@ -56,6 +56,7 @@ export default function OneTimePasswordForm({
const cause = requestOtp.error?.data?.cause as RequestOtpError
const title = intl.formatMessage({
id: "linkEuroBonusAccount.oneTimePasswordGenericError",
defaultMessage: "Error requesting OTP",
})
const body = getRequestErrorBody(intl, cause?.errorCode)
@@ -123,10 +124,12 @@ export default function OneTimePasswordForm({
const errorMessages: Record<OtpError, ReactNode> = {
invalidCode: intl.formatMessage({
id: "linkEuroBonusAccount.invalidOtpCodeMessage",
defaultMessage: "The code you've entered is incorrect.",
}),
expiredCode: intl.formatMessage(
{
id: "linkEuroBonusAccount.expiredOtpCodeMessage",
defaultMessage:
"This code has expired. <resendOtpLink>Send new code.</resendOtpLink>",
},
@@ -188,6 +191,7 @@ export default function OneTimePasswordForm({
<p>
{intl.formatMessage(
{
id: "linkEuroBonusAccount.didNotReceiveCodeMessage",
defaultMessage:
"Didn't receive a code? <resendOtpLink>Resend code</resendOtpLink>",
},
@@ -226,10 +230,12 @@ const getRequestErrorBody = (
switch (errorCode) {
case "TOO_MANY_REQUESTS":
return intl.formatMessage({
id: "linkEuroBonusAccount.tooManyOtpRequestsMessage",
defaultMessage: "Too many requests. Please try again later.",
})
default:
return intl.formatMessage({
id: "linkEuroBonusAccount.requestOtpGenericErrorMessage",
defaultMessage: "An error occurred while requesting a new OTP",
})
}

View File

@@ -15,6 +15,7 @@ export default function Loading() {
<Typography variant="Body/Paragraph/mdRegular">
<p>
{intl.formatMessage({
id: "linkEuroBonusAccount.loadingMessage",
defaultMessage: "Hang tight...",
})}
</p>

View File

@@ -115,6 +115,7 @@ export default async function SASxScandicOneTimePasswordPage(
const intentDescriptions: Record<Intent, ReactNode> = {
link: intl.formatMessage(
{
id: "linkEuroBonusAccount.oneTimePasswordInputDescription",
defaultMessage:
"Please enter the code sent to <maskedContactInfo></maskedContactInfo> in order to confirm your account linking.",
},
@@ -122,6 +123,7 @@ export default async function SASxScandicOneTimePasswordPage(
),
unlink: intl.formatMessage(
{
id: "unlinkEuroBonusAccount.oneTimePasswordInputDescription",
defaultMessage:
"Please enter the code sent to <maskedContactInfo></maskedContactInfo> in order to unlink your accounts.",
},
@@ -129,6 +131,7 @@ export default async function SASxScandicOneTimePasswordPage(
),
transfer: intl.formatMessage(
{
id: "transferEuroBonusPoints.oneTimePasswordInputDescription",
defaultMessage:
"Please enter the code sent to <maskedContactInfo></maskedContactInfo> in order to transfer your points.",
},
@@ -139,10 +142,12 @@ export default async function SASxScandicOneTimePasswordPage(
return (
<OneTimePasswordForm
heading={intl.formatMessage({
id: "linkEuroBonusAccount.oneTimePasswordHeading",
defaultMessage: "Verification code",
})}
ingress={intentDescriptions[intent]}
footnote={intl.formatMessage({
id: "linkEuroBonusAccount.oneTimePasswordDescription",
defaultMessage: "This verification is needed for additional security.",
})}
otpLength={6}

View File

@@ -48,6 +48,7 @@ export default async function SASxScandicTransferSuccessPage(
<Typography variant="Title/Subtitle/lg">
<h1>
{intl.formatMessage({
id: "transferEuroBonusPoints.successMessage",
defaultMessage: "Point exchange completed!",
})}
</h1>
@@ -62,6 +63,7 @@ export default async function SASxScandicTransferSuccessPage(
>
<Link href={partnerSas[params.lang]} color="none">
{intl.formatMessage({
id: "transferEuroBonusPoints.backToMyPagesButton",
defaultMessage: "Go back to My Pages",
})}
</Link>
@@ -91,6 +93,7 @@ async function TransactionCard({
<Typography variant="Title/Subtitle/md">
<h2>
{intl.formatMessage({
id: "transferEuroBonusPoints.transactionTitle",
defaultMessage: "Your transaction",
})}
</h2>
@@ -100,6 +103,7 @@ async function TransactionCard({
<Typography variant="Title/Overline/sm">
<h3>
{intl.formatMessage({
id: "transferEuroBonusPoints.pointsAddedTitle",
defaultMessage: "Points added",
})}
</h3>
@@ -113,6 +117,7 @@ async function TransactionCard({
<Typography variant="Title/Overline/sm">
<h3>
{intl.formatMessage({
id: "transferEuroBonusPoints.newTotalTitle",
defaultMessage: "Your new total",
})}
</h3>
@@ -128,6 +133,7 @@ async function TransactionCard({
<Typography variant="Body/Paragraph/mdBold">
<h3>
{intl.formatMessage({
id: "transferEuroBonusPoints.bonusNightAvailableTitle",
defaultMessage: "You have enough points for a reward night!",
})}
</h3>
@@ -135,6 +141,7 @@ async function TransactionCard({
<Typography variant="Body/Paragraph/mdRegular">
<p>
{intl.formatMessage({
id: "transferEuroBonusPoints.bonusNightAvailableDescription",
defaultMessage:
"Redeem your points for cozy stays, delicious meals at our restaurants, or hotel extras to elevate your stay!",
})}
@@ -152,6 +159,7 @@ async function TransactionCard({
{/* TODO correct link */}
<Link href={hotelreservation(lang)} color="none">
{intl.formatMessage({
id: "transferEuroBonusPoints.bookNowButton",
defaultMessage: "Book now",
})}
{
@@ -183,6 +191,7 @@ async function TotalPoints() {
{"= "}
{intl.formatMessage(
{
id: "transferEuroBonusPoints.pointsResultText",
defaultMessage: "{points, number} points",
},
{

View File

@@ -28,6 +28,7 @@ export default async function SASxScandicUnlinkSuccessPage(
<Typography variant="Title/Subtitle/lg">
<h1>
{intl.formatMessage({
id: "unlinkEuroBonusAccount.successTitle",
defaultMessage: "Your accounts are now unlinked",
})}
</h1>
@@ -36,6 +37,7 @@ export default async function SASxScandicUnlinkSuccessPage(
<Typography variant="Body/Paragraph/mdRegular">
<p>
{intl.formatMessage({
id: "linkEuroBonusAccount.redirectMyPagesMessage",
defaultMessage: "Redirecting you to My Pages.",
})}
</p>

View File

@@ -24,6 +24,7 @@ export default async function Layout(
return (
<p>
{intl.formatMessage({
id: "webview.missingUserError",
defaultMessage: "Error: No user could be loaded",
})}
</p>
@@ -46,6 +47,7 @@ export default async function Layout(
return (
<p>
{intl.formatMessage({
id: "webview.userNotFoundError",
defaultMessage: "Error: user not found",
})}
</p>
@@ -54,6 +56,7 @@ export default async function Layout(
return (
<p>
{intl.formatMessage({
id: "webview.genericUserError",
defaultMessage: "Unknown error occurred loading user",
})}
</p>