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:
Joakim Jäderberg
2025-10-22 11:00:03 +00:00
parent bdfe2ab213
commit aafad9781f
499 changed files with 93363 additions and 99164 deletions

View File

@@ -15,10 +15,12 @@ export function getErrorMessage(intl: IntlShape, errorCode?: string) {
switch (errorCode) {
case findMyBookingErrors.BOOKING_NUMBER_INVALID:
return intl.formatMessage({
id: "error.invalidBookingNumber",
defaultMessage: "Invalid booking number",
})
case findMyBookingErrors.BOOKING_NUMBER_REQUIRED:
return intl.formatMessage({
id: "error.invalidBookingNumber",
defaultMessage: "Invalid booking number",
})
case findMyBookingErrors.FIRST_NAME_REQUIRED:
@@ -26,11 +28,13 @@ export function getErrorMessage(intl: IntlShape, errorCode?: string) {
case multiroomErrors.FIRST_NAME_REQUIRED:
case roomOneErrors.FIRST_NAME_REQUIRED:
return intl.formatMessage({
id: "error.firstNameRequired",
defaultMessage: "First name is required",
})
case multiroomErrors.FIRST_NAME_SPECIAL_CHARACTERS:
case roomOneErrors.FIRST_NAME_SPECIAL_CHARACTERS:
return intl.formatMessage({
id: "error.firstNameSpecialCharacters",
defaultMessage: "First name can't contain any special characters",
})
case findMyBookingErrors.LAST_NAME_REQUIRED:
@@ -38,15 +42,18 @@ export function getErrorMessage(intl: IntlShape, errorCode?: string) {
case multiroomErrors.LAST_NAME_REQUIRED:
case roomOneErrors.LAST_NAME_REQUIRED:
return intl.formatMessage({
id: "error.lastNameRequired",
defaultMessage: "Last name is required",
})
case multiroomErrors.LAST_NAME_SPECIAL_CHARACTERS:
case roomOneErrors.LAST_NAME_SPECIAL_CHARACTERS:
return intl.formatMessage({
id: "error.lastNameSpecialCharacters",
defaultMessage: "Last name can't contain any special characters",
})
case multiroomErrors.FIRST_AND_LAST_NAME_UNIQUE:
return intl.formatMessage({
id: "error.firstAndLastNameUnique",
defaultMessage:
"First and last name can't be the same in two different rooms",
})
@@ -55,10 +62,12 @@ export function getErrorMessage(intl: IntlShape, errorCode?: string) {
case roomOneErrors.EMAIL_REQUIRED:
case signupErrors.EMAIL_REQUIRED:
return intl.formatMessage({
id: "error.emailRequired",
defaultMessage: "Email address is required",
})
case signupErrors.EMAIL_INVALID:
return intl.formatMessage({
id: "error.emailInvalid",
defaultMessage: "Email address is invalid",
})
case signupErrors.COUNTRY_REQUIRED:
@@ -66,6 +75,7 @@ export function getErrorMessage(intl: IntlShape, errorCode?: string) {
case roomOneErrors.COUNTRY_REQUIRED:
case editProfileErrors.COUNTRY_REQUIRED:
return intl.formatMessage({
id: "error.countryRequired",
defaultMessage: "Country is required",
})
case signupErrors.PHONE_REQUIRED:
@@ -73,10 +83,12 @@ export function getErrorMessage(intl: IntlShape, errorCode?: string) {
case roomOneErrors.PHONE_REQUIRED:
case editProfileErrors.PHONE_REQUIRED:
return intl.formatMessage({
id: "error.phoneRequired",
defaultMessage: "Phone is required",
})
case phoneErrors.PHONE_NUMBER_TOO_SHORT:
return intl.formatMessage({
id: "error.phoneNumberTooShort",
defaultMessage: "The number you have entered is too short",
})
case phoneErrors.PHONE_REQUESTED:
@@ -85,61 +97,74 @@ export function getErrorMessage(intl: IntlShape, errorCode?: string) {
case roomOneErrors.PHONE_REQUESTED:
case editProfileErrors.PHONE_REQUESTED:
return intl.formatMessage({
id: "error.phoneRequested",
defaultMessage: "Please enter a valid phone number",
})
case signupErrors.BIRTH_DATE_REQUIRED:
case roomOneErrors.BIRTH_DATE_REQUIRED:
return intl.formatMessage({
id: "error.birthDateRequired",
defaultMessage: "Date of birth is required",
})
case roomOneErrors.BIRTH_DATE_AGE_18:
return intl.formatMessage({
id: "error.atleast18YearsOld",
defaultMessage: "Must be at least 18 years of age to continue",
})
case roomOneErrors.ZIP_CODE_REQUIRED:
case editProfileErrors.ZIP_CODE_REQUIRED:
case signupErrors.ZIP_CODE_REQUIRED:
return intl.formatMessage({
id: "error.zipCodeRequired",
defaultMessage: "Zip code is required",
})
case roomOneErrors.ZIP_CODE_INVALID:
case editProfileErrors.ZIP_CODE_INVALID:
case signupErrors.ZIP_CODE_INVALID:
return intl.formatMessage({
id: "error.zipCodeInvalid",
defaultMessage: "The postal code can only contain numbers and letters",
})
case signupErrors.PASSWORD_REQUIRED:
return intl.formatMessage({
id: "error.passwordRequired",
defaultMessage: "Password is required",
})
case editProfileErrors.PASSWORD_NEW_REQUIRED:
return intl.formatMessage({
id: "error.passwordNewRequired",
defaultMessage: "New password is required",
})
case editProfileErrors.PASSWORD_RETYPE_NEW_REQUIRED:
return intl.formatMessage({
id: "error.passwordRetypeNewRequired",
defaultMessage: "Confirm your new password",
})
case editProfileErrors.PASSWORD_CURRENT_REQUIRED:
return intl.formatMessage({
id: "error.passwordCurrentRequired",
defaultMessage: "Current password is required",
})
case editProfileErrors.PASSWORD_NEW_NOT_MATCH:
return intl.formatMessage({
id: "error.passwordNewNotMatch",
defaultMessage: "Passwords do not match",
})
case multiroomErrors.MEMBERSHIP_NO_ONLY_DIGITS:
case roomOneErrors.MEMBERSHIP_NO_ONLY_DIGITS:
return intl.formatMessage({
id: "error.membershipNoOnlyDigits",
defaultMessage: "Only digits are allowed",
})
case multiroomErrors.MEMBERSHIP_NO_INVALID:
case roomOneErrors.MEMBERSHIP_NO_INVALID:
return intl.formatMessage({
id: "error.membershipNoInvalid",
defaultMessage: "Invalid membership number format",
})
case multiroomErrors.MEMBERSHIP_NO_UNIQUE:
return intl.formatMessage({
id: "error.membershipNotUniqueForMultipleRooms",
defaultMessage:
"Membership number can't be the same for two different rooms",
})

View File

@@ -18,6 +18,7 @@ export async function getDestinationCityPageDescription(
if (hotelCount === 1) {
const destinationCitySingleHotelDescription = intl.formatMessage(
{
id: "metadata.destinationCitySingleHotel",
defaultMessage:
"Discover our Scandic hotel in {location}. Start your day with a delicious breakfast before exploring {location}. Book your stay at a Scandic hotel now!",
},
@@ -28,6 +29,7 @@ export async function getDestinationCityPageDescription(
}
const destinationCityMultipleHotelDescription = intl.formatMessage(
{
id: "metadata.destinationCityMultipleHotels",
defaultMessage:
"Discover all our {hotelCount} Scandic hotels in {location}. Start your day with a delicious breakfast before exploring {location}. Book your stay at a Scandic hotel now!",
},
@@ -53,6 +55,7 @@ export async function getDestinationCountryPageDescription(
if (!hotelCount) {
destinationCountryDescription = intl.formatMessage(
{
id: "metadata.discoverLocation",
defaultMessage:
"Discover {location}. Enjoy your stay at a Scandic hotel. Book now!",
},
@@ -61,6 +64,7 @@ export async function getDestinationCountryPageDescription(
} else if (!cities || cities.length < 2) {
destinationCountryDescription = intl.formatMessage(
{
id: "metadata.discoverHotelsInLocation",
defaultMessage:
"Discover all our {hotelCount} Scandic hotels in {location}. Enjoy your stay at a Scandic hotel. Book now!",
},
@@ -69,6 +73,7 @@ export async function getDestinationCountryPageDescription(
} else {
destinationCountryDescription = intl.formatMessage(
{
id: "metadata.discoverHotelsInTwoCities",
defaultMessage:
"Discover all our {hotelCount} Scandic hotels in {location}. Explore {city1}, {city2}, and more! All while enjoying your stay at a Scandic hotel. Book now!",
},

View File

@@ -59,13 +59,17 @@ export async function getHotelPageDescription(data: RawMetadataSchema) {
if (!amenities || amenities.length < 4) {
return intl.formatMessage(
{ defaultMessage: "{hotelName} in {location}. Book your stay now!" },
{
id: "metadata.hotelInLocation",
defaultMessage: "{hotelName} in {location}. Book your stay now!",
},
{ hotelName, location }
)
}
const hotelDescription = intl.formatMessage(
{
id: "metadata.hotelInLocationWithAmenities",
defaultMessage:
"{hotelName} in {location} offers {amenity1} and {amenity2}. Guests can also enjoy {amenity3} and {amenity4}. Book your stay at {hotelName} today!",
},
@@ -80,6 +84,7 @@ export async function getHotelPageDescription(data: RawMetadataSchema) {
)
const shortHotelDescription = intl.formatMessage(
{
id: "metadata.hotelInLocationWithAmenitiesShort",
defaultMessage:
"{hotelName} in {location} offers {amenity1} and {amenity2}. Guests can also enjoy {amenity3} and {amenity4}.",
},

View File

@@ -21,12 +21,14 @@ export async function getDestinationPageTitle(
pageType === "country"
? intl.formatMessage(
{
id: "destination.destinationsInLocation",
defaultMessage: "Destinations in {location}",
},
{ location }
)
: intl.formatMessage(
{
id: "destination.hotelsInLocation",
defaultMessage: "Hotels in {location}",
},
{ location }

View File

@@ -16,6 +16,7 @@ async function getSubpageTitle(
if (restaurantSubPage) {
const restaurantTitleLong = intl.formatMessage(
{
id: "metadata.exploreRestaurantAtHotelInDestination",
defaultMessage:
"Explore {restaurantName} at {hotelName} in {destination}",
},
@@ -27,6 +28,7 @@ async function getSubpageTitle(
)
const restaurantTitleShort = intl.formatMessage(
{
id: "metadata.exploreRestaurantAtHotel",
defaultMessage: "Explore {restaurantName} at {hotelName}",
},
{
@@ -49,13 +51,17 @@ async function getSubpageTitle(
case additionalHotelData.hotelParking?.nameInUrl:
const parkingTitleLong = intl.formatMessage(
{
id: "metadata.parkingInformationForHotelInDestination",
defaultMessage:
"Parking information for {hotelName} in {destination}",
},
{ hotelName, destination }
)
const parkingTitleShort = intl.formatMessage(
{ defaultMessage: "Parking information for {hotelName}" },
{
id: "metadata.parkingInformationForHotel",
defaultMessage: "Parking information for {hotelName}",
},
{ hotelName }
)
@@ -66,13 +72,17 @@ async function getSubpageTitle(
case additionalHotelData.healthAndFitness?.nameInUrl:
const wellnessTitleLong = intl.formatMessage(
{
id: "metadata.gymAndHealthFacilitiesAtHotelInDestination",
defaultMessage:
"Gym & health facilities at {hotelName} in {destination}",
},
{ hotelName, destination }
)
const wellnessTitleShort = intl.formatMessage(
{ defaultMessage: "Gym & health facilities at {hotelName}" },
{
id: "metadata.gymAndHealthFacilitiesAtHotel",
defaultMessage: "Gym & health facilities at {hotelName}",
},
{ hotelName }
)
@@ -83,12 +93,17 @@ async function getSubpageTitle(
case additionalHotelData.hotelSpecialNeeds?.nameInUrl:
const accessibilityTitleLong = intl.formatMessage(
{
defaultMessage: "Accessibility at {hotelName} in {destination}",
id: "metadata.accessibilityInformationForHotelInDestination",
defaultMessage:
"Accessibility information for {hotelName} in {destination}",
},
{ hotelName, destination }
)
const accessibilityTitleShort = intl.formatMessage(
{ defaultMessage: "Accessibility at {hotelName}" },
{
id: "metadata.accessibilityInformationForHotel",
defaultMessage: "Accessibility information for {hotelName}",
},
{ hotelName }
)
@@ -99,13 +114,17 @@ async function getSubpageTitle(
case additionalHotelData.meetingRooms?.nameInUrl:
const meetingsTitleLong = intl.formatMessage(
{
id: "metadata.meetingsAndConferencesAtHotelInDestination",
defaultMessage:
"Meetings & conferences at {hotelName} in {destination}",
},
{ hotelName, destination }
)
const meetingsTitleShort = intl.formatMessage(
{ defaultMessage: "Meetings & conferences at {hotelName}" },
{
id: "metadata.meetingsAndConferencesAtHotel",
defaultMessage: "Meetings & conferences at {hotelName}",
},
{ hotelName }
)
@@ -141,7 +160,10 @@ export async function getHotelPageTitle(data: RawMetadataSchema) {
}
return intl.formatMessage(
{ defaultMessage: "Stay at {hotelName} | Hotel in {destination}" },
{
id: "metadata.stayAtHotelInDestination",
defaultMessage: "Stay at {hotelName} | Hotel in {destination}",
},
{ hotelName, destination }
)
}