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:
@@ -6,6 +6,7 @@ export function AmenitiesSidePeekLabel() {
|
||||
return (
|
||||
<>
|
||||
{intl.formatMessage({
|
||||
id: "hotel.seeAllAmenities",
|
||||
defaultMessage: "See all amenities",
|
||||
})}
|
||||
</>
|
||||
|
||||
@@ -33,6 +33,7 @@ export default function AvailabilityError({ booking }: AvailabilityErrorProps) {
|
||||
errorCode === BookingErrorCodeEnum.AvailabilityError
|
||||
|
||||
const errorMessage = intl.formatMessage({
|
||||
id: "error.availabilityErrorMessage",
|
||||
defaultMessage:
|
||||
"Unfortunately, one of the rooms you selected is sold out. Please choose another room to proceed.",
|
||||
})
|
||||
|
||||
@@ -40,16 +40,18 @@ export function DesktopSummary({
|
||||
|
||||
const totalNights = intl.formatMessage(
|
||||
{
|
||||
id: "booking.numberOfNights",
|
||||
defaultMessage: "{totalNights, plural, one {# night} other {# nights}}",
|
||||
},
|
||||
{ totalNights: input.nights }
|
||||
)
|
||||
const totalAdults = intl.formatMessage(
|
||||
{
|
||||
defaultMessage: "{totalAdults, plural, one {# adult} other {# adults}}",
|
||||
id: "booking.numberOfAdults",
|
||||
defaultMessage: "{adults, plural, one {# adult} other {# adults}}",
|
||||
},
|
||||
{
|
||||
totalAdults:
|
||||
adults:
|
||||
input.data?.booking.rooms.reduce((acc, room) => acc + room.adults, 0) ??
|
||||
0,
|
||||
}
|
||||
@@ -59,11 +61,11 @@ export function DesktopSummary({
|
||||
)
|
||||
const childrenInroom = intl.formatMessage(
|
||||
{
|
||||
defaultMessage:
|
||||
"{totalChildren, plural, one {# child} other {# children}}",
|
||||
id: "booking.numberOfChildren",
|
||||
defaultMessage: "{children, plural, one {# child} other {# children}}",
|
||||
},
|
||||
{
|
||||
totalChildren: input.data?.booking.rooms.reduce(
|
||||
children: input.data?.booking.rooms.reduce(
|
||||
(acc, room) => acc + (room.childrenInRoom?.length ?? 0),
|
||||
0
|
||||
),
|
||||
@@ -73,6 +75,7 @@ export function DesktopSummary({
|
||||
const totalChildren = childrenInOneOrMoreRooms ? `, ${childrenInroom}` : ""
|
||||
const totalRooms = intl.formatMessage(
|
||||
{
|
||||
id: "booking.numberOfRooms",
|
||||
defaultMessage: "{totalRooms, plural, one {# room} other {# rooms}}",
|
||||
},
|
||||
{ totalRooms: input.roomCount }
|
||||
@@ -137,6 +140,7 @@ export function DesktopSummary({
|
||||
<Body>
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: "booking.totalPriceInclVat",
|
||||
defaultMessage: "<b>Total price</b> (incl VAT)",
|
||||
},
|
||||
{ b: (str) => <b>{str}</b> }
|
||||
@@ -175,6 +179,7 @@ export function DesktopSummary({
|
||||
<Body color="uiTextMediumContrast">
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: "booking.approxValue",
|
||||
defaultMessage: "Approx. {value}",
|
||||
},
|
||||
{
|
||||
@@ -193,6 +198,7 @@ export function DesktopSummary({
|
||||
<div className={styles.summaryPriceTextMobile}>
|
||||
<Caption color="uiTextHighContrast">
|
||||
{intl.formatMessage({
|
||||
id: "common.totalPrice",
|
||||
defaultMessage: "Total price",
|
||||
})}
|
||||
</Caption>
|
||||
@@ -219,6 +225,7 @@ export function DesktopSummary({
|
||||
type="submit"
|
||||
>
|
||||
{intl.formatMessage({
|
||||
id: "common.continue",
|
||||
defaultMessage: "Continue",
|
||||
})}
|
||||
</Button>
|
||||
@@ -246,6 +253,7 @@ function RateSummary({
|
||||
<Subtitle color="uiTextPlaceholder">
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: "booking.roomIndex",
|
||||
defaultMessage: "Room {roomIndex}",
|
||||
},
|
||||
{ roomIndex: roomIndex + 1 }
|
||||
@@ -253,6 +261,7 @@ function RateSummary({
|
||||
</Subtitle>
|
||||
<Body color="uiTextPlaceholder">
|
||||
{intl.formatMessage({
|
||||
id: "booking.selectRoom",
|
||||
defaultMessage: "Select room",
|
||||
})}
|
||||
</Body>
|
||||
@@ -266,9 +275,7 @@ function RateSummary({
|
||||
<>
|
||||
<Subtitle color="uiTextHighContrast">
|
||||
{intl.formatMessage(
|
||||
{
|
||||
defaultMessage: "Room {roomIndex}",
|
||||
},
|
||||
{ id: "booking.roomIndex", defaultMessage: "Room {roomIndex}" },
|
||||
{ roomIndex: roomIndex + 1 }
|
||||
)}
|
||||
</Subtitle>
|
||||
@@ -292,18 +299,23 @@ function RateSummary({
|
||||
function useRateDetails() {
|
||||
const intl = useIntl()
|
||||
const freeCancelation = intl.formatMessage({
|
||||
id: "booking.freeCancellation",
|
||||
defaultMessage: "Free cancellation",
|
||||
})
|
||||
const nonRefundable = intl.formatMessage({
|
||||
id: "booking.nonRefundable",
|
||||
defaultMessage: "Non-refundable",
|
||||
})
|
||||
const freeBooking = intl.formatMessage({
|
||||
id: "booking.freeRebooking",
|
||||
defaultMessage: "Free rebooking",
|
||||
})
|
||||
const payLater = intl.formatMessage({
|
||||
id: "booking.payLater",
|
||||
defaultMessage: "Pay later",
|
||||
})
|
||||
const payNow = intl.formatMessage({
|
||||
id: "booking.payNow",
|
||||
defaultMessage: "Pay now",
|
||||
})
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ export default function SummaryContent({
|
||||
|
||||
const nightsLabel = intl.formatMessage(
|
||||
{
|
||||
id: "booking.numberOfNights",
|
||||
defaultMessage: "{totalNights, plural, one {# night} other {# nights}}",
|
||||
},
|
||||
{ totalNights: input.nights }
|
||||
@@ -76,6 +77,7 @@ export default function SummaryContent({
|
||||
<Typography variant="Title/Subtitle/md">
|
||||
<h3 className={styles.heading}>
|
||||
{intl.formatMessage({
|
||||
id: "booking.bookingSummary",
|
||||
defaultMessage: "Booking summary",
|
||||
})}
|
||||
</h3>
|
||||
@@ -137,6 +139,7 @@ export default function SummaryContent({
|
||||
<p>
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: "booking.totalPriceInclVat",
|
||||
defaultMessage: "<b>Total price</b> (incl VAT)",
|
||||
},
|
||||
{
|
||||
@@ -154,6 +157,7 @@ export default function SummaryContent({
|
||||
<p className={styles.approxPrice}>
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: "booking.approxValue",
|
||||
defaultMessage: "Approx. {value}",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -71,19 +71,20 @@ export default function Room({
|
||||
|
||||
const adultsMsg = intl.formatMessage(
|
||||
{
|
||||
defaultMessage: "{totalAdults, plural, one {# adult} other {# adults}}",
|
||||
id: "booking.numberOfAdults",
|
||||
defaultMessage: "{adults, plural, one {# adult} other {# adults}}",
|
||||
},
|
||||
{ totalAdults: adults }
|
||||
{ adults }
|
||||
)
|
||||
|
||||
const guestsParts = [adultsMsg]
|
||||
if (childrenInRoom?.length) {
|
||||
const childrenMsg = intl.formatMessage(
|
||||
{
|
||||
defaultMessage:
|
||||
"{totalChildren, plural, one {# child} other {# children}}",
|
||||
id: "booking.numberOfChildren",
|
||||
defaultMessage: "{children, plural, one {# child} other {# children}}",
|
||||
},
|
||||
{ totalChildren: childrenInRoom.length }
|
||||
{ children: childrenInRoom.length }
|
||||
)
|
||||
guestsParts.push(childrenMsg)
|
||||
}
|
||||
@@ -99,6 +100,7 @@ export default function Room({
|
||||
<p className={styles.roomTitle}>
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: "booking.roomIndex",
|
||||
defaultMessage: "Room {roomIndex}",
|
||||
},
|
||||
{
|
||||
@@ -158,6 +160,7 @@ export default function Room({
|
||||
wrapping={false}
|
||||
>
|
||||
{intl.formatMessage({
|
||||
id: "booking.rateDetails",
|
||||
defaultMessage: "Rate details",
|
||||
})}
|
||||
<MaterialIcon
|
||||
@@ -196,6 +199,7 @@ export default function Room({
|
||||
<p>
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: "booking.numberOfCribs",
|
||||
defaultMessage: "Crib (child) × {count}",
|
||||
},
|
||||
{ count: childBedCrib }
|
||||
@@ -204,6 +208,7 @@ export default function Room({
|
||||
<Typography variant="Body/Supporting text (caption)/smRegular">
|
||||
<p>
|
||||
{intl.formatMessage({
|
||||
id: "booking.subjectToAvailability",
|
||||
defaultMessage: "Subject to availability",
|
||||
})}
|
||||
</p>
|
||||
@@ -224,6 +229,7 @@ export default function Room({
|
||||
<p>
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: "booking.extraBedsCount",
|
||||
defaultMessage: "Extra bed (child) × {count}",
|
||||
},
|
||||
{
|
||||
@@ -234,6 +240,7 @@ export default function Room({
|
||||
<Typography variant="Body/Supporting text (caption)/smRegular">
|
||||
<p>
|
||||
{intl.formatMessage({
|
||||
id: "booking.subjectToAvailability",
|
||||
defaultMessage: "Subject to availability",
|
||||
})}
|
||||
</p>
|
||||
|
||||
@@ -80,6 +80,7 @@ export function MobileSummary() {
|
||||
<Typography variant="Body/Supporting text (caption)/smRegular">
|
||||
<span className={styles.priceLabel}>
|
||||
{intl.formatMessage({
|
||||
id: "common.totalPrice",
|
||||
defaultMessage: "Total price",
|
||||
})}
|
||||
</span>
|
||||
@@ -117,6 +118,7 @@ export function MobileSummary() {
|
||||
<span className={styles.seeDetails}>
|
||||
<span>
|
||||
{intl.formatMessage({
|
||||
id: "booking.seeDetails",
|
||||
defaultMessage: "See details",
|
||||
})}
|
||||
</span>
|
||||
@@ -137,6 +139,7 @@ export function MobileSummary() {
|
||||
isDisabled={selectedRates.state !== "ALL_SELECTED"}
|
||||
>
|
||||
{intl.formatMessage({
|
||||
id: "common.continue",
|
||||
defaultMessage: "Continue",
|
||||
})}
|
||||
</Button>
|
||||
|
||||
@@ -53,9 +53,7 @@ export function SelectedRoomPanel({ roomIndex }: { roomIndex: number }) {
|
||||
<div className={styles.content}>
|
||||
<Caption color="uiTextHighContrast">
|
||||
{intl.formatMessage(
|
||||
{
|
||||
defaultMessage: "Room {roomIndex}",
|
||||
},
|
||||
{ id: "booking.roomIndex", defaultMessage: "Room {roomIndex}" },
|
||||
{ roomIndex: roomNr }
|
||||
)}
|
||||
</Caption>
|
||||
@@ -90,6 +88,7 @@ export function SelectedRoomPanel({ roomIndex }: { roomIndex: number }) {
|
||||
icon="edit_square"
|
||||
/>
|
||||
{intl.formatMessage({
|
||||
id: "common.change",
|
||||
defaultMessage: "Change",
|
||||
})}
|
||||
</Chip>
|
||||
@@ -112,6 +111,7 @@ function useSelectedProductTitle({ roomIndex }: { roomIndex: number }) {
|
||||
const selectedRate = selectedRates.forRoom(roomIndex)
|
||||
|
||||
const night = intl.formatMessage({
|
||||
id: "common.night",
|
||||
defaultMessage: "night",
|
||||
})
|
||||
|
||||
@@ -171,18 +171,23 @@ function useSelectedProductTitle({ roomIndex }: { roomIndex: number }) {
|
||||
function useRateTitle(rate: RateEnum | undefined) {
|
||||
const intl = useIntl()
|
||||
const freeCancelation = intl.formatMessage({
|
||||
id: "booking.freeCancellation",
|
||||
defaultMessage: "Free cancellation",
|
||||
})
|
||||
const nonRefundable = intl.formatMessage({
|
||||
id: "booking.nonRefundable",
|
||||
defaultMessage: "Non-refundable",
|
||||
})
|
||||
const freeBooking = intl.formatMessage({
|
||||
id: "booking.freeRebooking",
|
||||
defaultMessage: "Free rebooking",
|
||||
})
|
||||
const payLater = intl.formatMessage({
|
||||
id: "booking.payLater",
|
||||
defaultMessage: "Pay later",
|
||||
})
|
||||
const payNow = intl.formatMessage({
|
||||
id: "booking.payNow",
|
||||
defaultMessage: "Pay now",
|
||||
})
|
||||
|
||||
|
||||
@@ -33,14 +33,13 @@ export function MultiRoomWrapper({ children, isMultiRoom, roomIndex }: Props) {
|
||||
const isActiveRoom = activeRoomIndex === roomIndex
|
||||
|
||||
const roomMsg = intl.formatMessage(
|
||||
{
|
||||
defaultMessage: "Room {roomIndex}",
|
||||
},
|
||||
{ id: "booking.roomIndex", defaultMessage: "Room {roomIndex}" },
|
||||
{ roomIndex: roomNr }
|
||||
)
|
||||
|
||||
const adultsMsg = intl.formatMessage(
|
||||
{
|
||||
id: "booking.numberOfAdults",
|
||||
defaultMessage: "{adults, plural, one {# adult} other {# adults}}",
|
||||
},
|
||||
{ adults: adultCount }
|
||||
@@ -48,6 +47,7 @@ export function MultiRoomWrapper({ children, isMultiRoom, roomIndex }: Props) {
|
||||
|
||||
const childrenMsg = intl.formatMessage(
|
||||
{
|
||||
id: "booking.numberOfChildren",
|
||||
defaultMessage: "{children, plural, one {# child} other {# children}}",
|
||||
},
|
||||
{
|
||||
@@ -112,6 +112,7 @@ export function MultiRoomWrapper({ children, isMultiRoom, roomIndex }: Props) {
|
||||
variant="icon"
|
||||
>
|
||||
{intl.formatMessage({
|
||||
id: "common.close",
|
||||
defaultMessage: "Close",
|
||||
})}
|
||||
<MaterialIcon
|
||||
|
||||
@@ -37,6 +37,7 @@ export default function NoAvailabilityAlert({
|
||||
(input.data?.booking.rooms.at(roomIndex)?.packages ?? []).length === 0
|
||||
? {
|
||||
title: intl.formatMessage({
|
||||
id: "booking.seeAlternativeHotels",
|
||||
defaultMessage: "See alternative hotels",
|
||||
}),
|
||||
url: `${alternativeHotels(lang)}`,
|
||||
@@ -46,6 +47,7 @@ export default function NoAvailabilityAlert({
|
||||
|
||||
if (noAvailableRooms) {
|
||||
const text = intl.formatMessage({
|
||||
id: "booking.noRoomsAvailable",
|
||||
defaultMessage: "There are no rooms available that match your request.",
|
||||
})
|
||||
return (
|
||||
@@ -53,6 +55,7 @@ export default function NoAvailabilityAlert({
|
||||
<Alert
|
||||
type={AlertTypeEnum.Info}
|
||||
heading={intl.formatMessage({
|
||||
id: "booking.noAvailability",
|
||||
defaultMessage: "No availability",
|
||||
})}
|
||||
text={text}
|
||||
@@ -81,6 +84,7 @@ export default function NoAvailabilityAlert({
|
||||
if (input.bookingCode && noAvailableBookingCodeRooms) {
|
||||
const bookingCodeText = intl.formatMessage(
|
||||
{
|
||||
id: "selectHotel.noAvailabilityForBookingCode",
|
||||
defaultMessage:
|
||||
"We found no available rooms using this booking code ({bookingCode}). See available rates below.",
|
||||
},
|
||||
@@ -92,6 +96,7 @@ export default function NoAvailabilityAlert({
|
||||
<Alert
|
||||
type={AlertTypeEnum.Info}
|
||||
heading={intl.formatMessage({
|
||||
id: "booking.noAvailability",
|
||||
defaultMessage: "No availability",
|
||||
})}
|
||||
text={bookingCodeText}
|
||||
|
||||
@@ -23,6 +23,7 @@ export default function PetRoomMessage({
|
||||
<p className={styles.additionalInformation}>
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: "selectRate.petRoom.feeMessage",
|
||||
defaultMessage:
|
||||
"Pet-friendly rooms include a charge of approx. <b>{price}/stay</b>",
|
||||
},
|
||||
|
||||
@@ -57,7 +57,10 @@ export function RoomPackagesForm({
|
||||
<div className={styles.buttonContainer}>
|
||||
<Typography variant="Body/Supporting text (caption)/smBold">
|
||||
<Button variant="Tertiary" size="Small" type="submit">
|
||||
{intl.formatMessage({ defaultMessage: "Apply" })}
|
||||
{intl.formatMessage({
|
||||
id: "common.apply",
|
||||
defaultMessage: "Apply",
|
||||
})}
|
||||
</Button>
|
||||
</Typography>
|
||||
<Typography variant="Body/Supporting text (caption)/smBold">
|
||||
@@ -67,6 +70,7 @@ export function RoomPackagesForm({
|
||||
variant="Text"
|
||||
>
|
||||
{intl.formatMessage({
|
||||
id: "common.clear",
|
||||
defaultMessage: "Clear",
|
||||
})}
|
||||
</Button>
|
||||
|
||||
@@ -37,7 +37,10 @@ export function RoomPackageFilterModal({
|
||||
return (
|
||||
<DialogTrigger isOpen={isOpen} onOpenChange={setIsOpen}>
|
||||
<ChipButton variant="Outlined">
|
||||
{intl.formatMessage({ defaultMessage: "Special needs" })}
|
||||
{intl.formatMessage({
|
||||
id: "booking.specialNeeds",
|
||||
defaultMessage: "Special needs",
|
||||
})}
|
||||
<MaterialIcon
|
||||
icon="keyboard_arrow_down"
|
||||
size={20}
|
||||
@@ -51,7 +54,10 @@ export function RoomPackageFilterModal({
|
||||
<div className={styles.header}>
|
||||
<Typography variant="Title/Subtitle/md">
|
||||
<h3>
|
||||
{intl.formatMessage({ defaultMessage: "Special needs" })}
|
||||
{intl.formatMessage({
|
||||
id: "booking.specialNeeds",
|
||||
defaultMessage: "Special needs",
|
||||
})}
|
||||
</h3>
|
||||
</Typography>
|
||||
<IconButton
|
||||
|
||||
@@ -30,7 +30,10 @@ export function RoomPackageFilterPopover({
|
||||
return (
|
||||
<DialogTrigger isOpen={isOpen} onOpenChange={setIsOpen}>
|
||||
<ChipButton variant="Outlined">
|
||||
{intl.formatMessage({ defaultMessage: "Special needs" })}
|
||||
{intl.formatMessage({
|
||||
id: "booking.specialNeeds",
|
||||
defaultMessage: "Special needs",
|
||||
})}
|
||||
<MaterialIcon
|
||||
icon="keyboard_arrow_down"
|
||||
size={20}
|
||||
|
||||
@@ -7,12 +7,15 @@ export const usePackageLabels = () => {
|
||||
|
||||
const labels: Record<RoomPackageCodeEnum, string> = {
|
||||
[RoomPackageCodeEnum.ALLERGY_ROOM]: intl.formatMessage({
|
||||
id: "roomPackage.allergyFriendlyRoom",
|
||||
defaultMessage: "Allergy-friendly room",
|
||||
}),
|
||||
[RoomPackageCodeEnum.PET_ROOM]: intl.formatMessage({
|
||||
id: "roomPackage.petFriendlyRoom",
|
||||
defaultMessage: "Pet-friendly room",
|
||||
}),
|
||||
[RoomPackageCodeEnum.ACCESSIBILITY_ROOM]: intl.formatMessage({
|
||||
id: "roomPackage.accessibleRoom",
|
||||
defaultMessage: "Accessible room",
|
||||
}),
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ function AvailableRoomCount({ roomIndex }: { roomIndex: number }) {
|
||||
|
||||
const notAllRoomsAvailableText = intl.formatMessage(
|
||||
{
|
||||
id: "selectRate.availableRooms.partial",
|
||||
defaultMessage:
|
||||
"{availableRooms}/{numberOfRooms, plural, one {# room type} other {# room types}} available",
|
||||
},
|
||||
@@ -59,6 +60,7 @@ function AvailableRoomCount({ roomIndex }: { roomIndex: number }) {
|
||||
|
||||
const allRoomsAvailableText = intl.formatMessage(
|
||||
{
|
||||
id: "selectRate.availableRooms.all",
|
||||
defaultMessage:
|
||||
"{numberOfRooms, plural, one {# room type} other {# room types}} available",
|
||||
},
|
||||
|
||||
@@ -30,6 +30,7 @@ export default function RoomSize({ roomSize }: RoomSizeProps) {
|
||||
<h4>
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: "common.roomSize",
|
||||
defaultMessage: "{roomSize} m²",
|
||||
},
|
||||
{ roomSize: roomSize.min }
|
||||
@@ -49,6 +50,7 @@ export default function RoomSize({ roomSize }: RoomSizeProps) {
|
||||
<h4>
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: "selectRate.roomSizeMinToMax",
|
||||
defaultMessage: "{roomSizeMin}–{roomSizeMax} m²",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@ export default function Details({ roomInfo }: Props) {
|
||||
{occupancy.max === occupancy.min
|
||||
? intl.formatMessage(
|
||||
{
|
||||
id: "selectRate.guests",
|
||||
defaultMessage:
|
||||
"{guests, plural, one {# guest} other {# guests}}",
|
||||
},
|
||||
@@ -34,6 +35,7 @@ export default function Details({ roomInfo }: Props) {
|
||||
)
|
||||
: intl.formatMessage(
|
||||
{
|
||||
id: "selectRate.minMaxGuests",
|
||||
defaultMessage: "{min}-{max} guests",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -34,15 +34,19 @@ export function BreakfastMessage({
|
||||
|
||||
const breakfastMessages = {
|
||||
included: intl.formatMessage({
|
||||
id: "selectRate.breakfastIsIncluded",
|
||||
defaultMessage: "Breakfast is included.",
|
||||
}),
|
||||
notIncluded: intl.formatMessage({
|
||||
id: "selectRate.breakfastExcludedAdd",
|
||||
defaultMessage: "Breakfast excluded, add in next step.",
|
||||
}),
|
||||
noSelection: intl.formatMessage({
|
||||
id: "selectRate.selectARate",
|
||||
defaultMessage: "Select a rate",
|
||||
}),
|
||||
scandicgo: intl.formatMessage({
|
||||
id: "selectRate.breakfastDealCanBePurchased",
|
||||
defaultMessage: "Breakfast deal can be purchased at the hotel.",
|
||||
}),
|
||||
}
|
||||
|
||||
@@ -88,15 +88,18 @@ function Inner({
|
||||
const intl = useIntl()
|
||||
const night = intl
|
||||
.formatMessage({
|
||||
id: "common.night",
|
||||
defaultMessage: "night",
|
||||
})
|
||||
.toUpperCase()
|
||||
|
||||
const standardPriceMsg = intl.formatMessage({
|
||||
id: "booking.standardPrice",
|
||||
defaultMessage: "Standard price",
|
||||
})
|
||||
|
||||
const memberPriceMsg = intl.formatMessage({
|
||||
id: "booking.memberPrice",
|
||||
defaultMessage: "Member price",
|
||||
})
|
||||
|
||||
@@ -142,6 +145,7 @@ function Inner({
|
||||
})
|
||||
|
||||
let bannerText = intl.formatMessage({
|
||||
id: "booking.campaign",
|
||||
defaultMessage: "Campaign",
|
||||
})
|
||||
if (product.bookingCode) {
|
||||
@@ -150,10 +154,12 @@ function Inner({
|
||||
|
||||
if (product.rateDefinition.breakfastIncluded) {
|
||||
bannerText = `${bannerText} ∙ ${intl.formatMessage({
|
||||
id: "booking.breakfastIncluded",
|
||||
defaultMessage: "Breakfast included",
|
||||
})}`
|
||||
} else {
|
||||
bannerText = `${bannerText} ∙ ${intl.formatMessage({
|
||||
id: "booking.breakfastExcluded",
|
||||
defaultMessage: "Breakfast excluded",
|
||||
})}`
|
||||
}
|
||||
@@ -198,6 +204,7 @@ function Inner({
|
||||
approximateRatePrice && product.public.requestedPrice
|
||||
? {
|
||||
label: intl.formatMessage({
|
||||
id: "booking.approx",
|
||||
defaultMessage: "Approx.",
|
||||
}),
|
||||
price: approximateRatePrice,
|
||||
@@ -273,6 +280,7 @@ function Inner({
|
||||
? {
|
||||
label: intl
|
||||
.formatMessage({
|
||||
id: "booking.lowestPrice",
|
||||
defaultMessage: "Lowest price (last 30 days)",
|
||||
})
|
||||
.toUpperCase(),
|
||||
|
||||
@@ -141,10 +141,12 @@ function useBannerText({
|
||||
|
||||
if (breakfastIncluded) {
|
||||
return `${bookingCode} ∙ ${intl.formatMessage({
|
||||
id: "booking.breakfastIncluded",
|
||||
defaultMessage: "Breakfast included",
|
||||
})}`
|
||||
} else {
|
||||
return `${bookingCode} ∙ ${intl.formatMessage({
|
||||
id: "booking.breakfastExcluded",
|
||||
defaultMessage: "Breakfast excluded",
|
||||
})}`
|
||||
}
|
||||
@@ -199,7 +201,10 @@ function CorporateChequeCode({
|
||||
|
||||
if (additionalPrice > 0) {
|
||||
approximateRate = {
|
||||
label: intl.formatMessage({ defaultMessage: "Approx." }),
|
||||
label: intl.formatMessage({
|
||||
id: "booking.approx",
|
||||
defaultMessage: "Approx.",
|
||||
}),
|
||||
price: `${base} CC + ${additionalPrice}`,
|
||||
unit: requestedPrice.currency,
|
||||
}
|
||||
@@ -260,6 +265,7 @@ function PublicCode({
|
||||
|
||||
const night = intl
|
||||
.formatMessage({
|
||||
id: "common.night",
|
||||
defaultMessage: "night",
|
||||
})
|
||||
.toUpperCase()
|
||||
@@ -277,6 +283,7 @@ function PublicCode({
|
||||
pricePerNight.totalRequestedPrice && requestedPrice?.currency
|
||||
? {
|
||||
label: intl.formatMessage({
|
||||
id: "booking.approx",
|
||||
defaultMessage: "Approx.",
|
||||
}),
|
||||
price: pricePerNight.totalRequestedPrice,
|
||||
@@ -348,6 +355,7 @@ function VoucherCode({
|
||||
|
||||
const voucherMsg = intl.formatMessage(
|
||||
{
|
||||
id: "price.numberOfVouchers",
|
||||
defaultMessage:
|
||||
"{numberOfVouchers, plural, one {Voucher} other {Vouchers}}",
|
||||
},
|
||||
|
||||
@@ -48,14 +48,17 @@ export default function Redemptions({
|
||||
}
|
||||
|
||||
const rewardNight = intl.formatMessage({
|
||||
id: "booking.rewardNight",
|
||||
defaultMessage: "Reward night",
|
||||
})
|
||||
const pkgsSum = sumPackages(selectedPackages)
|
||||
|
||||
const breakfastIncluded = intl.formatMessage({
|
||||
id: "booking.breakfastIncluded",
|
||||
defaultMessage: "Breakfast included",
|
||||
})
|
||||
const breakfastExcluded = intl.formatMessage({
|
||||
id: "booking.breakfastExcluded",
|
||||
defaultMessage: "Breakfast excluded",
|
||||
})
|
||||
|
||||
@@ -127,6 +130,7 @@ export default function Redemptions({
|
||||
selectedRate={selectedRateCode}
|
||||
isNotEnoughPoints={notEnoughPoints}
|
||||
notEnoughPointsText={intl.formatMessage({
|
||||
id: "booking.notEnoughPoints",
|
||||
defaultMessage: "Not enough points",
|
||||
})}
|
||||
/>
|
||||
|
||||
@@ -90,6 +90,7 @@ function Inner({
|
||||
|
||||
const night = intl
|
||||
.formatMessage({
|
||||
id: "common.night",
|
||||
defaultMessage: "night",
|
||||
})
|
||||
.toUpperCase()
|
||||
@@ -97,14 +98,17 @@ function Inner({
|
||||
const pkgsSumRequested = sumPackagesRequestedPrice(selectedPackages)
|
||||
|
||||
const standardPriceMsg = intl.formatMessage({
|
||||
id: "booking.standardPrice",
|
||||
defaultMessage: "Standard price",
|
||||
})
|
||||
|
||||
const memberPriceMsg = intl.formatMessage({
|
||||
id: "booking.memberPrice",
|
||||
defaultMessage: "Member price",
|
||||
})
|
||||
|
||||
const approxMsg = intl.formatMessage({
|
||||
id: "booking.approx",
|
||||
defaultMessage: "Approx.",
|
||||
})
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ export function useRateTitles() {
|
||||
const intl = useIntl()
|
||||
|
||||
const payNow = intl.formatMessage({
|
||||
id: "booking.payNow",
|
||||
defaultMessage: "Pay now",
|
||||
})
|
||||
|
||||
@@ -12,24 +13,29 @@ export function useRateTitles() {
|
||||
change: {
|
||||
paymentTerm: payNow,
|
||||
title: intl.formatMessage({
|
||||
id: "booking.freeRebooking",
|
||||
defaultMessage: "Free rebooking",
|
||||
}),
|
||||
},
|
||||
flex: {
|
||||
paymentTerm: intl.formatMessage({
|
||||
id: "booking.payLater",
|
||||
defaultMessage: "Pay later",
|
||||
}),
|
||||
title: intl.formatMessage({
|
||||
id: "booking.freeCancellation",
|
||||
defaultMessage: "Free cancellation",
|
||||
}),
|
||||
},
|
||||
save: {
|
||||
paymentTerm: payNow,
|
||||
title: intl.formatMessage({
|
||||
id: "booking.nonRefundable",
|
||||
defaultMessage: "Non-refundable",
|
||||
}),
|
||||
},
|
||||
noPriceAvailable: intl.formatMessage({
|
||||
id: "booking.noPricesAvailable",
|
||||
defaultMessage: "No prices available",
|
||||
}),
|
||||
}
|
||||
|
||||
@@ -62,6 +62,7 @@ const RoomImage = memo(function RoomImage({
|
||||
room={room}
|
||||
roomTypeCode={roomTypeCode}
|
||||
triggerLabel={intl.formatMessage({
|
||||
id: "hotel.seeRoomDetails",
|
||||
defaultMessage: "See room details",
|
||||
})}
|
||||
buttonVariant="secondary"
|
||||
@@ -88,6 +89,7 @@ function LowInventoryTag({ roomsLeft }: { roomsLeft: number }) {
|
||||
<p className={styles.inventory}>
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: "selectRate.roomsLeft",
|
||||
defaultMessage: "{amount, number} left",
|
||||
},
|
||||
{ amount: roomsLeft }
|
||||
|
||||
@@ -18,6 +18,7 @@ export default function RoomNotAvailable() {
|
||||
/>
|
||||
<Caption color="uiTextHighContrast" type="bold">
|
||||
{intl.formatMessage({
|
||||
id: "selectRate.thisRoomIsNotAvailable",
|
||||
defaultMessage: "This room is not available",
|
||||
})}
|
||||
</Caption>
|
||||
|
||||
@@ -83,12 +83,14 @@ function getErrorMessage(error: unknown, intl: ReturnType<typeof useIntl>) {
|
||||
case "TODATE_MUST_BE_AFTER_FROMDATE":
|
||||
case "FROMDATE_CANNOT_BE_IN_THE_PAST": {
|
||||
return intl.formatMessage({
|
||||
id: "selectRate.invalidDatesErrorMessage",
|
||||
defaultMessage: "Invalid dates",
|
||||
})
|
||||
}
|
||||
default:
|
||||
return intl.formatMessage({
|
||||
defaultMessage: "Something went wrong",
|
||||
id: "errorMessage.somethingWentWrong",
|
||||
defaultMessage: "Something went wrong!",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user