fix(i18n): prepare for Lokalise
This commit is contained in:
@@ -16,8 +16,22 @@ export default function CheckinCheckOut({ checkin }: CheckInCheckOutProps) {
|
||||
variant="sidepeek"
|
||||
>
|
||||
<Body textTransform="bold">{intl.formatMessage({ id: "Hours" })}</Body>
|
||||
<Body>{`${intl.formatMessage({ id: "Check in from" })}: ${checkin.checkInTime}`}</Body>
|
||||
<Body>{`${intl.formatMessage({ id: "Check out at latest" })}: ${checkin.checkOutTime}`}</Body>
|
||||
<Body>
|
||||
{intl.formatMessage(
|
||||
{ id: "Check in from: {checkInTime}" },
|
||||
{
|
||||
checkInTime: checkin.checkInTime,
|
||||
}
|
||||
)}
|
||||
</Body>
|
||||
<Body>
|
||||
{intl.formatMessage(
|
||||
{ id: "Check out at latest: {checkOutTime}" },
|
||||
{
|
||||
checkOutTime: checkin.checkOutTime,
|
||||
}
|
||||
)}
|
||||
</Body>
|
||||
</AccordionItem>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import { IconName } from "@/types/components/icon"
|
||||
|
||||
export default function Parking({ parking }: ParkingProps) {
|
||||
const intl = useIntl()
|
||||
|
||||
return (
|
||||
<AccordionItem
|
||||
title={intl.formatMessage({ id: "Parking" })}
|
||||
@@ -18,39 +19,48 @@ export default function Parking({ parking }: ParkingProps) {
|
||||
className={styles.parking}
|
||||
variant="sidepeek"
|
||||
>
|
||||
{parking.map((p) => (
|
||||
<div key={p.name}>
|
||||
<Subtitle type="two">
|
||||
{`${intl.formatMessage({ id: p.type })} ${p?.name ? ` (${p.name})` : ""}`}
|
||||
</Subtitle>
|
||||
<ul className={styles.list}>
|
||||
{p?.address && (
|
||||
<li>
|
||||
<FilledHeartIcon color="baseIconLowContrast" />
|
||||
{`${intl.formatMessage({ id: "Address" })}: ${p.address}`}
|
||||
</li>
|
||||
)}
|
||||
{p?.numberOfParkingSpots !== undefined && (
|
||||
<li>
|
||||
<FilledHeartIcon color="baseIconLowContrast" />
|
||||
{intl.formatMessage(
|
||||
{ id: "Number of parking spots" },
|
||||
{ number: p.numberOfParkingSpots }
|
||||
)}
|
||||
</li>
|
||||
)}
|
||||
{p?.numberOfChargingSpaces !== undefined && (
|
||||
<li>
|
||||
<FilledHeartIcon color="baseIconLowContrast" />
|
||||
{intl.formatMessage(
|
||||
{ id: "Number of charging points for electric cars" },
|
||||
{ number: p.numberOfChargingSpaces }
|
||||
)}
|
||||
</li>
|
||||
)}
|
||||
</ul>
|
||||
</div>
|
||||
))}
|
||||
{parking.map((p) => {
|
||||
const title = `${p.type}${p.name ? ` (${p.name})` : ""}`
|
||||
|
||||
return (
|
||||
<div key={p.name}>
|
||||
<Subtitle type="two">{title}</Subtitle>
|
||||
<ul className={styles.list}>
|
||||
{p.address !== undefined && (
|
||||
<li>
|
||||
<FilledHeartIcon color="baseIconLowContrast" />$
|
||||
{intl.formatMessage(
|
||||
{ id: "Address: {address}" },
|
||||
{
|
||||
address: p.address,
|
||||
}
|
||||
)}
|
||||
</li>
|
||||
)}
|
||||
{p.numberOfParkingSpots !== undefined && (
|
||||
<li>
|
||||
<FilledHeartIcon color="baseIconLowContrast" />
|
||||
{intl.formatMessage(
|
||||
{ id: "Number of parking spots: {number}" },
|
||||
{ number: p.numberOfParkingSpots }
|
||||
)}
|
||||
</li>
|
||||
)}
|
||||
{p.numberOfChargingSpaces !== undefined && (
|
||||
<li>
|
||||
<FilledHeartIcon color="baseIconLowContrast" />
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: "Number of charging points for electric cars: {number}",
|
||||
},
|
||||
{ number: p.numberOfChargingSpaces }
|
||||
)}
|
||||
</li>
|
||||
)}
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</AccordionItem>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -13,7 +13,12 @@ export default function Restaurant({
|
||||
|
||||
return (
|
||||
<AccordionItem
|
||||
title={intl.formatMessage({ id: "Restaurant" }, { count: 1 })}
|
||||
title={intl.formatMessage(
|
||||
{
|
||||
id: "{totalRestaurants, plural, one {Restaurant} other {Restaurants}}",
|
||||
},
|
||||
{ totalRestaurants: 1 }
|
||||
)}
|
||||
icon={IconName.Restaurant}
|
||||
variant="sidepeek"
|
||||
>
|
||||
|
||||
@@ -21,6 +21,7 @@ export default function RoomSidePeek({
|
||||
const intl = useIntl()
|
||||
|
||||
const roomSize = room.roomSize
|
||||
const totalOccupancy = room.occupancy
|
||||
const roomDescription = room.descriptions.medium
|
||||
const images = room.images
|
||||
|
||||
@@ -34,13 +35,27 @@ export default function RoomSidePeek({
|
||||
<div className={styles.mainContent}>
|
||||
<Body color="baseTextMediumContrast">
|
||||
{roomSize.min === roomSize.max
|
||||
? roomSize.min
|
||||
: `${roomSize.min} - ${roomSize.max}`}
|
||||
m².{" "}
|
||||
{intl.formatMessage(
|
||||
{ id: "booking.accommodatesUpTo" },
|
||||
{ max: room.totalOccupancy.max, range: room.totalOccupancy.range }
|
||||
)}
|
||||
? intl.formatMessage(
|
||||
{
|
||||
id: "{roomSize} m². Accommodates up to {max, plural, one {{range} person} other {{range} people}}",
|
||||
},
|
||||
{
|
||||
roomSize: roomSize.min,
|
||||
max: room.totalOccupancy.max,
|
||||
range: room.totalOccupancy.range,
|
||||
}
|
||||
)
|
||||
: intl.formatMessage(
|
||||
{
|
||||
id: "{roomSizeMin} - {roomSizeMax} m². Accommodates up to {max, plural, one {{range} person} other {{range} people}}",
|
||||
},
|
||||
{
|
||||
roomSizeMin: roomSize.min,
|
||||
roomSizeMax: roomSize.max,
|
||||
max: room.totalOccupancy.max,
|
||||
range: room.totalOccupancy.range,
|
||||
}
|
||||
)}
|
||||
</Body>
|
||||
<div className={styles.imageContainer}>
|
||||
<ImageGallery images={images} title={room.name} height={280} />
|
||||
@@ -49,7 +64,7 @@ export default function RoomSidePeek({
|
||||
</div>
|
||||
<div className={styles.listContainer}>
|
||||
<Subtitle type="two" color="uiTextHighContrast">
|
||||
{intl.formatMessage({ id: "booking.thisRoomIsEquippedWith" })}
|
||||
{intl.formatMessage({ id: "This room is equipped with" })}
|
||||
</Subtitle>
|
||||
<ul className={styles.facilityList}>
|
||||
{room.roomFacilities
|
||||
@@ -79,10 +94,10 @@ export default function RoomSidePeek({
|
||||
</div>
|
||||
<div className={styles.listContainer}>
|
||||
<Subtitle type="two" color="uiTextHighContrast">
|
||||
{intl.formatMessage({ id: "booking.bedOptions" })}
|
||||
{intl.formatMessage({ id: "Bed options" })}
|
||||
</Subtitle>
|
||||
<Body color="grey">
|
||||
{intl.formatMessage({ id: "booking.basedOnAvailability" })}
|
||||
{intl.formatMessage({ id: "Based on availability" })}
|
||||
</Body>
|
||||
<ul className={styles.bedOptions}>
|
||||
{room.roomTypes.map((roomType) => {
|
||||
|
||||
Reference in New Issue
Block a user