fix: copy fixes for English labels

This commit is contained in:
Michael Zetterberg
2025-04-28 14:44:59 +02:00
parent 341be43a53
commit efb7219b6d
24 changed files with 36 additions and 46 deletions

View File

@@ -73,7 +73,7 @@ export default function MapCard({ hotelName, pois }: MapCardProps) {
<Button theme="base" intent="secondary" size="small" fullWidth asChild> <Button theme="base" intent="secondary" size="small" fullWidth asChild>
<Link href={mapUrl} scroll={true} onClick={trackHotelMapClick}> <Link href={mapUrl} scroll={true} onClick={trackHotelMapClick}>
{intl.formatMessage({ {intl.formatMessage({
defaultMessage: "Explore nearby", defaultMessage: "See map",
})} })}
</Link> </Link>
</Button> </Button>

View File

@@ -37,7 +37,7 @@ export default function ChildInfoSelector({
defaultMessage: "Age", defaultMessage: "Age",
}) })
const bedLabel = intl.formatMessage({ const bedLabel = intl.formatMessage({
defaultMessage: "Bed", defaultMessage: "Bed preference",
}) })
const errorMessage = intl.formatMessage({ const errorMessage = intl.formatMessage({
defaultMessage: "Child age is required", defaultMessage: "Child age is required",

View File

@@ -3,7 +3,6 @@ import { useIntl } from "react-intl"
import { myStay } from "@/constants/routes/myStay" import { myStay } from "@/constants/routes/myStay"
import Link from "@/components/TempDesignSystem/Link"
import Body from "@/components/TempDesignSystem/Text/Body" import Body from "@/components/TempDesignSystem/Text/Body"
import Title from "@/components/TempDesignSystem/Text/Title" import Title from "@/components/TempDesignSystem/Text/Title"
import useLang from "@/hooks/useLang" import useLang from "@/hooks/useLang"
@@ -29,19 +28,10 @@ export default function Header({
const intl = useIntl() const intl = useIntl()
const lang = useLang() const lang = useLang()
const text = intl.formatMessage( const text = intl.formatMessage({
{ defaultMessage:
defaultMessage: "Thank you for your booking! We look forward to welcoming you and hope you have a pleasant stay.",
"Thank you for booking with us! We look forward to welcoming you and hope you have a pleasant stay. If you have any questions or need to make changes to your reservation, please <emailLink>contact us.</emailLink>", })
},
{
emailLink: (str) => (
<Link color="burgundy" href="#" textDecoration="underline">
{str}
</Link>
),
}
)
const event: EventAttributes = { const event: EventAttributes = {
busyStatus: "FREE", busyStatus: "FREE",

View File

@@ -175,7 +175,7 @@ export default function Room({
<li className={styles.listItem}> <li className={styles.listItem}>
<Body color="uiTextPlaceholder"> <Body color="uiTextPlaceholder">
{intl.formatMessage({ {intl.formatMessage({
defaultMessage: "Rebooking", defaultMessage: "Change or cancel",
})} })}
</Body> </Body>
<Body color="uiTextHighContrast"> <Body color="uiTextHighContrast">

View File

@@ -59,7 +59,7 @@ export default function ConfirmBooking({
> >
<MaterialIcon icon="info" size={20} color="CurrentColor" /> <MaterialIcon icon="info" size={20} color="CurrentColor" />
{intl.formatMessage({ {intl.formatMessage({
defaultMessage: "How does it work", defaultMessage: "How it works",
})} })}
</Button> </Button>

View File

@@ -84,8 +84,7 @@ export default function JoinScandicFriendsCard({
</Caption> </Caption>
<Caption color="uiTextHighContrast"> <Caption color="uiTextHighContrast">
{intl.formatMessage({ {intl.formatMessage({
defaultMessage: defaultMessage: "Join Scandic Friends",
"I promise to join Scandic Friends before checking in",
})} })}
</Caption> </Caption>
</div> </div>

View File

@@ -22,7 +22,7 @@ export default function TermsAndConditions() {
{intl.formatMessage( {intl.formatMessage(
{ {
defaultMessage: defaultMessage:
"By paying with any of the payment methods available, I accept the terms for this booking and the general <termsAndConditionsLink>Terms & Conditions</termsAndConditionsLink>, and understand that Scandic will process my personal data for this booking in accordance with <privacyPolicyLink>Scandic's Privacy policy</privacyPolicyLink>. I also accept that Scandic require a valid credit card during my visit in case anything is left unpaid.", "I accept the terms for this booking and the general <termsAndConditionsLink>Terms & Conditions</termsAndConditionsLink>, and understand that Scandic will process my personal data for this booking in accordance with <privacyPolicyLink>Scandic's Privacy policy</privacyPolicyLink>. I also accept that Scandic requires a valid payment card during my visit in case anything is left unpaid.",
}, },
{ {
termsAndConditionsLink: (str) => ( termsAndConditionsLink: (str) => (

View File

@@ -57,8 +57,8 @@ export default function Multiroom() {
{room.bedTypes ? ( {room.bedTypes ? (
<Section <Section
header={intl.formatMessage({ defaultMessage: "Select bed" })} header={intl.formatMessage({ defaultMessage: "Bed preference" })}
label={intl.formatMessage({ defaultMessage: "Request bedtype" })} label={intl.formatMessage({ defaultMessage: "Preferred bed type" })}
additionalInfo={bedTypeInfoText} additionalInfo={bedTypeInfoText}
step={StepEnum.selectBed} step={StepEnum.selectBed}
> >
@@ -69,7 +69,7 @@ export default function Multiroom() {
{showBreakfastStep ? ( {showBreakfastStep ? (
<Section <Section
header={intl.formatMessage({ header={intl.formatMessage({
defaultMessage: "Food options", defaultMessage: "Breakfast",
})} })}
label={intl.formatMessage({ label={intl.formatMessage({
defaultMessage: "Select breakfast options", defaultMessage: "Select breakfast options",
@@ -86,7 +86,7 @@ export default function Multiroom() {
})} })}
step={StepEnum.details} step={StepEnum.details}
label={intl.formatMessage({ label={intl.formatMessage({
defaultMessage: "Enter your details", defaultMessage: "Contact details",
})} })}
> >
<Details /> <Details />

View File

@@ -63,8 +63,8 @@ export default function RoomOne({ user }: { user: SafeUser }) {
{room.bedTypes ? ( {room.bedTypes ? (
<Section <Section
header={intl.formatMessage({ defaultMessage: "Select bed" })} header={intl.formatMessage({ defaultMessage: "Bed preference" })}
label={intl.formatMessage({ defaultMessage: "Request bedtype" })} label={intl.formatMessage({ defaultMessage: "Preferred bed type" })}
additionalInfo={bedTypeInfoText} additionalInfo={bedTypeInfoText}
step={StepEnum.selectBed} step={StepEnum.selectBed}
> >
@@ -75,7 +75,7 @@ export default function RoomOne({ user }: { user: SafeUser }) {
{showBreakfastStep ? ( {showBreakfastStep ? (
<Section <Section
header={intl.formatMessage({ header={intl.formatMessage({
defaultMessage: "Food options", defaultMessage: "Breakfast",
})} })}
label={intl.formatMessage({ label={intl.formatMessage({
defaultMessage: "Select breakfast options", defaultMessage: "Select breakfast options",
@@ -92,7 +92,7 @@ export default function RoomOne({ user }: { user: SafeUser }) {
})} })}
step={StepEnum.details} step={StepEnum.details}
label={intl.formatMessage({ label={intl.formatMessage({
defaultMessage: "Enter your details", defaultMessage: "Contact details",
})} })}
> >
<Details user={user} /> <Details user={user} />

View File

@@ -53,7 +53,7 @@ export default function SelectedRoom() {
> >
<h2> <h2>
{intl.formatMessage({ {intl.formatMessage({
defaultMessage: "Your room", defaultMessage: "Room",
})} })}
</h2> </h2>
</Footnote> </Footnote>

View File

@@ -50,7 +50,7 @@ export default function AdditionalInfoForm({
<div> <div>
<Title level="h2" as="h3"> <Title level="h2" as="h3">
{intl.formatMessage({ {intl.formatMessage({
defaultMessage: "One last step", defaultMessage: "Find your booking",
})} })}
</Title> </Title>
<Body> <Body>

View File

@@ -75,7 +75,7 @@ export default function FindMyBooking() {
<Body> <Body>
{intl.formatMessage({ {intl.formatMessage({
defaultMessage: defaultMessage:
"View and manage your stay made on Scandic's website", "View and manage your booking made via our website or app.",
})} })}
</Body> </Body>
</div> </div>

View File

@@ -148,7 +148,7 @@ export default function Details({ booking, user }: DetailsProps) {
<Typography variant="Title/Overline/sm"> <Typography variant="Title/Overline/sm">
<p> <p>
{intl.formatMessage({ {intl.formatMessage({
defaultMessage: "Total points", defaultMessage: "My total points",
})} })}
</p> </p>
</Typography> </Typography>

View File

@@ -26,7 +26,7 @@ export default async function Footer({ booking, room }: FooterProps) {
<Typography variant="Body/Supporting text (caption)/smRegular"> <Typography variant="Body/Supporting text (caption)/smRegular">
<dt> <dt>
{intl.formatMessage({ {intl.formatMessage({
defaultMessage: "Reference number", defaultMessage: "Booking number",
})} })}
</dt> </dt>
</Typography> </Typography>

View File

@@ -117,7 +117,7 @@ export default function Confirmation({
defaultMessage: "Confirm date change", defaultMessage: "Confirm date change",
}) })
const totalDueMsg = intl.formatMessage({ const totalDueMsg = intl.formatMessage({
defaultMessage: "Total due", defaultMessage: "Pay at the hotel",
}) })
const adultsText = intl.formatMessage( const adultsText = intl.formatMessage(
{ {

View File

@@ -149,7 +149,7 @@ export default function MultiRoom({ booking, roomNr, user }: MultiRoomProps) {
) : ( ) : (
<span> <span>
{intl.formatMessage({ {intl.formatMessage({
defaultMessage: "Reference", defaultMessage: "Booking number",
})} })}
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{":"} {":"}

View File

@@ -175,7 +175,7 @@ export default function SingleRoom({ bedType, image, user }: RoomProps) {
<Typography variant="Body/Paragraph/mdBold"> <Typography variant="Body/Paragraph/mdBold">
<span> <span>
{intl.formatMessage({ {intl.formatMessage({
defaultMessage: "Reference", defaultMessage: "Booking number",
})} })}
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{":"} {":"}

View File

@@ -24,7 +24,7 @@ export default function BookingCodeFilter() {
const bookingCodeFilterItems = [ const bookingCodeFilterItems = [
{ {
label: intl.formatMessage({ label: intl.formatMessage({
defaultMessage: "Discounted rooms", defaultMessage: "Booking code rates",
}), }),
value: BookingCodeFilterEnum.Discounted, value: BookingCodeFilterEnum.Discounted,
}, },

View File

@@ -32,7 +32,7 @@ export default function BookingCodeFilter() {
const bookingCodeFilterItems = [ const bookingCodeFilterItems = [
{ {
label: intl.formatMessage({ label: intl.formatMessage({
defaultMessage: "Discounted rooms", defaultMessage: "Booking code rates",
}), }),
value: BookingCodeFilterEnum.Discounted, value: BookingCodeFilterEnum.Discounted,
}, },
@@ -44,7 +44,7 @@ export default function BookingCodeFilter() {
}, },
{ {
label: intl.formatMessage({ label: intl.formatMessage({
defaultMessage: "All rooms", defaultMessage: "All rates",
}), }),
value: BookingCodeFilterEnum.All, value: BookingCodeFilterEnum.All,
}, },

View File

@@ -22,7 +22,7 @@ export default function RoomPackageFilterModal() {
return ( return (
<DialogTrigger isOpen={isOpen} onOpenChange={setIsOpen}> <DialogTrigger isOpen={isOpen} onOpenChange={setIsOpen}>
<ChipButton variant="Outlined"> <ChipButton variant="Outlined">
{intl.formatMessage({ defaultMessage: "Room preferences" })} {intl.formatMessage({ defaultMessage: "Special needs" })}
<MaterialIcon <MaterialIcon
icon="keyboard_arrow_down" icon="keyboard_arrow_down"
size={20} size={20}
@@ -36,7 +36,7 @@ export default function RoomPackageFilterModal() {
<div className={styles.header}> <div className={styles.header}>
<Typography variant="Title/Subtitle/md"> <Typography variant="Title/Subtitle/md">
<h3> <h3>
{intl.formatMessage({ defaultMessage: "Room preferences" })} {intl.formatMessage({ defaultMessage: "Special needs" })}
</h3> </h3>
</Typography> </Typography>
<Button variant="Icon" onPress={() => setIsOpen(false)}> <Button variant="Icon" onPress={() => setIsOpen(false)}>

View File

@@ -15,7 +15,7 @@ export default function RoomPackageFilterPopover() {
return ( return (
<DialogTrigger isOpen={isOpen} onOpenChange={setIsOpen}> <DialogTrigger isOpen={isOpen} onOpenChange={setIsOpen}>
<ChipButton variant="Outlined"> <ChipButton variant="Outlined">
{intl.formatMessage({ defaultMessage: "Room preferences" })} {intl.formatMessage({ defaultMessage: "Special needs" })}
<MaterialIcon <MaterialIcon
icon="keyboard_arrow_down" icon="keyboard_arrow_down"
size={20} size={20}

View File

@@ -35,7 +35,7 @@ export default function BreakfastMessage({
defaultMessage: "Breakfast is included.", defaultMessage: "Breakfast is included.",
}), }),
notIncluded: intl.formatMessage({ notIncluded: intl.formatMessage({
defaultMessage: "Breakfast selection in next step.", defaultMessage: "Breakfast excluded, add in next step.",
}), }),
noSelection: intl.formatMessage({ noSelection: intl.formatMessage({
defaultMessage: "Select a rate", defaultMessage: "Select a rate",

View File

@@ -160,7 +160,7 @@ export default function BookedRoomSidePeek({
) : ( ) : (
<span> <span>
{intl.formatMessage({ {intl.formatMessage({
defaultMessage: "Reference", defaultMessage: "Booking number",
})} })}
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{":"} {":"}

View File

@@ -163,7 +163,8 @@ export function getErrorMessage(intl: IntlShape, errorCode?: string) {
}) })
case bookingWidgetErrors.CODE_VOUCHER_REWARD_NIGHT_UNAVAILABLE: case bookingWidgetErrors.CODE_VOUCHER_REWARD_NIGHT_UNAVAILABLE:
return intl.formatMessage({ return intl.formatMessage({
defaultMessage: "Code and voucher is not available with reward night.", defaultMessage:
"Reward nights can't be combined with codes or vouchers.",
}) })
default: default:
console.warn("Error code not supported:", errorCode) console.warn("Error code not supported:", errorCode)