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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user