Merged in fix/labels-english (pull request #1249)

fix(i18n): validated English messages

Approved-by: Bianca Widstam
Approved-by: Christian Andolf
This commit is contained in:
Michael Zetterberg
2025-02-06 20:54:25 +00:00
parent 9fafb33d26
commit 1d822dad5a
21 changed files with 489 additions and 167 deletions

View File

@@ -41,7 +41,9 @@ export default function Receipt({
)
return (
<section className={styles.receipt}>
<Subtitle type="two">{intl.formatMessage({ id: "Summary" })}</Subtitle>
<Subtitle type="two">
{intl.formatMessage({ id: "Booking summary" })}
</Subtitle>
<article className={styles.room}>
<header className={styles.roomHeader}>
<Body color="uiTextHighContrast">{room.name}</Body>

View File

@@ -25,14 +25,14 @@ export default function JoinScandicFriendsCard({
const intl = useIntl()
const list = [
{ title: intl.formatMessage({ id: "Earn bonus nights & points" }) },
{ title: intl.formatMessage({ id: "Get member benefits & offers" }) },
{ title: intl.formatMessage({ id: "Join at no cost" }) },
{ title: intl.formatMessage({ id: "Friendly room rates" }) },
{ title: intl.formatMessage({ id: "Earn & spend points" }) },
{ title: intl.formatMessage({ id: "Join for free" }) },
]
const saveOnJoiningLabel = intl.formatMessage(
{
id: "Only pay {amount}",
id: "Get the member price: {amount}",
},
{
amount: formatPrice(

View File

@@ -133,7 +133,7 @@ export default function Details({ user, memberPrice }: DetailsProps) {
theme="base"
type="submit"
>
{intl.formatMessage({ id: "Proceed to payment method" })}
{intl.formatMessage({ id: "Proceed to payment" })}
</Button>
</footer>
<MemberPriceModal

View File

@@ -82,7 +82,7 @@ export default function SummaryUI({
<section className={styles.summary}>
<header className={styles.header}>
<Subtitle className={styles.title} type="two">
{intl.formatMessage({ id: "Summary" })}
{intl.formatMessage({ id: "Booking summary" })}
</Subtitle>
<Body className={styles.date} color="baseTextMediumContrast">
{dt(booking.fromDate).locale(lang).format("ddd, D MMM")}

View File

@@ -17,7 +17,7 @@ export default function HotelPriceCard({
return (
<dl className={styles.priceCard}>
{isMemberPrice && (
{isMemberPrice ? (
<div className={styles.priceRow}>
<dt>
<Caption color="red">
@@ -25,6 +25,14 @@ export default function HotelPriceCard({
</Caption>
</dt>
</div>
) : (
<div className={styles.priceRow}>
<dt>
<Caption color="uiTextHighContrast">
{intl.formatMessage({ id: "Standard price" })}
</Caption>
</dt>
</div>
)}
<div className={styles.priceRow}>
<dt>

View File

@@ -227,9 +227,12 @@ export default function RoomCard({
<Caption color="uiTextMediumContrast" className={styles.guests}>
{intl.formatMessage(
{
id: "Max {max, plural, one {{range} guest} other {{range} guests}}",
id: "Max. {max, plural, one {{range} guest} other {{range} guests}}",
},
{ max: totalOccupancy.max, range: totalOccupancy.range }
{
max: totalOccupancy.max,
range: totalOccupancy.range,
}
)}
</Caption>
)}
@@ -244,7 +247,7 @@ export default function RoomCard({
)
: intl.formatMessage(
{
id: "{roomSizeMin} - {roomSizeMax} m²",
id: "{roomSizeMin}{roomSizeMax} m²",
},
{
roomSizeMin: roomSize.min,

View File

@@ -70,21 +70,21 @@ export default function Rooms({
() => [
{
code: RoomPackageCodeEnum.ACCESSIBILITY_ROOM,
description: intl.formatMessage({ id: "Accessible Room" }),
description: intl.formatMessage({ id: "Accessible room" }),
itemCode: availablePackages.find(
(pkg) => pkg.code === RoomPackageCodeEnum.ACCESSIBILITY_ROOM
)?.itemCode,
},
{
code: RoomPackageCodeEnum.ALLERGY_ROOM,
description: intl.formatMessage({ id: "Allergy Room" }),
description: intl.formatMessage({ id: "Allergy-friendly room" }),
itemCode: availablePackages.find(
(pkg) => pkg.code === RoomPackageCodeEnum.ALLERGY_ROOM
)?.itemCode,
},
{
code: RoomPackageCodeEnum.PET_ROOM,
description: intl.formatMessage({ id: "Pet Room" }),
description: intl.formatMessage({ id: "Pet room" }),
itemCode: availablePackages.find(
(pkg) => pkg.code === RoomPackageCodeEnum.PET_ROOM
)?.itemCode,