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:
@@ -20,6 +20,7 @@ export default function AdultSelector({
|
||||
const name = `rooms.${roomIndex}.adults`
|
||||
const intl = useIntl()
|
||||
const adultsLabel = intl.formatMessage({
|
||||
id: "common.adults",
|
||||
defaultMessage: "Adults",
|
||||
})
|
||||
const { setValue } = useFormContext()
|
||||
|
||||
@@ -42,12 +42,15 @@ export default function ChildInfoSelector({
|
||||
const bedFieldName = `rooms.${roomIndex}.childrenInRoom.${index}.bed`
|
||||
const intl = useIntl()
|
||||
const ageLabel = intl.formatMessage({
|
||||
id: "bookingWidget.child.age",
|
||||
defaultMessage: "Age",
|
||||
})
|
||||
const bedLabel = intl.formatMessage({
|
||||
id: "booking.bedPreference",
|
||||
defaultMessage: "Bed preference",
|
||||
})
|
||||
const errorMessage = intl.formatMessage({
|
||||
id: "bookingWidget.child.ageRequiredError",
|
||||
defaultMessage: "Child age is required",
|
||||
})
|
||||
const { setValue, formState } = useFormContext()
|
||||
@@ -65,18 +68,21 @@ export default function ChildInfoSelector({
|
||||
const allBedTypes: ChildBed[] = [
|
||||
{
|
||||
label: intl.formatMessage({
|
||||
id: "bookingWidget.child.inAdultsBed",
|
||||
defaultMessage: "In adult's bed",
|
||||
}),
|
||||
value: ChildBedMapEnum.IN_ADULTS_BED,
|
||||
},
|
||||
{
|
||||
label: intl.formatMessage({
|
||||
id: "bookingWidget.child.inCrib",
|
||||
defaultMessage: "In crib",
|
||||
}),
|
||||
value: ChildBedMapEnum.IN_CRIB,
|
||||
},
|
||||
{
|
||||
label: intl.formatMessage({
|
||||
id: "bookingWidget.child.inExtraBed",
|
||||
defaultMessage: "In extra bed",
|
||||
}),
|
||||
value: ChildBedMapEnum.IN_EXTRA_BED,
|
||||
|
||||
@@ -26,6 +26,7 @@ export default function ChildSelector({
|
||||
}: ChildSelectorProps) {
|
||||
const intl = useIntl()
|
||||
const childrenLabel = intl.formatMessage({
|
||||
id: "common.children",
|
||||
defaultMessage: "Children",
|
||||
})
|
||||
const { setValue } = useFormContext()
|
||||
|
||||
@@ -35,24 +35,29 @@ export default function GuestsRoomsPickerDialog({
|
||||
useFormContext<BookingWidgetSchema>()
|
||||
const roomsValue = useWatch<BookingWidgetSchema, "rooms">({ name: "rooms" })
|
||||
const addRoomLabel = intl.formatMessage({
|
||||
id: "bookingWidget.roomsPicker.addRoom",
|
||||
defaultMessage: "Add room",
|
||||
})
|
||||
const doneLabel = intl.formatMessage({
|
||||
id: "bookingWidget.roomsPicker.done",
|
||||
defaultMessage: "Done",
|
||||
})
|
||||
// Disable add room if booking code is either voucher or corporate cheque, or reward night is enabled
|
||||
const addRoomDisabledTextForSpecialRate = getValues(SEARCH_TYPE_REDEMPTION)
|
||||
? config.variant === "partner-sas"
|
||||
? intl.formatMessage({
|
||||
id: "partnerSas.bookingWidget.roomsPicker.disabled",
|
||||
defaultMessage:
|
||||
"Multi-room booking is not available with EuroBonus points.",
|
||||
})
|
||||
: intl.formatMessage({
|
||||
id: "error.multiroomRewardNightUnavailable",
|
||||
defaultMessage:
|
||||
"Multi-room booking is not available with reward night.",
|
||||
})
|
||||
: getValues("bookingCode.value")?.toLowerCase().startsWith("vo") &&
|
||||
intl.formatMessage({
|
||||
id: "error.multiroomBookingCodeUnavailable",
|
||||
defaultMessage:
|
||||
"Multi-room booking is not available with this booking code.",
|
||||
})
|
||||
|
||||
@@ -25,6 +25,7 @@ export function GuestsRoom({
|
||||
const intl = useIntl()
|
||||
const roomLabel = intl.formatMessage(
|
||||
{
|
||||
id: "booking.roomIndex",
|
||||
defaultMessage: "Room {roomIndex}",
|
||||
},
|
||||
{
|
||||
@@ -61,6 +62,7 @@ export function GuestsRoom({
|
||||
>
|
||||
<MaterialIcon icon="delete" color="CurrentColor" />
|
||||
{intl.formatMessage({
|
||||
id: "bookingWidget.roomsPicker.removeRoom",
|
||||
defaultMessage: "Remove room",
|
||||
})}
|
||||
</Button>
|
||||
|
||||
@@ -146,15 +146,17 @@ function Trigger({
|
||||
const parts = [
|
||||
intl.formatMessage(
|
||||
{
|
||||
id: "booking.numberOfRooms",
|
||||
defaultMessage: "{totalRooms, plural, one {# room} other {# rooms}}",
|
||||
},
|
||||
{ totalRooms: rooms.length }
|
||||
),
|
||||
intl.formatMessage(
|
||||
{
|
||||
defaultMessage: "{totalAdults, plural, one {# adult} other {# adults}}",
|
||||
id: "booking.numberOfAdults",
|
||||
defaultMessage: "{adults, plural, one {# adult} other {# adults}}",
|
||||
},
|
||||
{ totalAdults: rooms.reduce((acc, room) => acc + room.adults, 0) }
|
||||
{ adults: rooms.reduce((acc, room) => acc + room.adults, 0) }
|
||||
),
|
||||
]
|
||||
|
||||
@@ -162,11 +164,12 @@ function Trigger({
|
||||
parts.push(
|
||||
intl.formatMessage(
|
||||
{
|
||||
id: "booking.numberOfChildren",
|
||||
defaultMessage:
|
||||
"{totalChildren, plural, one {# child} other {# children}}",
|
||||
"{children, plural, one {# child} other {# children}}",
|
||||
},
|
||||
{
|
||||
totalChildren: rooms.reduce(
|
||||
children: rooms.reduce(
|
||||
(acc, room) => acc + room.childrenInRoom.length,
|
||||
0
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user