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:
@@ -44,13 +44,16 @@ export default function BookingCode() {
|
||||
const [showRememberMobile, setShowRememberMobile] = useState(false)
|
||||
const codeError = errors["bookingCode"]?.value
|
||||
const codeVoucher = intl.formatMessage({
|
||||
id: "booking.codeVoucher",
|
||||
defaultMessage: "Code / Voucher",
|
||||
})
|
||||
const addCode = intl.formatMessage({
|
||||
id: "bookingWidget.bookingCode.add",
|
||||
defaultMessage: "Add code",
|
||||
})
|
||||
const ref = useRef<HTMLDivElement | null>(null)
|
||||
const removeExtraRoomsText = intl.formatMessage({
|
||||
id: "booking.removeExtraRooms",
|
||||
defaultMessage: "Remove extra rooms",
|
||||
})
|
||||
|
||||
@@ -195,6 +198,7 @@ export default function BookingCode() {
|
||||
>
|
||||
<span>
|
||||
{intl.formatMessage({
|
||||
id: "bookingWidget.bookingCode.remember",
|
||||
defaultMessage: "Remember code",
|
||||
})}
|
||||
</span>
|
||||
@@ -216,9 +220,11 @@ type CodeRememberProps = {
|
||||
function CodeRulesModal() {
|
||||
const intl = useIntl()
|
||||
const codeVoucher = intl.formatMessage({
|
||||
id: "booking.codeVoucher",
|
||||
defaultMessage: "Code / Voucher",
|
||||
})
|
||||
const bookingCodeTooltipText = intl.formatMessage({
|
||||
id: "bookingWidget.bookingCode.tooltip",
|
||||
defaultMessage:
|
||||
"If you're booking a promotional offer or a Corporate negotiated rate you'll need a special booking code. Don't use any special characters such as (.) (,) (-) (:). If you would like to make a booking with code VOF, please call us +46 8 517 517 20.Save your booking code for the next time you visit the page by ticking the box “Remember”. Don't tick the box if you're using a public computer to avoid unauthorized access to your booking code.",
|
||||
})
|
||||
@@ -252,6 +258,7 @@ function CodeRemember({ bookingCodeValue, onApplyClick }: CodeRememberProps) {
|
||||
<Typography variant={"Body/Supporting text (caption)/smRegular"}>
|
||||
<span>
|
||||
{intl.formatMessage({
|
||||
id: "bookingWidget.bookingCode.remember",
|
||||
defaultMessage: "Remember code",
|
||||
})}
|
||||
</span>
|
||||
@@ -266,6 +273,7 @@ function CodeRemember({ bookingCodeValue, onApplyClick }: CodeRememberProps) {
|
||||
onClick={onApplyClick}
|
||||
>
|
||||
{intl.formatMessage({
|
||||
id: "common.apply",
|
||||
defaultMessage: "Apply",
|
||||
})}
|
||||
</Button>
|
||||
@@ -326,6 +334,7 @@ function TabletBookingCode({
|
||||
} = useFormContext<BookingWidgetSchema>()
|
||||
const codeError = errors["bookingCode"]?.value
|
||||
const codeVoucher = intl.formatMessage({
|
||||
id: "booking.codeVoucher",
|
||||
defaultMessage: "Code / Voucher",
|
||||
})
|
||||
|
||||
@@ -381,6 +390,7 @@ function TabletBookingCode({
|
||||
<div className={styles.popover}>
|
||||
<BookingFlowInput
|
||||
label={intl.formatMessage({
|
||||
id: "bookingWidget.bookingCode.add",
|
||||
defaultMessage: "Add code",
|
||||
})}
|
||||
{...register("bookingCode.value", {
|
||||
|
||||
@@ -29,6 +29,7 @@ export function RemoveExtraRooms({ ...props }: ButtonProps) {
|
||||
{...props}
|
||||
>
|
||||
{intl.formatMessage({
|
||||
id: "booking.removeExtraRooms",
|
||||
defaultMessage: "Remove extra rooms",
|
||||
})}
|
||||
</Button>
|
||||
|
||||
@@ -155,10 +155,12 @@ function getRewardMessage(config: BookingFlowConfig, intl: IntlShape): string {
|
||||
switch (config.variant) {
|
||||
case "partner-sas":
|
||||
return intl.formatMessage({
|
||||
id: "partnerSas.bookingWidget.reward.eurobonus",
|
||||
defaultMessage: "EuroBonus points",
|
||||
})
|
||||
case "scandic":
|
||||
return intl.formatMessage({
|
||||
id: "bookingWidget.reward.rewardNight",
|
||||
defaultMessage: "Reward Night",
|
||||
})
|
||||
}
|
||||
@@ -175,11 +177,13 @@ function getRewardNightTooltipMessage(
|
||||
switch (config.variant) {
|
||||
case "partner-sas":
|
||||
return intl.formatMessage({
|
||||
id: "partnerSas.bookingWidget.reward.toolTip",
|
||||
defaultMessage:
|
||||
"To book with EuroBonus points, make sure you're logged into your SAS EuroBonus account.",
|
||||
})
|
||||
case "scandic":
|
||||
return intl.formatMessage({
|
||||
id: "bookingWidget.reward.toolTip",
|
||||
defaultMessage:
|
||||
"To book a reward night, make sure you're logged in to your Scandic Friends account.",
|
||||
})
|
||||
|
||||
@@ -44,6 +44,7 @@ export default function ClearSearchButton({
|
||||
<Caption color="burgundy" type="bold" asChild>
|
||||
<span>
|
||||
{intl.formatMessage({
|
||||
id: "bookingWidget.search.clearSearches",
|
||||
defaultMessage: "Clear searches",
|
||||
})}
|
||||
</span>
|
||||
|
||||
@@ -102,9 +102,11 @@ export default function SearchList({
|
||||
<SearchListError
|
||||
getMenuProps={getMenuProps}
|
||||
caption={intl.formatMessage({
|
||||
id: "bookingWidget.validationError.destination",
|
||||
defaultMessage: "Enter destination or hotel",
|
||||
})}
|
||||
body={intl.formatMessage({
|
||||
id: "bookingWidget.validationError.destinationDesc",
|
||||
defaultMessage:
|
||||
"A destination or hotel name is needed to be able to search for a hotel room.",
|
||||
})}
|
||||
@@ -117,9 +119,11 @@ export default function SearchList({
|
||||
<SearchListError
|
||||
getMenuProps={getMenuProps}
|
||||
caption={intl.formatMessage({
|
||||
id: "bookingWidget.searchList.noResults",
|
||||
defaultMessage: "No results",
|
||||
})}
|
||||
body={intl.formatMessage({
|
||||
id: "bookingWidget.searchList.noResultsDesc",
|
||||
defaultMessage:
|
||||
"We couldn't find a matching location for your search.",
|
||||
})}
|
||||
@@ -133,9 +137,11 @@ export default function SearchList({
|
||||
<SearchListError
|
||||
getMenuProps={getMenuProps}
|
||||
caption={intl.formatMessage({
|
||||
id: "bookingWidget.searchList.unableToSearch",
|
||||
defaultMessage: "Unable to search",
|
||||
})}
|
||||
body={intl.formatMessage({
|
||||
id: "bookingWidget.searchList.unableToSearchDesc",
|
||||
defaultMessage:
|
||||
"An error occurred while searching, please try again.",
|
||||
})}
|
||||
@@ -168,11 +174,13 @@ export default function SearchList({
|
||||
<Dialog getMenuProps={getMenuProps} variant="error">
|
||||
<Body className={styles.text} textTransform="bold">
|
||||
{intl.formatMessage({
|
||||
id: "bookingWidget.searchList.noResults",
|
||||
defaultMessage: "No results",
|
||||
})}
|
||||
</Body>
|
||||
<Body className={styles.text} color="uiTextPlaceholder">
|
||||
{intl.formatMessage({
|
||||
id: "bookingWidget.searchList.noResultsDesc",
|
||||
defaultMessage:
|
||||
"We couldn't find a matching location for your search.",
|
||||
})}
|
||||
@@ -186,6 +194,7 @@ export default function SearchList({
|
||||
textTransform="uppercase"
|
||||
>
|
||||
{intl.formatMessage({
|
||||
id: "bookingWidget.searchList.latestSearches",
|
||||
defaultMessage: "Latest searches",
|
||||
})}
|
||||
</Footnote>
|
||||
@@ -215,6 +224,7 @@ export default function SearchList({
|
||||
<Dialog getMenuProps={getMenuProps}>
|
||||
<Footnote color="uiTextPlaceholder" textTransform="uppercase">
|
||||
{intl.formatMessage({
|
||||
id: "bookingWidget.searchList.latestSearches",
|
||||
defaultMessage: "Latest searches",
|
||||
})}
|
||||
</Footnote>
|
||||
@@ -244,6 +254,7 @@ export default function SearchList({
|
||||
getItemProps={getItemProps}
|
||||
highlightedIndex={highlightedIndex}
|
||||
label={intl.formatMessage({
|
||||
id: "bookingWidget.searchList.countries",
|
||||
defaultMessage: "Countries",
|
||||
})}
|
||||
locations={autocompleteData?.hits.countries ?? []}
|
||||
@@ -253,6 +264,7 @@ export default function SearchList({
|
||||
highlightedIndex={highlightedIndex}
|
||||
initialIndex={autocompleteData?.hits.countries.length ?? 0}
|
||||
label={intl.formatMessage({
|
||||
id: "bookingWidget.searchList.cities",
|
||||
defaultMessage: "Cities",
|
||||
})}
|
||||
locations={autocompleteData?.hits.cities ?? []}
|
||||
@@ -265,6 +277,7 @@ export default function SearchList({
|
||||
(autocompleteData?.hits.cities.length ?? 0)
|
||||
}
|
||||
label={intl.formatMessage({
|
||||
id: "bookingWidget.searchList.hotels",
|
||||
defaultMessage: "Hotels",
|
||||
})}
|
||||
locations={autocompleteData?.hits.hotels ?? []}
|
||||
|
||||
@@ -128,7 +128,10 @@ export function Search({
|
||||
>
|
||||
<Typography variant="Body/Supporting text (caption)/smBold">
|
||||
<span>
|
||||
{intl.formatMessage({ defaultMessage: "Where to?" })}
|
||||
{intl.formatMessage({
|
||||
id: "bookingWidget.label.whereTo",
|
||||
defaultMessage: "Where to?",
|
||||
})}
|
||||
</span>
|
||||
</Typography>
|
||||
<div
|
||||
@@ -146,6 +149,7 @@ export function Search({
|
||||
openMenu()
|
||||
},
|
||||
placeholder: intl.formatMessage({
|
||||
id: "booking.hotelsAndDestinations",
|
||||
defaultMessage: "Hotels & Destinations",
|
||||
}),
|
||||
value: searchTerm,
|
||||
@@ -175,7 +179,10 @@ export function Search({
|
||||
<Button
|
||||
variant="Text"
|
||||
size="Small"
|
||||
aria-label={intl.formatMessage({ defaultMessage: "Clear" })}
|
||||
aria-label={intl.formatMessage({
|
||||
id: "common.clear",
|
||||
defaultMessage: "Clear",
|
||||
})}
|
||||
onPress={() => {
|
||||
setValue(SEARCH_TERM_NAME, "")
|
||||
}}
|
||||
@@ -207,7 +214,10 @@ export function Search({
|
||||
<Typography variant="Body/Supporting text (caption)/smBold">
|
||||
<span>
|
||||
<MaterialIcon icon="search" color="CurrentColor" />
|
||||
{intl.formatMessage({ defaultMessage: "Search" })}
|
||||
{intl.formatMessage({
|
||||
id: "bookingWidget.button.search",
|
||||
defaultMessage: "Search",
|
||||
})}
|
||||
</span>
|
||||
</Typography>
|
||||
</Button>
|
||||
@@ -237,7 +247,12 @@ export function SearchSkeleton() {
|
||||
<div className={styles.container}>
|
||||
<div className={`${styles.label} ${styles.red}`}>
|
||||
<Typography variant="Body/Supporting text (caption)/smBold">
|
||||
<span>{intl.formatMessage({ defaultMessage: "Where to?" })}</span>
|
||||
<span>
|
||||
{intl.formatMessage({
|
||||
id: "bookingWidget.label.whereTo",
|
||||
defaultMessage: "Where to?",
|
||||
})}
|
||||
</span>
|
||||
</Typography>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -17,11 +17,13 @@ export default function ValidationError() {
|
||||
size={20}
|
||||
/>
|
||||
{intl.formatMessage({
|
||||
id: "bookingWidget.validationError.destination",
|
||||
defaultMessage: "Enter destination or hotel",
|
||||
})}
|
||||
</Caption>
|
||||
<Caption className={styles.message} type="regular">
|
||||
{intl.formatMessage({
|
||||
id: "bookingWidget.validationError.destinationDesc",
|
||||
defaultMessage:
|
||||
"A destination or hotel name is needed to be able to search for a hotel room.",
|
||||
})}
|
||||
|
||||
@@ -31,10 +31,12 @@ export function VoucherSkeleton() {
|
||||
const config = useBookingFlowConfig()
|
||||
|
||||
const vouchers = intl.formatMessage({
|
||||
id: "booking.codeVoucher",
|
||||
defaultMessage: "Code / Voucher",
|
||||
})
|
||||
const reward = intl.formatMessage({
|
||||
defaultMessage: "Reward Night",
|
||||
id: "booking.rewardNight",
|
||||
defaultMessage: "Reward night",
|
||||
})
|
||||
|
||||
return (
|
||||
|
||||
@@ -72,12 +72,14 @@ export default function FormContent({
|
||||
{nights > 0
|
||||
? intl.formatMessage(
|
||||
{
|
||||
id: "booking.numberOfNights",
|
||||
defaultMessage:
|
||||
"{totalNights, plural, one {# night} other {# nights}}",
|
||||
},
|
||||
{ totalNights: nights }
|
||||
)
|
||||
: intl.formatMessage({
|
||||
id: "bookingWidget.label.checkIn",
|
||||
defaultMessage: "Check in",
|
||||
})}
|
||||
</label>
|
||||
@@ -91,6 +93,7 @@ export default function FormContent({
|
||||
>
|
||||
<label id="rooms-and-guests">
|
||||
{intl.formatMessage({
|
||||
id: "bookingWidget.label.roomsAndGuests",
|
||||
defaultMessage: "Rooms & Guests",
|
||||
})}
|
||||
</label>
|
||||
@@ -135,8 +138,14 @@ export default function FormContent({
|
||||
>
|
||||
<span>
|
||||
{isDirty && isBookingFlow
|
||||
? intl.formatMessage({ defaultMessage: "Update" })
|
||||
: intl.formatMessage({ defaultMessage: "Search" })}
|
||||
? intl.formatMessage({
|
||||
id: "bookingWidget.button.update",
|
||||
defaultMessage: "Update",
|
||||
})
|
||||
: intl.formatMessage({
|
||||
id: "bookingWidget.button.search",
|
||||
defaultMessage: "Search",
|
||||
})}
|
||||
</span>
|
||||
</Typography>
|
||||
<span className={styles.icon}>
|
||||
@@ -165,6 +174,7 @@ export function BookingWidgetFormContentSkeleton() {
|
||||
<label>
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: "booking.numberOfNights",
|
||||
defaultMessage:
|
||||
"{totalNights, plural, one {# night} other {# nights}}",
|
||||
},
|
||||
@@ -181,6 +191,7 @@ export function BookingWidgetFormContentSkeleton() {
|
||||
>
|
||||
<label id="rooms-and-guests">
|
||||
{intl.formatMessage({
|
||||
id: "bookingWidget.label.roomsAndGuests",
|
||||
defaultMessage: "Rooms & Guests",
|
||||
})}
|
||||
</label>
|
||||
@@ -212,6 +223,7 @@ export function BookingWidgetFormContentSkeleton() {
|
||||
>
|
||||
<span>
|
||||
{intl.formatMessage({
|
||||
id: "bookingWidget.button.search",
|
||||
defaultMessage: "Search",
|
||||
})}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user