Merged in fix/sas-english-copy (pull request #1695)

Update english copy for SAS related flows

* Update english copy for SAS related flows

* Add new copy to all languages

* Add use client directive to loading to use translations


Approved-by: Joakim Jäderberg
This commit is contained in:
Anton Gunnarsson
2025-04-02 11:49:12 +00:00
parent e4907d4b47
commit 67905198c6
16 changed files with 158 additions and 122 deletions

View File

@@ -24,15 +24,14 @@ export function AlreadyLinkedError() {
</Typography>
<Typography variant="Body/Paragraph/mdRegular">
<p>
{/* TODO copy */}
{intl.formatMessage({
id: "We could not connect your accounts to give you access. Please contact us and well help you resolve this issue.",
id: "Looks like youve already linked your Scandic Friends and SAS EuroBonus accounts!",
})}
</p>
</Typography>
<Button theme="base" asChild>
<Link href={partnerSas[lang]}>
{intl.formatMessage({ id: "View your account" })}
{intl.formatMessage({ id: "View your linked accounts" })}
</Link>
</Button>
<SASModalDivider />

View File

@@ -29,15 +29,14 @@ export function DateOfBirthError() {
</Typography>
<Typography variant="Body/Paragraph/mdRegular">
<p>
{/* TODO copy */}
{intl.formatMessage({
id: "We could not connect your accounts to give you access. Please contact us and well help you resolve this issue.",
id: "We couldnt connect your accounts. Please contact us and well help you resolve this.",
})}
</p>
</Typography>
<Button theme="base" asChild>
<Link href={profile[lang]}>
{intl.formatMessage({ id: "View your account" })}
{intl.formatMessage({ id: "View your details" })}
</Link>
</Button>
<SASModalDivider />

View File

@@ -33,7 +33,7 @@ export function SASModalContactBlock() {
<div style={{ display: "flex", flexDirection: "column" }}>
<Typography variant="Title/Subtitle/md">
<h4 className={styles.contactBlockTitle}>
{intl.formatMessage({ id: "Contact our memberservice" })}
{intl.formatMessage({ id: "Contact us" })}
</h4>
</Typography>
<Link

View File

@@ -43,7 +43,7 @@ export default async function Page({
<Typography variant="Body/Paragraph/mdRegular">
<p>
{intl.formatMessage({
id: "We could not connect your accounts to give you access. Please contact us and well help you resolve this issue.",
id: "We couldnt connect your accounts. Please contact us and well help you resolve this.",
})}
</p>
</Typography>

View File

@@ -81,7 +81,7 @@ export function LinkAccountForm({
<Typography variant="Label/xsRegular">
<p className={styles.dateOfBirthDescription}>
{intl.formatMessage({
id: "We require your birth date in order to link your Scandic account with your SAS EuroBonus account. Please check that it is correct.",
id: "We require your birth date in order to link your Scandic Friends account with your SAS EuroBonus account. Please check that it is correct.",
})}
</p>
</Typography>
@@ -123,7 +123,7 @@ export function LinkAccountForm({
<p className={styles.termsDescription}>
{intl.formatMessage(
{
id: "By linking your accounts you accept the <sasScandicTermsAndConditionsLink>Scandic Friends & SAS Terms and Conditions</sasScandicTermsAndConditionsLink>. You will be connected throughout the duration of your employment or until further notice, and you can opt out at any time.",
id: "By linking your accounts you accept the <sasScandicTermsAndConditionsLink>Terms & Conditions for Scandic Friends and SAS EuroBonus Account Linking</sasScandicTermsAndConditionsLink>.",
},
{
sasScandicTermsAndConditionsLink: (str) => (

View File

@@ -53,7 +53,7 @@ export default async function SASxScandicLoginPage({
const intentDescriptions: Record<Intent, string> = {
link: intl.formatMessage({
id: "In order to verify your account linking we will ask you to sign in to your SAS EuroBonus account.",
id: "Log in to your SAS EuroBonus account to confirm account linking.",
}),
unlink: intl.formatMessage({
id: "Log in to your SAS Eurobonus account to confirm account unlinking.",

View File

@@ -125,11 +125,11 @@ export default function OneTimePasswordForm({
const errorMessages: Record<OtpError, ReactNode> = {
invalidCode: intl.formatMessage({
id: "The code youve entered is incorrect.",
id: "The code you've entered is incorrect.",
}),
expiredCode: intl.formatMessage(
{
id: "The code youve entered have expired. <resendOtpLink>Resend code.</resendOtpLink>",
id: "This code has expired. <resendOtpLink>Send new code.</resendOtpLink>",
},
{
resendOtpLink: getResendOtpLink,

View File

@@ -1,11 +1,25 @@
"use client"
import { useIntl } from "react-intl"
import { Typography } from "@scandic-hotels/design-system/Typography"
import LoadingSpinner from "@/components/LoadingSpinner"
import { SASModal } from "../components/SASModal"
export default function Loading() {
const intl = useIntl()
return (
<SASModal>
<LoadingSpinner />
<Typography variant="Body/Paragraph/mdRegular">
<p>
{intl.formatMessage({
id: "Hang tight...",
})}
</p>
</Typography>
</SASModal>
)
}