From 440e1f92df62d26dd7e3d2e526a312cf17e9b92d Mon Sep 17 00:00:00 2001 From: Michael Zetterberg Date: Fri, 7 Feb 2025 06:51:36 +0100 Subject: [PATCH] feat(SW-706): make eslint rule 'formatjs/no-literal-string-in-jsx' pass --- apps/scandic-web/.eslintrc.json | 6 +- apps/scandic-web/actions/editProfile.ts | 16 ++- .../my-pages/@breadcrumbs/[...path]/error.tsx | 4 +- .../(protected)/my-pages/[...path]/error.tsx | 4 +- .../(protected)/my-pages/[...path]/page.tsx | 6 +- .../destination_overview_page/[uid]/error.tsx | 4 +- .../(standard)/details/page.tsx | 11 +- .../hotelreservation/(standard)/page.tsx | 1 + apps/scandic-web/app/[lang]/(live)/error.tsx | 4 +- apps/scandic-web/app/[lang]/(live)/layout.tsx | 1 + .../(live)/middleware-error/[status]/page.tsx | 3 +- .../app/[lang]/(live-current)/layout.tsx | 2 + .../app/[lang]/(no-layout)/layout.tsx | 1 + .../components/AlreadyLinkedError.tsx | 13 ++- .../components/DateOfBirthError.tsx | 13 ++- .../components/FailedAttemptsError.tsx | 10 +- .../sas-x-scandic/components/SASModal.tsx | 15 ++- .../components/TooManyCodesError.tsx | 10 +- .../components/TooManyFailedAttemptsError.tsx | 10 +- .../(sas)/(protected)/sas-x-scandic/error.tsx | 4 +- .../(protected)/sas-x-scandic/error/page.tsx | 5 +- .../(protected)/sas-x-scandic/layout.tsx | 16 ++- .../sas-x-scandic/link/LinkAccountForm.tsx | 29 +++-- .../sas-x-scandic/link/success/page.tsx | 10 +- .../(protected)/sas-x-scandic/login/page.tsx | 18 ++- .../sas-x-scandic/otp/OneTimePasswordForm.tsx | 16 ++- .../(protected)/sas-x-scandic/otp/loading.tsx | 2 +- .../(protected)/sas-x-scandic/otp/page.tsx | 15 ++- .../sas-x-scandic/transfer/success/page.tsx | 47 ++++++-- .../sas-x-scandic/unlink/success/page.tsx | 8 +- .../app/[lang]/(partner)/layout.tsx | 1 + .../webview/[contentType]/[uid]/page.tsx | 20 +++- .../scandic-web/app/[lang]/webview/layout.tsx | 1 + apps/scandic-web/app/global-error.tsx | 6 +- .../DynamicContent/HowItWorks/index.tsx | 6 +- .../JobylonFeed/JobList/Filter/index.tsx | 28 +++-- .../JobylonFeed/JobList/index.tsx | 30 ++++- .../JobylonFeed/JobylonCard/index.tsx | 12 +- .../DynamicContent/LoyaltyLevels/index.tsx | 11 +- .../Overview/Buttons/CopyButton.tsx | 10 +- .../Friend/MembershipNumber/index.tsx | 9 +- .../DynamicContent/Overview/Friend/index.tsx | 8 +- .../Overview/Stats/ExpiringPoints/index.tsx | 4 +- .../Overview/Stats/Points/index.tsx | 16 ++- .../DynamicContent/OverviewTable/Client.tsx | 16 ++- .../OverviewTable/LevelSummary/index.tsx | 7 +- .../OverviewTable/YourLevelScript/index.tsx | 4 +- .../Points/EarnAndBurn/AwardPoints/index.tsx | 4 +- .../JourneyTable/ClientTable/Row/index.tsx | 28 +++-- .../JourneyTable/ClientTable/index.tsx | 20 +++- .../ExpiringPointsTable/index.tsx | 8 +- .../Rewards/NextLevel/index.tsx | 8 +- .../Rewards/Redeem/ActiveRedeemedBadge.tsx | 6 +- .../Rewards/Redeem/ConfirmClose.tsx | 15 ++- .../Rewards/Redeem/Flows/Campaign.tsx | 20 +++- .../Rewards/Redeem/Flows/Tier.tsx | 12 +- .../Rewards/Redeem/MembershipNumberBadge.tsx | 4 +- .../Rewards/Redeem/TimedRedeemedBadge.tsx | 2 +- .../DynamicContent/Rewards/Redeem/index.tsx | 8 +- .../Rewards/ScriptedRewardText/index.tsx | 12 +- .../SAS/LinkedAccounts/UnlinkSAS.tsx | 17 ++- .../SAS/LinkedAccounts/index.tsx | 79 ++++++++++--- .../SAS/TransferPoints/TransferPointsForm.tsx | 44 +++++-- .../TransferPointsFormClient.tsx | 42 +++++-- .../Previous/EmptyPreviousStays/index.tsx | 2 +- .../Stays/ShowMoreButton/index.tsx | 4 +- .../Soonest/EmptyUpcomingStays/index.tsx | 12 +- .../DynamicContent/Stays/StayCard/index.tsx | 1 + .../Upcoming/EmptyUpcomingStays/index.tsx | 12 +- .../HotelListing/HotelListingItem/index.tsx | 4 +- .../HotelListing/HotelListingItem/utils.ts | 8 +- .../MobileToggleButton/index.tsx | 41 +++++-- .../Carousel/CarouselNavigation.tsx | 8 +- .../CityDataContainer/index.tsx | 11 +- .../CityListing/CityListingItem/index.tsx | 8 +- .../DestinationPage/CityListing/index.tsx | 10 +- .../CityMap/HotelList/index.tsx | 11 +- .../CityMap/HotelListItem/index.tsx | 12 +- .../CountryMap/CityList/index.tsx | 11 +- .../CountryMap/CityListItem/index.tsx | 8 +- .../SidebarContentWrapper/utils.ts | 15 ++- .../DestinationsList/Destination/index.tsx | 10 +- .../HotelsSection/index.tsx | 4 +- .../JumpTo/Client/ClientInline/index.tsx | 22 +++- .../JumpTo/Client/ClientModal/index.tsx | 32 +++-- .../JumpTo/Client/Results/ResultsSkeleton.tsx | 2 +- .../JumpTo/Client/Results/index.tsx | 7 +- .../JumpTo/Client/index.tsx | 4 +- .../OverviewMapContainer/InputForm/index.tsx | 2 +- .../DestinationPage/ExperienceList/utils.tsx | 28 +++-- .../HotelDataContainer/index.tsx | 15 ++- .../HotelListing/HotelListingItem/index.tsx | 16 ++- .../DestinationPage/HotelListing/index.tsx | 13 ++- .../DestinationPage/HotelMapCard/index.tsx | 8 +- .../DestinationPage/Map/DynamicMap/index.tsx | 24 +++- .../ContentType/DestinationPage/Map/index.tsx | 8 +- .../DestinationPage/Sidepeek/index.tsx | 5 +- .../StaticMap/MapButton/index.tsx | 4 +- .../DestinationPage/StaticMap/index.tsx | 8 +- .../DestinationPage/TopImages/index.tsx | 8 +- .../ContentType/DestinationPage/utils.ts | 15 ++- .../HotelPage/AmenitiesList/index.tsx | 10 +- .../HotelPage/Facilities/index.tsx | 8 +- .../HotelPage/IntroSection/index.tsx | 16 ++- .../Map/DynamicMap/Sidebar/index.tsx | 44 +++++-- .../HotelPage/Map/DynamicMap/index.tsx | 10 +- .../HotelPage/Map/MapCard/index.tsx | 12 +- .../HotelPage/Map/MobileMapToggle/index.tsx | 12 +- .../HotelPage/Map/StaticMap/index.tsx | 4 +- .../HotelPage/PreviewImages/index.tsx | 8 +- .../HotelPage/Rooms/RoomCard/index.tsx | 11 +- .../ContentType/HotelPage/Rooms/index.tsx | 6 +- .../ContactInformation/index.tsx | 38 ++++-- .../SidePeeks/AboutTheHotel/index.tsx | 4 +- .../HotelPage/SidePeeks/Activities/index.tsx | 4 +- .../Accessibility/index.tsx | 8 +- .../AccordionAmenities/Breakfast/index.tsx | 14 ++- .../AccordionAmenities/CheckIn/index.tsx | 20 +++- .../AccordionAmenities/Parking/index.tsx | 8 +- .../HotelPage/SidePeeks/Amenities/index.tsx | 9 +- .../MeetingsAndConferences/index.tsx | 16 ++- .../SidePeeks/MeetingsAndConferences/util.ts | 15 ++- .../RestaurantBar/RestaurantBarItem/index.tsx | 23 +++- .../SidePeeks/RestaurantBar/index.tsx | 4 +- .../HotelPage/SidePeeks/Room/index.tsx | 34 ++++-- .../WellnessAndExercise/Facility/index.tsx | 22 +++- .../SidePeeks/WellnessAndExercise/index.tsx | 8 +- .../HotelPage/TabNavigation/index.tsx | 35 ++++-- .../components/ContentType/HotelPage/utils.ts | 28 +++-- .../AdditionalContent/Accessibility/index.tsx | 3 +- .../HotelSubpage/Sidebar/MeetingsSidebar.tsx | 8 +- .../HotelSubpage/Sidebar/ParkingSidebar.tsx | 14 ++- .../Sidebar/RestaurantSidebar.tsx | 31 ++++- .../HotelSubpage/Sidebar/WellnessSidebar.tsx | 38 ++++-- .../ContentType/HotelSubpage/index.tsx | 4 +- .../ContentType/HotelSubpage/utils.ts | 16 ++- .../Current/Aside/Contacts/Contact.tsx | 2 + .../components/Current/Footer/index.tsx | 2 + .../Current/Header/BookingButton/index.tsx | 4 +- .../Header/LanguageSwitcher/Desktop/index.tsx | 2 + .../Header/LanguageSwitcher/Mobile/index.tsx | 2 + .../Current/Header/MainMenu/index.tsx | 22 +++- .../Header/MyPagesMobileDropdown/index.tsx | 8 +- .../Current/Header/OfflineBanner/index.tsx | 2 + .../Current/Header/TopMenu/index.tsx | 12 +- .../components/Current/Hero/index.tsx | 2 + .../components/Current/LangPopup/index.tsx | 2 + .../components/Current/NotFound/index.tsx | 2 + .../components/DatePicker/Range/Desktop.tsx | 6 +- .../components/DatePicker/Range/Mobile.tsx | 6 +- .../components/DatePicker/Single/Desktop.tsx | 6 +- .../components/DatePicker/Single/Mobile.tsx | 6 +- .../components/DatePicker/index.tsx | 4 +- .../DestinationFilterAndSort/Filter/index.tsx | 18 ++- .../DestinationFilterAndSort/Sort/index.tsx | 8 +- .../DestinationFilterAndSort/index.tsx | 36 ++++-- .../ErrorBoundary/ErrorBoundary.tsx | 1 + .../components/Footer/Details/index.tsx | 10 +- .../FormContent/BookingCode/index.tsx | 49 ++++++-- .../FormContent/RewardNight/index.tsx | 11 +- .../SearchList/ClearSearchButton/index.tsx | 6 +- .../FormContent/Search/SearchList/index.tsx | 44 +++++-- .../FormContent/Search/index.tsx | 14 ++- .../FormContent/Voucher/index.tsx | 8 +- .../Forms/BookingWidget/FormContent/index.tsx | 34 ++++-- .../Forms/Edit/Profile/FormContent/index.tsx | 48 ++++++-- .../components/Forms/Edit/Profile/index.tsx | 26 +++-- .../components/Forms/Signup/index.tsx | 62 +++++++--- .../GuestsRoomsPicker/AdultSelector/index.tsx | 4 +- .../ChildSelector/ChildInfoSelector.tsx | 24 +++- .../GuestsRoomsPicker/ChildSelector/index.tsx | 4 +- .../components/GuestsRoomsPicker/Form.tsx | 14 ++- .../GuestsRoomsPicker/GuestsRoom/index.tsx | 8 +- .../components/GuestsRoomsPicker/index.tsx | 11 +- .../Header/MainMenu/LogoLink/index.tsx | 4 +- .../Header/MainMenu/MobileMenu/index.tsx | 18 ++- .../Header/MainMenu/MyPagesMenu/index.tsx | 4 +- .../MainMenu/MyPagesMenuContent/index.tsx | 12 +- .../MainMenu/MyPagesMenuWrapper/index.tsx | 8 +- .../MainMenu/MyPagesMobileMenu/index.tsx | 8 +- .../components/Header/TopMenu/index.tsx | 4 +- .../HotelReservation/AddToCalendar/index.tsx | 12 +- .../BookingConfirmation/Alerts/index.tsx | 10 +- .../Header/Actions/AddToCalendarButton.tsx | 4 +- .../Header/Actions/DownloadInvoice.tsx | 4 +- .../Header/Actions/ManageBooking.tsx | 4 +- .../BookingConfirmation/Header/index.tsx | 11 +- .../HotelDetails/index.tsx | 8 +- .../PaymentDetails/index.tsx | 8 +- .../PriceDetailsModal/index.tsx | 56 ++++++--- .../BookingConfirmation/Promos/index.tsx | 22 +++- .../Receipt/Room/index.tsx | 39 +++++-- .../Receipt/TotalPrice/index.tsx | 6 +- .../BookingConfirmation/Receipt/index.tsx | 8 +- .../Rooms/LinkedReservation/Retry.tsx | 10 +- .../BookingConfirmation/Rooms/Room/index.tsx | 55 ++++++--- .../BookingConfirmation/Rooms/index.tsx | 11 +- .../HotelReservation/Contact/index.tsx | 34 ++++-- .../BedType/BedTypeInfo/index.tsx | 5 +- .../EnterDetails/Breakfast/index.tsx | 30 +++-- .../EnterDetails/Confirm/index.tsx | 36 ++++-- .../JoinScandicFriendsCard/index.tsx | 23 +++- .../EnterDetails/Details/Multiroom/index.tsx | 36 ++++-- .../RoomOne/JoinScandicFriendsCard/index.tsx | 36 ++++-- .../RoomOne/MemberPriceModal/index.tsx | 8 +- .../Details/RoomOne/Signup/index.tsx | 12 +- .../EnterDetails/Details/RoomOne/index.tsx | 32 +++-- .../Details/SpecialRequests/index.tsx | 7 +- .../EnterDetails/Header/ToggleSidePeek.tsx | 4 +- .../EnterDetails/Header/index.tsx | 5 +- .../Payment/GuaranteeDetails/index.tsx | 20 +++- .../MixedRatePaymentBreakdown/index.tsx | 16 ++- .../Payment/MySavedCards/index.tsx | 11 +- .../Payment/PaymentAlert/index.tsx | 5 +- .../PaymentCallback/TimeoutSpinner/index.tsx | 7 +- .../EnterDetails/Payment/PaymentClient.tsx | 24 ++-- .../Payment/PaymentOption/index.tsx | 5 +- .../Payment/TermsAndConditions/index.tsx | 8 +- .../PriceChangeSummary/index.tsx | 40 +++++-- .../EnterDetails/PriceChangeDialog/index.tsx | 44 ++++++- .../EnterDetails/Room/Multiroom.tsx | 26 +++-- .../EnterDetails/Room/One.tsx | 26 +++-- .../EnterDetails/Section/index.tsx | 8 +- .../SelectedRoom/ToggleSidePeek.tsx | 6 +- .../EnterDetails/SelectedRoom/index.tsx | 14 ++- .../Summary/Mobile/BottomSheet/index.tsx | 14 ++- .../Summary/UI/PriceDetailsTable/index.tsx | 64 +++++++--- .../EnterDetails/Summary/UI/index.tsx | 67 ++++++++--- .../FindMyBooking/AdditionalInfoForm.tsx | 17 ++- .../HotelReservation/FindMyBooking/index.tsx | 38 ++++-- .../HotelCard/HotelChequeCard/index.tsx | 21 ++-- .../HotelCard/HotelPointsRow/index.tsx | 6 +- .../HotelCard/HotelPriceCard/index.tsx | 32 +++-- .../HotelCard/HotelVoucherCard/index.tsx | 6 +- .../HotelCard/NoPriceAvailableCard/index.tsx | 3 +- .../HotelReservation/HotelCard/index.tsx | 27 +++-- .../ListingHotelCardDialog/index.tsx | 17 ++- .../StandaloneHotelCardDialog/index.tsx | 36 ++++-- .../HotelCardDialogListing/index.tsx | 4 +- .../HotelCardListing/index.tsx | 7 +- .../HotelCardListing/utils.ts | 12 +- .../ActionButtons/index.tsx | 16 ++- .../PriceSummary/PriceRow/index.tsx | 3 +- .../PriceDetails/PriceSummary/index.tsx | 42 +++++-- .../PriceDetails/index.tsx | 35 +++++- .../Steps/ConfirmationStep/index.tsx | 40 +++++-- .../Steps/DeliveryDetailsStep/index.tsx | 13 ++- .../Steps/SelectAncillaryStep/index.tsx | 4 +- .../Steps/SelectQuantityStep/index.tsx | 62 ++++++++-- .../AddAncillaryFlowModal/index.tsx | 47 ++++++-- .../AddedAncillaries/RemoveButton.tsx | 24 +++- .../Ancillaries/AddedAncillaries/index.tsx | 55 +++++++-- .../Ancillaries/ViewAllAncillaries/index.tsx | 4 +- .../MyStay/Ancillaries/index.tsx | 12 +- .../MyStay/BookingSummary/index.tsx | 20 +++- .../MyStay/GuaranteeLateArrival/index.tsx | 40 +++++-- .../MyStay/GuestDetails/index.tsx | 68 ++++++++--- .../HotelReservation/MyStay/Header/index.tsx | 8 +- .../Actions/AddToCalendarButton.tsx | 4 +- .../CancelStayPriceContainer/index.tsx | 4 +- .../Actions/CancelStay/Confirmation/index.tsx | 15 ++- .../CancelStay/FinalConfirmation/index.tsx | 3 +- .../Actions/CancelStay/hooks/useCancelStay.ts | 12 +- .../ActionPanel/Actions/CancelStay/index.tsx | 29 +++-- .../ActionPanel/Actions/CancelStay/utils.ts | 22 +++- .../Actions/ModifyStay/Confirmation/index.tsx | 32 +++-- .../Actions/ModifyStay/NewDates/index.tsx | 20 +++- .../Actions/ModifyStay/hooks/useModifyStay.ts | 26 ++++- .../ActionPanel/Actions/ModifyStay/index.tsx | 39 +++++-- .../ActionPanel/PriceContainer/index.tsx | 2 + .../MyStay/ManageStay/ActionPanel/index.tsx | 30 +++-- .../MyStay/ManageStay/index.tsx | 4 +- .../MyStay/ModifyContact/index.tsx | 23 +++- .../MyStay/MultiRoom/index.tsx | 82 ++++++++++--- .../HotelReservation/MyStay/Points/index.tsx | 9 +- .../PriceDetails/PriceDetailsTable/index.tsx | 70 +++++++++-- .../MyStay/Receipt/Footer/index.tsx | 82 ++++++++++--- .../MyStay/Receipt/Specification/index.tsx | 101 ++++++++++++---- .../MyStay/Receipt/Total/index.tsx | 38 ++++-- .../HotelReservation/MyStay/Receipt/index.tsx | 12 +- .../MyStay/ReferenceCard/index.tsx | 110 ++++++++++++++---- .../MyStay/Rooms/TotalPrice/index.tsx | 9 +- .../HotelReservation/MyStay/Rooms/index.tsx | 12 +- .../MyStay/SingleRoom/ToggleSidePeek.tsx | 6 +- .../MyStay/SingleRoom/index.tsx | 84 ++++++++++--- .../HotelReservation/MyStay/index.tsx | 18 ++- .../HotelReservation/PriceDetailsModal.tsx | 8 +- .../SelectHotel/BookingCodeFilter/index.tsx | 16 ++- .../SelectHotel/FilterAndSortModal/index.tsx | 42 +++++-- .../SelectHotel/HotelCount/index.tsx | 2 +- .../SelectHotel/HotelFilter/index.tsx | 16 ++- .../SelectHotel/HotelSorter/index.tsx | 30 ++++- .../MobileMapButtonContainer/index.tsx | 4 +- .../SelectHotel/NoAvailabilityAlert.tsx | 17 ++- .../SelectHotelMapContent/index.tsx | 4 +- .../HotelReservation/SelectHotel/index.tsx | 24 +++- .../SelectRate/HotelInfoCard/index.tsx | 11 +- .../MobileSummary/PriceDetailsTable/index.tsx | 39 +++++-- .../RateSummary/MobileSummary/Summary.tsx | 45 +++++-- .../RateSummary/MobileSummary/index.tsx | 14 ++- .../RoomsContainer/RateSummary/index.tsx | 73 +++++++++--- .../SelectedRoomPanel/index.tsx | 32 +++-- .../Rooms/MultiRoomWrapper/index.tsx | 14 ++- .../Rooms/NoAvailabilityAlert/index.tsx | 21 +++- .../RoomsHeader/BookingCodeFilter/index.tsx | 16 ++- .../Form/Checkboxes/PetRoomMessage/index.tsx | 3 +- .../RoomPackageFilter/Form/index.tsx | 8 +- .../RoomsHeader/RoomPackageFilter/index.tsx | 4 +- .../Rooms/RoomsHeader/index.tsx | 6 +- .../RoomListItem/Details/RoomSize.tsx | 10 +- .../RoomListItem/Details/ToggleSidePeek.tsx | 6 +- .../RoomsList/RoomListItem/Details/index.tsx | 13 ++- .../Rates/BreakfastMessage/index.tsx | 14 ++- .../RoomsList/RoomListItem/Rates/Campaign.tsx | 26 ++++- .../RoomsList/RoomListItem/Rates/Code.tsx | 24 +++- .../RoomListItem/Rates/Redemptions.tsx | 12 +- .../RoomsList/RoomListItem/Rates/Regular.tsx | 18 ++- .../RoomListItem/RoomImage/index.tsx | 4 +- .../RoomListItem/RoomNotAvailable/index.tsx | 2 +- .../HotelReservation/SignupPromo/Desktop.tsx | 3 +- .../HotelReservation/SignupPromo/Mobile.tsx | 2 +- .../components/ImageGallery/index.tsx | 4 +- .../LanguageSwitcherContainer/index.tsx | 4 +- .../LanguageSwitcherContent/index.tsx | 4 +- .../components/LanguageSwitcher/index.tsx | 8 +- .../components/Lightbox/FullView.tsx | 1 + .../components/Lightbox/Gallery.tsx | 4 +- .../HotelListingMapContent/index.tsx | 4 +- .../InteractiveMap/HotelMapContent/index.tsx | 4 +- .../components/Maps/InteractiveMap/index.tsx | 8 +- apps/scandic-web/components/Modal/index.tsx | 4 +- .../MyPages/SASLevelUpgradeCheck.tsx | 2 +- .../components/MyPages/Sidebar/index.tsx | 8 +- .../components/MyPages/Surprises/Card.tsx | 4 +- .../components/MyPages/Surprises/Client.tsx | 18 ++- .../components/MyPages/Surprises/Initial.tsx | 17 ++- .../MyPages/Surprises/Navigation.tsx | 8 +- .../myprofile/communication/communication.tsx | 7 +- .../myprofile/creditCards/creditCards.tsx | 7 +- .../membershipCards/membershipcards.tsx | 28 +++-- .../MyPages/myprofile/profile/profile.tsx | 37 ++++-- .../AlternateOpeningHours/index.tsx | 4 +- .../components/OpeningHours/utils.ts | 36 ++++-- .../ParkingInformation/ParkingList/index.tsx | 24 +++- .../ParkingPrices/index.tsx | 15 ++- .../ParkingInformation/ParkingPrices/utils.ts | 16 ++- .../components/ParkingInformation/index.tsx | 18 ++- .../Profile/AddCreditCardButton/index.tsx | 19 ++- .../Profile/DeleteCreditCardButton/index.tsx | 7 +- .../Profile/DeleteCreditCardConfirmation.tsx | 22 +++- .../Profile/ManagePreferencesButton/index.tsx | 10 +- .../components/ProtectedLayout.tsx | 8 +- .../Rewards/ExpirationDate/index.tsx | 4 +- .../BookedRoomSidePeek/RoomDetails.tsx | 12 +- .../SidePeeks/BookedRoomSidePeek/index.tsx | 92 ++++++++++++--- .../Accordions/Accessibility.tsx | 4 +- .../Accordions/CheckInCheckOut.tsx | 18 ++- .../Accordions/MeetingsAndConferences.tsx | 4 +- .../HotelSidePeek/Accordions/Parking.tsx | 15 ++- .../HotelSidePeek/Accordions/Restaurant.tsx | 3 +- .../SidePeeks/HotelSidePeek/index.tsx | 4 +- .../SidePeeks/RoomSidePeek/index.tsx | 21 +++- .../Sidebar/JoinLoyalty/Contact/index.tsx | 6 +- .../Sidebar/JoinLoyalty/ReadMore/index.tsx | 14 ++- .../components/Sidebar/JoinLoyalty/index.tsx | 10 +- .../components/SkeletonShimmer/index.tsx | 1 + .../components/SkipToMainContent.tsx | 4 +- .../TempDesignSystem/Alert/index.tsx | 5 +- .../TempDesignSystem/AncillaryCard/index.tsx | 8 +- .../BackToTopButton/index.tsx | 4 +- .../TempDesignSystem/Breadcrumbs/index.tsx | 11 +- .../TempDesignSystem/Form/Country/index.tsx | 8 +- .../TempDesignSystem/Form/Date/date.test.tsx | 2 + .../TempDesignSystem/Form/Date/index.tsx | 16 ++- .../TempDesignSystem/Form/Input/index.tsx | 4 +- .../Form/PasswordInput/index.tsx | 41 +++++-- .../TempDesignSystem/Form/Phone/index.tsx | 4 +- .../MeetingRoomCard/index.tsx | 25 ++-- .../TempDesignSystem/MeetingRoomCard/utils.ts | 38 +++--- .../TempDesignSystem/Select/index.tsx | 1 + .../TempDesignSystem/ShowMoreButton/index.tsx | 4 +- .../TempDesignSystem/SidePeek/index.tsx | 4 +- .../Webviews/LinkToOverview/index.tsx | 4 +- .../hooks/booking/useGuaranteeBooking.ts | 3 +- .../booking/useGuaranteePaymentFailedToast.ts | 9 +- .../hooks/booking/usePaymentFailedToast.ts | 5 +- .../hooks/booking/useRateTitles.ts | 24 +++- apps/scandic-web/providers/RatesProvider.tsx | 12 +- .../routers/contentstack/metadata/utils.ts | 40 +++++-- .../server/routers/hotels/input.ts | 2 +- .../navigation/mypages/getPrimaryLinks.ts | 24 +++- .../navigation/mypages/getSecondaryLinks.ts | 8 +- apps/scandic-web/utils/hotelSearchDetails.ts | 6 +- 393 files changed, 4839 insertions(+), 1554 deletions(-) diff --git a/apps/scandic-web/.eslintrc.json b/apps/scandic-web/.eslintrc.json index eb0faf83f..70c092dc1 100644 --- a/apps/scandic-web/.eslintrc.json +++ b/apps/scandic-web/.eslintrc.json @@ -73,15 +73,15 @@ "ignoreRestSiblings": true } ], - "formatjs/enforce-description": ["warn", "anything"], - "formatjs/enforce-default-message": ["error", "literal"], + // "formatjs/enforce-description": ["warn", "anything"], + // "formatjs/enforce-default-message": ["error", "literal"], "formatjs/enforce-placeholders": ["error"], "formatjs/enforce-plural-rules": ["error"], "formatjs/no-literal-string-in-jsx": ["error"], "formatjs/no-multiple-whitespaces": ["error"], "formatjs/no-multiple-plurals": ["error"], "formatjs/no-invalid-icu": ["error"], - "formatjs/no-id": ["error"], + // "formatjs/no-id": ["error"], "formatjs/no-complex-selectors": ["error"], "formatjs/no-useless-message": ["error"], "formatjs/prefer-pound-in-plural": ["error"] diff --git a/apps/scandic-web/actions/editProfile.ts b/apps/scandic-web/actions/editProfile.ts index b429ba161..d42d5f95b 100644 --- a/apps/scandic-web/actions/editProfile.ts +++ b/apps/scandic-web/actions/editProfile.ts @@ -61,7 +61,7 @@ export const editProfile = protectedServerActionProcedure message: issue.message, })), message: intl.formatMessage({ - id: "An error occured when trying to update profile.", + defaultMessage: "An error occured when trying to update profile.", }), status: Status.error, } @@ -81,7 +81,7 @@ export const editProfile = protectedServerActionProcedure data: input, issues: [], message: intl.formatMessage({ - id: "An error occured when trying to update profile.", + defaultMessage: "An error occured when trying to update profile.", }), status: Status.error, } @@ -137,7 +137,9 @@ export const editProfile = protectedServerActionProcedure if (Object.keys(body).length === 0) { return { data: input, - message: intl.formatMessage({ id: "Successfully updated profile!" }), + message: intl.formatMessage({ + defaultMessage: "Successfully updated profile!", + }), status: Status.success, } } else { @@ -172,7 +174,7 @@ export const editProfile = protectedServerActionProcedure data: input, issues: [], message: intl.formatMessage({ - id: "An error occured when trying to update profile.", + defaultMessage: "An error occured when trying to update profile.", }), status: Status.error, } @@ -208,7 +210,7 @@ export const editProfile = protectedServerActionProcedure message: issue.message, })), message: intl.formatMessage({ - id: "An error occured when trying to update profile.", + defaultMessage: "An error occured when trying to update profile.", }), status: Status.error, } @@ -216,7 +218,9 @@ export const editProfile = protectedServerActionProcedure return { data: validatedData.data, - message: intl.formatMessage({ id: "Successfully updated profile!" }), + message: intl.formatMessage({ + defaultMessage: "Successfully updated profile!", + }), status: Status.success, } }) diff --git a/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/@breadcrumbs/[...path]/error.tsx b/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/@breadcrumbs/[...path]/error.tsx index a7d0f4789..61f2134c5 100644 --- a/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/@breadcrumbs/[...path]/error.tsx +++ b/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/@breadcrumbs/[...path]/error.tsx @@ -22,7 +22,9 @@ export default function Error({

{intl.formatMessage( - { id: "Breadcrumbs failed for this page ({errorId})" }, + { + defaultMessage: "Breadcrumbs failed for this page ({errorId})", + }, { errorId: `${error.digest}@${Date.now()}`, } diff --git a/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/[...path]/error.tsx b/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/[...path]/error.tsx index 3b0bbdbd4..3e2981d47 100644 --- a/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/[...path]/error.tsx +++ b/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/[...path]/error.tsx @@ -22,7 +22,9 @@ export default function Error({

{intl.formatMessage( - { id: "Error loading this page ({errorId})" }, + { + defaultMessage: "Error loading this page ({errorId})", + }, { errorId: `${error.digest}@${Date.now()}`, } diff --git a/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/[...path]/page.tsx b/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/[...path]/page.tsx index 513037d11..82ca57deb 100644 --- a/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/[...path]/page.tsx +++ b/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/[...path]/page.tsx @@ -37,7 +37,11 @@ export default async function MyPages({}: PageArgs< {content?.length ? ( ) : ( -

{intl.formatMessage({ id: "No content published" })}

+

+ {intl.formatMessage({ + defaultMessage: "No content published", + })} +

)} diff --git a/apps/scandic-web/app/[lang]/(live)/(public)/destination_overview_page/[uid]/error.tsx b/apps/scandic-web/app/[lang]/(live)/(public)/destination_overview_page/[uid]/error.tsx index 357d9aec9..e1d49695c 100644 --- a/apps/scandic-web/app/[lang]/(live)/(public)/destination_overview_page/[uid]/error.tsx +++ b/apps/scandic-web/app/[lang]/(live)/(public)/destination_overview_page/[uid]/error.tsx @@ -25,7 +25,9 @@ export default function Error({

{intl.formatMessage( - { id: "An error occurred ({errorId})" }, + { + defaultMessage: "An error occurred ({errorId})", + }, { errorId: `${error.digest}@${Date.now()}`, } diff --git a/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/details/page.tsx b/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/details/page.tsx index f949f3de3..bb54b1c12 100644 --- a/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/details/page.tsx +++ b/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/details/page.tsx @@ -128,12 +128,17 @@ export default async function DetailsPage({ ) { } return ( + // eslint-disable-next-line formatjs/no-literal-string-in-jsx

diff --git a/apps/scandic-web/app/[lang]/(live)/error.tsx b/apps/scandic-web/app/[lang]/(live)/error.tsx index aead8a274..cd593e9e2 100644 --- a/apps/scandic-web/app/[lang]/(live)/error.tsx +++ b/apps/scandic-web/app/[lang]/(live)/error.tsx @@ -61,7 +61,9 @@ export default function Error({ return (
- {intl.formatMessage({ id: "Something went wrong!" })} + {intl.formatMessage({ + defaultMessage: "Something went wrong!", + })} {env.NEXT_PUBLIC_NODE_ENV === "development" && (
{error.stack || error.message}
)} diff --git a/apps/scandic-web/app/[lang]/(live)/layout.tsx b/apps/scandic-web/app/[lang]/(live)/layout.tsx index 1b54179f2..ebd7c7e0d 100644 --- a/apps/scandic-web/app/[lang]/(live)/layout.tsx +++ b/apps/scandic-web/app/[lang]/(live)/layout.tsx @@ -52,6 +52,7 @@ export default async function RootLayout({ id="Cookiebot" src="https://consent.cookiebot.com/uc.js" /> + {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} diff --git a/apps/scandic-web/app/[lang]/(live)/middleware-error/[status]/page.tsx b/apps/scandic-web/app/[lang]/(live)/middleware-error/[status]/page.tsx index a40165083..e48580a6a 100644 --- a/apps/scandic-web/app/[lang]/(live)/middleware-error/[status]/page.tsx +++ b/apps/scandic-web/app/[lang]/(live)/middleware-error/[status]/page.tsx @@ -6,8 +6,9 @@ export default async function MiddlewareError({ params, }: LayoutArgs) { return ( + // eslint-disable-next-line formatjs/no-literal-string-in-jsx
- Middleware error {params.lang}: {params.status} + Middleware error {params.lang} {params.status}
) } diff --git a/apps/scandic-web/app/[lang]/(live-current)/layout.tsx b/apps/scandic-web/app/[lang]/(live-current)/layout.tsx index 3863c9aba..a289f3461 100644 --- a/apps/scandic-web/app/[lang]/(live-current)/layout.tsx +++ b/apps/scandic-web/app/[lang]/(live-current)/layout.tsx @@ -1,3 +1,5 @@ +/* eslint-disable formatjs/no-literal-string-in-jsx */ + import "@scandic-hotels/design-system/fonts.css" import "@/app/globals.css" import "@/public/_static/css/design-system-current-deprecated.css" diff --git a/apps/scandic-web/app/[lang]/(no-layout)/layout.tsx b/apps/scandic-web/app/[lang]/(no-layout)/layout.tsx index d1adee9d2..23f601e8c 100644 --- a/apps/scandic-web/app/[lang]/(no-layout)/layout.tsx +++ b/apps/scandic-web/app/[lang]/(no-layout)/layout.tsx @@ -43,6 +43,7 @@ export default async function RootLayout({ id="Cookiebot" src="https://consent.cookiebot.com/uc.js" /> + {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} diff --git a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/AlreadyLinkedError.tsx b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/AlreadyLinkedError.tsx index b3598acfc..f1b1cab2d 100644 --- a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/AlreadyLinkedError.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/AlreadyLinkedError.tsx @@ -20,18 +20,25 @@ export function AlreadyLinkedError() { -

{intl.formatMessage({ id: "Accounts are already linked" })}

+

+ {intl.formatMessage({ + defaultMessage: "Accounts are already linked", + })} +

{intl.formatMessage({ - id: "Looks like you’ve already linked your Scandic Friends and SAS EuroBonus accounts!", + defaultMessage: + "Looks like you’ve already linked your Scandic Friends and SAS EuroBonus accounts!", })}

diff --git a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/DateOfBirthError.tsx b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/DateOfBirthError.tsx index 300159074..5d9f3d3d0 100644 --- a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/DateOfBirthError.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/DateOfBirthError.tsx @@ -25,18 +25,25 @@ export function DateOfBirthError() { size={64} /> -

{intl.formatMessage({ id: "Date of birth not matching" })}

+

+ {intl.formatMessage({ + defaultMessage: "Date of birth not matching", + })} +

{intl.formatMessage({ - id: "We couldn’t connect your accounts. Please contact us and we’ll help you resolve this.", + defaultMessage: + "We couldn’t connect your accounts. Please contact us and we’ll help you resolve this.", })}

diff --git a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/FailedAttemptsError.tsx b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/FailedAttemptsError.tsx index 298b4dedc..99a157fda 100644 --- a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/FailedAttemptsError.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/FailedAttemptsError.tsx @@ -13,18 +13,22 @@ export function FailedAttemptsError() { return (

{intl.formatMessage({ - id: "Please wait 1 hour before trying again.", + defaultMessage: "Please wait 1 hour before trying again.", })}

) diff --git a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/SASModal.tsx b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/SASModal.tsx index a541cce83..3e4d73666 100644 --- a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/SASModal.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/SASModal.tsx @@ -18,7 +18,11 @@ export function SASModalDivider() { return (
- {intl.formatMessage({ id: "or" })} + + {intl.formatMessage({ + defaultMessage: "or", + })} +
) @@ -27,13 +31,17 @@ export function SASModalDivider() { export function SASModalContactBlock() { const intl = useIntl() - const phone = intl.formatMessage({ id: "+46 8 517 517 00" }) + const phone = intl.formatMessage({ + defaultMessage: "+46 8 517 517 00", + }) return (

- {intl.formatMessage({ id: "Contact us" })} + {intl.formatMessage({ + defaultMessage: "Contact us", + })}

{phone} + {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} member@scandichotels.com diff --git a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/TooManyCodesError.tsx b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/TooManyCodesError.tsx index 0167bb17b..91ee95d62 100644 --- a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/TooManyCodesError.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/TooManyCodesError.tsx @@ -13,18 +13,22 @@ export function TooManyCodesError() { return (

{intl.formatMessage({ - id: "Please wait 1 hour before trying again.", + defaultMessage: "Please wait 1 hour before trying again.", })}

) diff --git a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/TooManyFailedAttemptsError.tsx b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/TooManyFailedAttemptsError.tsx index 30ad7eb1b..8b4947062 100644 --- a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/TooManyFailedAttemptsError.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/components/TooManyFailedAttemptsError.tsx @@ -13,18 +13,22 @@ export function TooManyFailedAttemptsError() { return (

{intl.formatMessage({ - id: "Please wait 1 hour before trying again.", + defaultMessage: "Please wait 1 hour before trying again.", })}

) diff --git a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/error.tsx b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/error.tsx index f238a53ba..bf1c9a7f2 100644 --- a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/error.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/error.tsx @@ -26,13 +26,13 @@ export default function Error({ return (

{intl.formatMessage({ - id: "Please try again later", + defaultMessage: "Please try again later", })}

diff --git a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/error/page.tsx b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/error/page.tsx index cc6b7c10e..b3d41be9b 100644 --- a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/error/page.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/error/page.tsx @@ -37,13 +37,14 @@ export default async function Page({ return (

{intl.formatMessage({ - id: "We couldn’t connect your accounts. Please contact us and we’ll help you resolve this.", + defaultMessage: + "We couldn’t connect your accounts. Please contact us and we’ll help you resolve this.", })}

diff --git a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/layout.tsx b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/layout.tsx index eb5cb323d..7709ea884 100644 --- a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/layout.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/layout.tsx @@ -29,10 +29,14 @@ export default async function SasXScandicLayout({ - {intl.formatMessage({ id: "Back to scandichotels.com" })} + {intl.formatMessage({ + defaultMessage: "Back to scandichotels.com", + })} - {intl.formatMessage({ id: "Back" })} + {intl.formatMessage({ + defaultMessage: "Back", + })} @@ -45,7 +49,13 @@ export default async function SasXScandicLayout({ async function MainMenuLogo() { const intl = await getIntl() - return + return ( + + ) } function Logo({ alt }: { alt: string }) { diff --git a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/link/LinkAccountForm.tsx b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/link/LinkAccountForm.tsx index 231bed3a1..e8311574d 100644 --- a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/link/LinkAccountForm.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/link/LinkAccountForm.tsx @@ -61,7 +61,11 @@ export function LinkAccountForm({ src="/_static/img/partner/sas/sas-campaign-logo.png" /> -

{intl.formatMessage({ id: "Link your accounts" })}

+

+ {intl.formatMessage({ + defaultMessage: "Link your accounts", + })} +

@@ -70,19 +74,23 @@ export function LinkAccountForm({ {userDateOfBirth ? intl.formatMessage( { - id: "Birth date: {dateOfBirth, date, ::MMMM d yyyy}", + defaultMessage: + "Birth date: {dateOfBirth, date, ::MMMM d yyyy}", }, { dateOfBirth: new Date(userDateOfBirth), } ) - : intl.formatMessage({ id: "Birth date is missing" })} + : intl.formatMessage({ + defaultMessage: "Birth date is missing", + })}

{intl.formatMessage({ - id: "We require your birth date in order to link your Scandic Friends account with your SAS EuroBonus account. Please check that it is correct.", + defaultMessage: + "We require your birth date in order to link your Scandic Friends account with your SAS EuroBonus account. Please check that it is correct.", })}

@@ -93,7 +101,7 @@ export function LinkAccountForm({ variant="underscored" > {intl.formatMessage({ - id: "Edit your personal details", + defaultMessage: "Edit your personal details", })} @@ -106,7 +114,7 @@ export function LinkAccountForm({ required: { value: true, message: intl.formatMessage({ - id: "You must accept the terms and conditions", + defaultMessage: "You must accept the terms and conditions", }), }, disabled: !userDateOfBirth, @@ -115,7 +123,7 @@ export function LinkAccountForm({

{intl.formatMessage({ - id: "I accept the terms and conditions", + defaultMessage: "I accept the terms and conditions", })}

@@ -124,7 +132,8 @@ export function LinkAccountForm({

{intl.formatMessage( { - id: "By linking your accounts you accept the Terms & Conditions for Scandic Friends and SAS EuroBonus Account Linking.", + defaultMessage: + "By linking your accounts you accept the Terms & Conditions for Scandic Friends and SAS EuroBonus Account Linking.", }, { sasScandicTermsAndConditionsLink: (str) => ( @@ -150,7 +159,9 @@ export function LinkAccountForm({ type="submit" disabled={isPending || disableSubmit} > - {intl.formatMessage({ id: "Link my accounts" })} + {intl.formatMessage({ + defaultMessage: "Link my accounts", + })}

diff --git a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/link/success/page.tsx b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/link/success/page.tsx index 0a181ba8d..5245b6119 100644 --- a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/link/success/page.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/link/success/page.tsx @@ -26,20 +26,24 @@ export default async function SASxScandicLinkPage({ color="Icon/Feedback/Success" /> -

{intl.formatMessage({ id: "Your accounts are linked" })}

+

+ {intl.formatMessage({ + defaultMessage: "Your accounts are linked", + })} +

{intl.formatMessage({ - id: "We successfully connected your accounts!", + defaultMessage: "We successfully connected your accounts!", })}

{intl.formatMessage({ - id: "Redirecting you to my pages.", + defaultMessage: "Redirecting you to my pages.", })}

diff --git a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/login/page.tsx b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/login/page.tsx index 441296e71..38ef8a82d 100644 --- a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/login/page.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/login/page.tsx @@ -51,13 +51,16 @@ export default async function SASxScandicLoginPage({ const intentDescriptions: Record = { link: intl.formatMessage({ - id: "Log in to your SAS EuroBonus account to confirm account linking.", + defaultMessage: + "Log in to your SAS EuroBonus account to confirm account linking.", }), unlink: intl.formatMessage({ - id: "Log in to your SAS Eurobonus account to confirm account unlinking.", + defaultMessage: + "Log in to your SAS Eurobonus account to confirm account unlinking.", }), transfer: intl.formatMessage({ - id: "In order to transfer your points we will ask you to sign in to your SAS EuroBonus account.", + defaultMessage: + "In order to transfer your points we will ask you to sign in to your SAS EuroBonus account.", }), } @@ -72,7 +75,11 @@ export default async function SASxScandicLoginPage({ style={{ marginTop: 16 }} /> -

{intl.formatMessage({ id: "Redirecting you to SAS" })}

+

+ {intl.formatMessage({ + defaultMessage: "Redirecting you to SAS", + })} +

@@ -82,7 +89,8 @@ export default async function SASxScandicLoginPage({ {intl.formatMessage( { - id: "If you are not redirected automatically, please click here.", + defaultMessage: + "If you are not redirected automatically, please click here.", }, { loginLink: (str) => ( diff --git a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/otp/OneTimePasswordForm.tsx b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/otp/OneTimePasswordForm.tsx index c2564b2b9..73c14cfe4 100644 --- a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/otp/OneTimePasswordForm.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/otp/OneTimePasswordForm.tsx @@ -56,7 +56,9 @@ export default function OneTimePasswordForm({ if (requestOtp.isError) { const cause = requestOtp.error?.data?.cause as RequestOtpError - const title = intl.formatMessage({ id: "Error requesting OTP" }) + const title = intl.formatMessage({ + defaultMessage: "Error requesting OTP", + }) const body = getRequestErrorBody(intl, cause?.errorCode) return ( @@ -125,11 +127,12 @@ export default function OneTimePasswordForm({ const errorMessages: Record = { invalidCode: intl.formatMessage({ - id: "The code you've entered is incorrect.", + defaultMessage: "The code you've entered is incorrect.", }), expiredCode: intl.formatMessage( { - id: "This code has expired. Send new code.", + defaultMessage: + "This code has expired. Send new code.", }, { resendOtpLink: getResendOtpLink, @@ -189,7 +192,8 @@ export default function OneTimePasswordForm({

{intl.formatMessage( { - id: "Didn't receive a code? Resend code", + defaultMessage: + "Didn't receive a code? Resend code", }, { resendOtpLink: getResendOtpLink, @@ -226,11 +230,11 @@ const getRequestErrorBody = ( switch (errorCode) { case "TOO_MANY_REQUESTS": return intl.formatMessage({ - id: "Too many requests. Please try again later.", + defaultMessage: "Too many requests. Please try again later.", }) default: return intl.formatMessage({ - id: "An error occurred while requesting a new OTP", + defaultMessage: "An error occurred while requesting a new OTP", }) } } diff --git a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/otp/loading.tsx b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/otp/loading.tsx index ed61b81cd..92056cfc0 100644 --- a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/otp/loading.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/otp/loading.tsx @@ -16,7 +16,7 @@ export default function Loading() {

{intl.formatMessage({ - id: "Hang tight...", + defaultMessage: "Hang tight...", })}

diff --git a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/otp/page.tsx b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/otp/page.tsx index 1d134bebb..c9cc5875c 100644 --- a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/otp/page.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/otp/page.tsx @@ -110,19 +110,22 @@ export default async function SASxScandicOneTimePasswordPage({ const intentDescriptions: Record = { link: intl.formatMessage( { - id: "Please enter the code sent to in order to confirm your account linking.", + defaultMessage: + "Please enter the code sent to in order to confirm your account linking.", }, { maskedContactInfo } ), unlink: intl.formatMessage( { - id: "Please enter the code sent to in order to unlink your accounts.", + defaultMessage: + "Please enter the code sent to in order to unlink your accounts.", }, { maskedContactInfo } ), transfer: intl.formatMessage( { - id: "Please enter the code sent to in order to transfer your points.", + defaultMessage: + "Please enter the code sent to in order to transfer your points.", }, { maskedContactInfo } ), @@ -130,10 +133,12 @@ export default async function SASxScandicOneTimePasswordPage({ return (
-

{intl.formatMessage({ id: "Point transfer completed!" })}

+

+ {intl.formatMessage({ + defaultMessage: "Point transfer completed!", + })} +

@@ -52,7 +56,7 @@ export default async function SASxScandicTransferSuccessPage({ > {intl.formatMessage({ - id: "Go back to My Pages", + defaultMessage: "Go back to My Pages", })} @@ -80,20 +84,33 @@ async function TransactionCard({ return (
-

{intl.formatMessage({ id: "Your transaction" })}

+

+ {intl.formatMessage({ + defaultMessage: "Your transaction", + })} +

-

{intl.formatMessage({ id: "Points added" })}

+

+ {intl.formatMessage({ + defaultMessage: "Points added", + })} +

+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}

+ {transferredPoints}

-

{intl.formatMessage({ id: "Your new total" })}

+

+ {intl.formatMessage({ + defaultMessage: "Your new total", + })} +

}> @@ -106,14 +123,15 @@ async function TransactionCard({

{intl.formatMessage({ - id: "You have enough points for a bonus night!", + defaultMessage: "You have enough points for a bonus night!", })}

{intl.formatMessage({ - id: "Bonus Nights range from 10 000 - 80 000 points. Book your next stay with us today!", + defaultMessage: + "Bonus Nights range from 10 000 - 80 000 points. Book your next stay with us today!", })}

@@ -128,7 +146,13 @@ async function TransactionCard({ > {/* TODO correct link */} - {intl.formatMessage({ id: "Book now" })}{" "} + {intl.formatMessage({ + defaultMessage: "Book now", + })} + { + /* eslint-disable-next-line formatjs/no-literal-string-in-jsx */ + " " + }

- ={" "} + {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} + {"= "} {intl.formatMessage( - { id: "{points, number} points" }, + { + defaultMessage: "{points, number} points", + }, { points, } diff --git a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/unlink/success/page.tsx b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/unlink/success/page.tsx index 8c7060e55..d1cbc4521 100644 --- a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/unlink/success/page.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/unlink/success/page.tsx @@ -26,13 +26,17 @@ export default async function SASxScandicUnlinkSuccessPage({ color="Icon/Feedback/Success" /> -

{intl.formatMessage({ id: "Your accounts are now unlinked" })}

+

+ {intl.formatMessage({ + defaultMessage: "Your accounts are now unlinked", + })} +

{intl.formatMessage({ - id: "Redirecting you to My Pages.", + defaultMessage: "Redirecting you to My Pages.", })}

diff --git a/apps/scandic-web/app/[lang]/(partner)/layout.tsx b/apps/scandic-web/app/[lang]/(partner)/layout.tsx index 8cddbee62..f101ec1b4 100644 --- a/apps/scandic-web/app/[lang]/(partner)/layout.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/layout.tsx @@ -47,6 +47,7 @@ export default async function RootLayout({ id="Cookiebot" src="https://consent.cookiebot.com/uc.js" /> + {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} diff --git a/apps/scandic-web/app/[lang]/webview/[contentType]/[uid]/page.tsx b/apps/scandic-web/app/[lang]/webview/[contentType]/[uid]/page.tsx index b0f1e41ba..a6b341c2b 100644 --- a/apps/scandic-web/app/[lang]/webview/[contentType]/[uid]/page.tsx +++ b/apps/scandic-web/app/[lang]/webview/[contentType]/[uid]/page.tsx @@ -22,7 +22,13 @@ export default async function ContentTypePage({ if (!user) { console.log(`[webview:page] unable to load user`) - return

{intl.formatMessage({ id: "Error: No user could be loaded" })}

+ return ( +

+ {intl.formatMessage({ + defaultMessage: "Error: No user could be loaded", + })} +

+ ) } if ("error" in user) { @@ -36,11 +42,19 @@ export default async function ContentTypePage({ console.log(`[webview:page] user error, redirecting to: ${redirectURL}`) redirect(redirectURL) case "notfound": - return

{intl.formatMessage({ id: "Error: user not found" })}

+ return ( +

+ {intl.formatMessage({ + defaultMessage: "Error: user not found", + })} +

+ ) case "unknown": return (

- {intl.formatMessage({ id: "Unknown error occurred loading user" })} + {intl.formatMessage({ + defaultMessage: "Unknown error occurred loading user", + })}

) default: diff --git a/apps/scandic-web/app/[lang]/webview/layout.tsx b/apps/scandic-web/app/[lang]/webview/layout.tsx index 695c5d4a4..a408c00b6 100644 --- a/apps/scandic-web/app/[lang]/webview/layout.tsx +++ b/apps/scandic-web/app/[lang]/webview/layout.tsx @@ -38,6 +38,7 @@ export default async function RootLayout({ + {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} diff --git a/apps/scandic-web/app/global-error.tsx b/apps/scandic-web/app/global-error.tsx index e317cfba4..7b569cd0d 100644 --- a/apps/scandic-web/app/global-error.tsx +++ b/apps/scandic-web/app/global-error.tsx @@ -23,7 +23,11 @@ export default function GlobalError({
-

{intl.formatMessage({ id: "Something went really wrong!" })}

+

+ {intl.formatMessage({ + defaultMessage: "Something went really wrong!", + })} +

diff --git a/apps/scandic-web/components/Blocks/DynamicContent/HowItWorks/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/HowItWorks/index.tsx index 30d4df1b6..47884e0b4 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/HowItWorks/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/HowItWorks/index.tsx @@ -12,7 +12,11 @@ export default async function HowItWorks({ dynamic_content }: HowItWorksProps) { return (
- {intl.formatMessage({ id: "How it works" })} + + {intl.formatMessage({ + defaultMessage: "How it works", + })} +
) diff --git a/apps/scandic-web/components/Blocks/DynamicContent/JobylonFeed/JobList/Filter/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/JobylonFeed/JobList/Filter/index.tsx index 1bb085b2a..47f2b6fac 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/JobylonFeed/JobList/Filter/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/JobylonFeed/JobList/Filter/index.tsx @@ -33,8 +33,12 @@ export default function Filter({ onFilterChange(JobylonFilterKey.department, value)} /> - {intl.formatMessage({ id: "Your level" })} + {intl.formatMessage({ + defaultMessage: "Your level", + })} ) } diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/AwardPoints/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/AwardPoints/index.tsx index 73c323f2c..cd0d7bfaf 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/AwardPoints/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/AwardPoints/index.tsx @@ -34,7 +34,9 @@ export default function AwardPoints({ {isCalculated ? intl.formatNumber(awardPoints) - : intl.formatMessage({ id: "Points being calculated" })} + : intl.formatMessage({ + defaultMessage: "Points being calculated", + })} ) } diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/JourneyTable/ClientTable/Row/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/JourneyTable/ClientTable/Row/index.tsx index 86f70e73a..6528c87f3 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/JourneyTable/ClientTable/Row/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/JourneyTable/ClientTable/Row/index.tsx @@ -24,7 +24,7 @@ export default function Row({ transaction }: RowProps) { const nightsMsg = intl.formatMessage( { - id: "{totalNights, plural, one {# night} other {# nights}}", + defaultMessage: "{totalNights, plural, one {# night} other {# nights}}", }, { totalNights: transaction.nights, @@ -40,28 +40,40 @@ export default function Row({ transaction }: RowProps) { case Transactions.rewardType.stay: case Transactions.rewardType.stayAdj: if (transaction.hotelId === "ORS") { - description = intl.formatMessage({ id: "Former Scandic Hotel" }) + description = intl.formatMessage({ + defaultMessage: "Former Scandic Hotel", + }) } if (transaction.confirmationNumber === "BALFWD") { description = intl.formatMessage({ - id: "Points earned prior to May 1, 2021", + defaultMessage: "Points earned prior to May 1, 2021", }) } break case Transactions.rewardType.ancillary: - description = intl.formatMessage({ id: "Extras to your booking" }) + description = intl.formatMessage({ + defaultMessage: "Extras to your booking", + }) break case Transactions.rewardType.enrollment: - description = intl.formatMessage({ id: "Sign up bonus" }) + description = intl.formatMessage({ + defaultMessage: "Sign up bonus", + }) break case Transactions.rewardType.mastercard_points: - description = intl.formatMessage({ id: "Scandic Friends Mastercard" }) + description = intl.formatMessage({ + defaultMessage: "Scandic Friends Mastercard", + }) break case Transactions.rewardType.tui_points: - description = intl.formatMessage({ id: "TUI Points" }) + description = intl.formatMessage({ + defaultMessage: "TUI Points", + }) case Transactions.rewardType.pointShop: - description = intl.formatMessage({ id: "Scandic Friends Point Shop" }) + description = intl.formatMessage({ + defaultMessage: "Scandic Friends Point Shop", + }) break } diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/JourneyTable/ClientTable/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/JourneyTable/ClientTable/index.tsx index c40429774..23bc2eefe 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/JourneyTable/ClientTable/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/JourneyTable/ClientTable/index.tsx @@ -15,10 +15,18 @@ export default function ClientTable({ transactions }: ClientTableProps) { const intl = useIntl() const tableHeadings = [ - intl.formatMessage({ id: "Points" }), - intl.formatMessage({ id: "Description" }), - intl.formatMessage({ id: "Booking number" }), - intl.formatMessage({ id: "Arrival date" }), + intl.formatMessage({ + defaultMessage: "Points", + }), + intl.formatMessage({ + defaultMessage: "Description", + }), + intl.formatMessage({ + defaultMessage: "Booking number", + }), + intl.formatMessage({ + defaultMessage: "Arrival date", + }), ] return ( @@ -44,7 +52,9 @@ export default function ClientTable({ transactions }: ClientTableProps) { ) : ( - {intl.formatMessage({ id: "No transactions available" })} + {intl.formatMessage({ + defaultMessage: "No transactions available", + })} )} diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Points/ExpiringPoints/ExpiringPointsTable/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Points/ExpiringPoints/ExpiringPointsTable/index.tsx index 89e476f1f..d46423353 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Points/ExpiringPoints/ExpiringPointsTable/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Points/ExpiringPoints/ExpiringPointsTable/index.tsx @@ -22,8 +22,12 @@ export default function ExpiringPointsTable({ const expiration = dt(expirationDate).locale(lang).format("DD MMM YYYY") const tableHeadings = [ - intl.formatMessage({ id: "Points" }), - intl.formatMessage({ id: "Expiration Date" }), + intl.formatMessage({ + defaultMessage: "Points", + }), + intl.formatMessage({ + defaultMessage: "Expiration Date", + }), ] return ( diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/NextLevel/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/NextLevel/index.tsx index 9295e4510..68c5b1d9d 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/NextLevel/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/NextLevel/index.tsx @@ -47,12 +47,16 @@ export default async function NextLevelRewardsBlock({
- {intl.formatMessage({ id: "Level up to unlock" })} + {intl.formatMessage({ + defaultMessage: "Level up to unlock", + })}
{intl.formatMessage( - { id: "As our {level}" }, + { + defaultMessage: "As our {level}", + }, { level: nextLevelRewards.level?.name } )} diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/ActiveRedeemedBadge.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/ActiveRedeemedBadge.tsx index 1f52ea604..9bf07cc21 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/ActiveRedeemedBadge.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/ActiveRedeemedBadge.tsx @@ -26,7 +26,11 @@ export default function ActiveRedeemedBadge() { > - {intl.formatMessage({ id: "Active" })} + + {intl.formatMessage({ + defaultMessage: "Active", + })} +
) } diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/ConfirmClose.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/ConfirmClose.tsx index 6ac0942f4..b1f9ad451 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/ConfirmClose.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/ConfirmClose.tsx @@ -17,17 +17,18 @@ export function ConfirmClose({ close }: { close: VoidFunction }) {
{intl.formatMessage({ - id: "If you close this your benefit will be removed", + defaultMessage: "If you close this your benefit will be removed", })} {intl.formatMessage({ - id: "Have you showed this benefit to the hotel staff?", + defaultMessage: "Have you showed this benefit to the hotel staff?", })} {intl.formatMessage({ - id: "If not, please go back and do so before you close this. Once you close this your benefit will be void and removed from My Benefits.", + defaultMessage: + "If not, please go back and do so before you close this. Once you close this your benefit will be void and removed from My Benefits.", })}
@@ -37,10 +38,14 @@ export function ConfirmClose({ close }: { close: VoidFunction }) { intent="primary" theme="base" > - {intl.formatMessage({ id: "No, go back" })} + {intl.formatMessage({ + defaultMessage: "No, go back", + })} diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/Flows/Campaign.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/Flows/Campaign.tsx index abfa8b5e8..54f72e44f 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/Flows/Campaign.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/Flows/Campaign.tsx @@ -29,7 +29,9 @@ export default function Campaign({ reward }: { reward: Campaign }) { {reward.description}
- {intl.formatMessage({ id: "Promo code" })} + {intl.formatMessage({ + defaultMessage: "Promo code", + })} {reward.operaRewardId} @@ -41,9 +43,17 @@ export default function Campaign({ reward }: { reward: Campaign }) { onClick={() => { try { navigator.clipboard.writeText(reward.operaRewardId) - toast.success(intl.formatMessage({ id: "Copied to clipboard" })) + toast.success( + intl.formatMessage({ + defaultMessage: "Copied to clipboard", + }) + ) } catch { - toast.error(intl.formatMessage({ id: "Failed to copy" })) + toast.error( + intl.formatMessage({ + defaultMessage: "Failed to copy", + }) + ) } }} type="button" @@ -53,7 +63,9 @@ export default function Campaign({ reward }: { reward: Campaign }) { intent="primary" > - {intl.formatMessage({ id: "Copy promotion code" })} + {intl.formatMessage({ + defaultMessage: "Copy promotion code", + })} diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/Flows/Tier.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/Flows/Tier.tsx index 71a36a3a4..d27190518 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/Flows/Tier.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/Flows/Tier.tsx @@ -86,7 +86,9 @@ export default function Tier({ intent="primary" theme="base" > - {intl.formatMessage({ id: "Redeem benefit" })} + {intl.formatMessage({ + defaultMessage: "Redeem benefit", + })} )} @@ -99,14 +101,18 @@ export default function Tier({ intent="primary" theme="base" > - {intl.formatMessage({ id: "Yes, redeem" })} + {intl.formatMessage({ + defaultMessage: "Yes, redeem", + })} )} diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/MembershipNumberBadge.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/MembershipNumberBadge.tsx index cc4df078b..5abff1df4 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/MembershipNumberBadge.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/MembershipNumberBadge.tsx @@ -15,7 +15,9 @@ export default function MembershipNumberBadge({
{intl.formatMessage( - { id: "Membership ID: {id}" }, + { + defaultMessage: "Membership ID: {id}", + }, { id: membershipNumber } )} diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/TimedRedeemedBadge.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/TimedRedeemedBadge.tsx index 181f03711..b0e4d2d27 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/TimedRedeemedBadge.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/TimedRedeemedBadge.tsx @@ -24,7 +24,7 @@ export default function TimedRedeemedBadge() { {intl.formatMessage({ - id: "Redeemed & valid through:", + defaultMessage: "Redeemed & valid through:", })}
diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/index.tsx index ab2b6fb36..bf20c1e2f 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/index.tsx @@ -71,8 +71,12 @@ export default function Redeem({ reward, membershipNumber }: RedeemProps) { > - {intl.formatMessage({ id: "Unlink accounts" })} + {intl.formatMessage({ + defaultMessage: "Unlink accounts", + })} } diff --git a/apps/scandic-web/components/Blocks/DynamicContent/SAS/LinkedAccounts/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/SAS/LinkedAccounts/index.tsx index c93ce02c4..897cd0e45 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/SAS/LinkedAccounts/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/SAS/LinkedAccounts/index.tsx @@ -58,7 +58,8 @@ export default async function SASLinkedAccount({

{intl.formatMessage({ - id: "Changes in your level match can take up to 24 hours to be displayed.", + defaultMessage: + "Changes in your level match can take up to 24 hours to be displayed.", })}

@@ -96,20 +97,37 @@ async function MatchedAccountInfo() {
- + -

{intl.formatMessage({ id: "SAS EuroBonus" })}

+

+ {intl.formatMessage({ + defaultMessage: "SAS EuroBonus", + })} +

- +

{sasLevelName}

- + + {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}

EB{sasMembershipNumber}

@@ -137,17 +155,33 @@ async function MatchedAccountInfoSkeleton() {
- + -

{intl.formatMessage({ id: "SAS EuroBonus" })}

+

+ {intl.formatMessage({ + defaultMessage: "SAS EuroBonus", + })} +

- +
- +
@@ -188,19 +222,22 @@ async function TierMatchMessage({ const messageMap: Record = { boostedBySAS: intl.formatMessage( { - id: "EuroBonus {sasLevelName} has upgraded your Scandic Friends level to {scandicLevelName}.", + defaultMessage: + "EuroBonus {sasLevelName} has upgraded your Scandic Friends level to {scandicLevelName}.", }, messageValues ), boostedByScandic: intl.formatMessage( { - id: "Your Scandic Friends level {scandicLevelName} has upgraded you to EuroBonus {sasLevelName}.", + defaultMessage: + "Your Scandic Friends level {scandicLevelName} has upgraded you to EuroBonus {sasLevelName}.", }, messageValues ), noBoost: intl.formatMessage( { - id: "EuroBonus {sasLevelName} and {scandicLevelName} are equally matched tiers. Level up in one of your memberships to qualify for an upgrade!", + defaultMessage: + "EuroBonus {sasLevelName} and {scandicLevelName} are equally matched tiers. Level up in one of your memberships to qualify for an upgrade!", }, messageValues ), @@ -214,7 +251,11 @@ async function TierMatchMessage({ return (
- +
{iconMap[matchState]}
@@ -230,7 +271,11 @@ async function TierMatchMessageSkeleton() { return (
- +
@@ -256,7 +301,11 @@ async function TierMatchExpiration({ return (
- +

{matchState === "boostedBySAS" diff --git a/apps/scandic-web/components/Blocks/DynamicContent/SAS/TransferPoints/TransferPointsForm.tsx b/apps/scandic-web/components/Blocks/DynamicContent/SAS/TransferPoints/TransferPointsForm.tsx index 922d1b4b1..d33734132 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/SAS/TransferPoints/TransferPointsForm.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/SAS/TransferPoints/TransferPointsForm.tsx @@ -78,18 +78,28 @@ async function TransferPointsFormContent({

-

{intl.formatMessage({ id: "Transfer from" })}

+

+ {intl.formatMessage({ + defaultMessage: "Transfer from", + })} +

-

{intl.formatMessage({ id: "SAS EuroBonus" })}

+

+ {intl.formatMessage({ + defaultMessage: "SAS EuroBonus", + })} +

- {intl.formatMessage({ id: "Balance" })} + {intl.formatMessage({ + defaultMessage: "Balance", + })}

{sasPoints === null ? ( @@ -102,7 +112,9 @@ async function TransferPointsFormContent({

{intl.formatMessage( - { id: "{points, number} p" }, + { + defaultMessage: "{points, number} p", + }, { points: sasPoints } )}

@@ -115,7 +127,7 @@ async function TransferPointsFormContent({

{intl.formatMessage({ - id: "You have no points to transfer.", + defaultMessage: "You have no points to transfer.", })}

@@ -126,17 +138,27 @@ async function TransferPointsFormContent({
-

{intl.formatMessage({ id: "Transfer to" })}

+

+ {intl.formatMessage({ + defaultMessage: "Transfer to", + })} +

-

{intl.formatMessage({ id: "Scandic Friends" })}

+

+ {intl.formatMessage({ + defaultMessage: "Scandic Friends", + })} +

- {intl.formatMessage({ id: "Balance" })} + {intl.formatMessage({ + defaultMessage: "Balance", + })}

{scandicPoints === null ? ( @@ -149,7 +171,9 @@ async function TransferPointsFormContent({

{intl.formatMessage( - { id: "{points, number} p" }, + { + defaultMessage: "{points, number} p", + }, { points: scandicPoints } )}

@@ -167,7 +191,7 @@ async function TransferPointsFormContent({

{intl.formatMessage({ - id: "Transferred points will not be level qualifying", + defaultMessage: "Transferred points will not be level qualifying", })}

diff --git a/apps/scandic-web/components/Blocks/DynamicContent/SAS/TransferPoints/TransferPointsFormClient.tsx b/apps/scandic-web/components/Blocks/DynamicContent/SAS/TransferPoints/TransferPointsFormClient.tsx index 66d6621f1..7f8ac4ae4 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/SAS/TransferPoints/TransferPointsFormClient.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/SAS/TransferPoints/TransferPointsFormClient.tsx @@ -66,7 +66,9 @@ export function TransferPointsFormClient({ className={styles.slider} // Set max value to 1 if sasPoints is 0 since slider requires a range maxValue={hasNoSasPoints ? 1 : sasPoints} - aria-label={intl.formatMessage({ id: "EB points to transfer" })} + aria-label={intl.formatMessage({ + defaultMessage: "EB points to transfer", + })} formatOptions={{ useGrouping: true, maximumFractionDigits: 0, @@ -85,7 +87,9 @@ export function TransferPointsFormClient({
{/* TODO maybe dynamic string based on exchange rate */} {intl.formatMessage({ - id: "1 EuroBonus point = 2 Scandic Friends points", + defaultMessage: "1 EuroBonus point = 2 Scandic Friends points", })}

-

{intl.formatMessage({ id: "SF points to receive" })}

+

+ {intl.formatMessage({ + defaultMessage: "SF points to receive", + })} +

{intl.formatNumber(calculatedPoints)}

@@ -174,7 +182,9 @@ function ConfirmModal({ onClick={() => handleToggle(true)} disabled={disabled} > - {intl.formatMessage({ id: "Transfer points" })} + {intl.formatMessage({ + defaultMessage: "Transfer points", + })}
@@ -186,18 +196,25 @@ function ConfirmModal({ />

- {intl.formatMessage({ id: "Proceed with point transfer?" })} + {intl.formatMessage({ + defaultMessage: "Proceed with point transfer?", + })}

-

{intl.formatMessage({ id: "You are about to exchange:" })}

+

+ {intl.formatMessage({ + defaultMessage: "You are about to exchange:", + })} +

{intl.formatMessage( { - id: "{sasPoints, number} EuroBonus points to {scandicPoints, number} Scandic Friends points", + defaultMessage: + "{sasPoints, number} EuroBonus points to {scandicPoints, number} Scandic Friends points", }, { sasPoints, @@ -215,7 +232,8 @@ function ConfirmModal({

{intl.formatMessage({ - id: "Your exchanged points will retain their original expiry date with a maximum validity of 12 months.", + defaultMessage: + "Your exchanged points will retain their original expiry date with a maximum validity of 12 months.", })}

@@ -227,7 +245,7 @@ function ConfirmModal({ color="none" > {intl.formatMessage({ - id: "Yes, I want to transfer my points", + defaultMessage: "Yes, I want to transfer my points", })} @@ -237,7 +255,9 @@ function ConfirmModal({ theme="base" onClick={() => handleToggle(false)} > - {intl.formatMessage({ id: "Cancel" })} + {intl.formatMessage({ + defaultMessage: "Cancel", + })}
diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Stays/Previous/EmptyPreviousStays/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Stays/Previous/EmptyPreviousStays/index.tsx index c49821fb4..10adeec8e 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Stays/Previous/EmptyPreviousStays/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Stays/Previous/EmptyPreviousStays/index.tsx @@ -9,7 +9,7 @@ export default async function EmptyPreviousStaysBlock() {
{intl.formatMessage({ - id: "You have no previous stays.", + defaultMessage: "You have no previous stays.", })}
diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Stays/ShowMoreButton/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Stays/ShowMoreButton/index.tsx index f9eed94ff..99d65b1c3 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Stays/ShowMoreButton/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Stays/ShowMoreButton/index.tsx @@ -30,7 +30,9 @@ export default function ShowMoreButton({ size={20} color="CurrentColor" /> - {intl.formatMessage({ id: "Show more" })} + {intl.formatMessage({ + defaultMessage: "Show more", + })}
) diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Stays/Soonest/EmptyUpcomingStays/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Stays/Soonest/EmptyUpcomingStays/index.tsx index 4cbcbe9f5..42723547e 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Stays/Soonest/EmptyUpcomingStays/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Stays/Soonest/EmptyUpcomingStays/index.tsx @@ -28,14 +28,20 @@ export default async function EmptyUpcomingStaysBlock() { className={styles.title} textAlign="center" > - {intl.formatMessage({ id: "You have no upcoming stays." })} + {intl.formatMessage({ + defaultMessage: "You have no upcoming stays.", + })} - {intl.formatMessage({ id: "Where should you go next?" })} + {intl.formatMessage({ + defaultMessage: "Where should you go next?", + })}
- {intl.formatMessage({ id: "Get inspired" })} + {intl.formatMessage({ + defaultMessage: "Get inspired", + })}
diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Stays/StayCard/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Stays/StayCard/index.tsx index 52620bb42..c496813e9 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Stays/StayCard/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Stays/StayCard/index.tsx @@ -59,6 +59,7 @@ export default function StayCard({ stay }: StayCardProps) { + {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} {" - "} diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Stays/Upcoming/EmptyUpcomingStays/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Stays/Upcoming/EmptyUpcomingStays/index.tsx index 4cbcbe9f5..42723547e 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Stays/Upcoming/EmptyUpcomingStays/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Stays/Upcoming/EmptyUpcomingStays/index.tsx @@ -28,14 +28,20 @@ export default async function EmptyUpcomingStaysBlock() { className={styles.title} textAlign="center" > - {intl.formatMessage({ id: "You have no upcoming stays." })} + {intl.formatMessage({ + defaultMessage: "You have no upcoming stays.", + })} - {intl.formatMessage({ id: "Where should you go next?" })} + {intl.formatMessage({ + defaultMessage: "Where should you go next?", + })}
- {intl.formatMessage({ id: "Get inspired" })} + {intl.formatMessage({ + defaultMessage: "Get inspired", + })}
diff --git a/apps/scandic-web/components/Blocks/HotelListing/HotelListingItem/index.tsx b/apps/scandic-web/components/Blocks/HotelListing/HotelListingItem/index.tsx index 273d2da61..627815cff 100644 --- a/apps/scandic-web/components/Blocks/HotelListing/HotelListingItem/index.tsx +++ b/apps/scandic-web/components/Blocks/HotelListing/HotelListingItem/index.tsx @@ -56,7 +56,9 @@ export default async function HotelListingItem({
{intl.formatMessage( - { id: "{number} km to city center" }, + { + defaultMessage: "{number} km to city center", + }, { number: getSingleDecimal( hotel.location.distanceToCentre / 1000 diff --git a/apps/scandic-web/components/Blocks/HotelListing/HotelListingItem/utils.ts b/apps/scandic-web/components/Blocks/HotelListing/HotelListingItem/utils.ts index 178471abb..f3a54d822 100644 --- a/apps/scandic-web/components/Blocks/HotelListing/HotelListingItem/utils.ts +++ b/apps/scandic-web/components/Blocks/HotelListing/HotelListingItem/utils.ts @@ -21,7 +21,9 @@ export function getTypeSpecificInformation( alt: images.metaData.altText, }, cta: { - text: intl.formatMessage({ id: "See hotel details" }), + text: intl.formatMessage({ + defaultMessage: "See hotel details", + }), url, openInNewTab: false, }, @@ -41,7 +43,9 @@ export function getTypeSpecificInformation( } if (meetingUrl) { data.cta = { - text: intl.formatMessage({ id: "Book a meeting" }), + text: intl.formatMessage({ + defaultMessage: "Book a meeting", + }), url: meetingUrl, openInNewTab: true, } diff --git a/apps/scandic-web/components/BookingWidget/MobileToggleButton/index.tsx b/apps/scandic-web/components/BookingWidget/MobileToggleButton/index.tsx index 6b586b4be..a20d45186 100644 --- a/apps/scandic-web/components/BookingWidget/MobileToggleButton/index.tsx +++ b/apps/scandic-web/components/BookingWidget/MobileToggleButton/index.tsx @@ -53,22 +53,31 @@ export default function MobileToggleButton({ }, 0) const totalNightsMsg = intl.formatMessage( - { id: "{totalNights, plural, one {# night} other {# nights}}" }, + { + defaultMessage: "{totalNights, plural, one {# night} other {# nights}}", + }, { totalNights } ) const totalAdultsMsg = intl.formatMessage( - { id: "{totalAdults, plural, one {# adult} other {# adults}}" }, + { + defaultMessage: "{totalAdults, plural, one {# adult} other {# adults}}", + }, { totalAdults } ) const totalChildrenMsg = intl.formatMessage( - { id: "{totalChildren, plural, one {# child} other {# children}}" }, + { + defaultMessage: + "{totalChildren, plural, one {# child} other {# children}}", + }, { totalChildren } ) const totalRoomsMsg = intl.formatMessage( - { id: "{totalRooms, plural, one {# room} other {# rooms}}" }, + { + defaultMessage: "{totalRooms, plural, one {# room} other {# rooms}}", + }, { totalRooms } ) @@ -88,14 +97,18 @@ export default function MobileToggleButton({ - {intl.formatMessage({ id: "Where to?" })} + {intl.formatMessage({ + defaultMessage: "Where to?", + })} {searchTerm ? searchTerm - : intl.formatMessage({ id: "Destination" })} + : intl.formatMessage({ + defaultMessage: "Destination", + })} @@ -108,7 +121,9 @@ export default function MobileToggleButton({ {intl.formatMessage( - { id: "{selectedFromDate} - {selectedToDate}" }, + { + defaultMessage: "{selectedFromDate} - {selectedToDate}", + }, { selectedFromDate, selectedToDate, @@ -133,7 +148,8 @@ export default function MobileToggleButton({ {intl.formatMessage( { - id: "{selectedFromDate} - {selectedToDate} ({totalNights}) {details}", + defaultMessage: + "{selectedFromDate} - {selectedToDate} ({totalNights}) {details}", }, { selectedFromDate, @@ -162,7 +178,9 @@ export function MobileToggleButtonSkeleton() { - {intl.formatMessage({ id: "Where to?" })} + {intl.formatMessage({ + defaultMessage: "Where to?", + })} @@ -172,7 +190,10 @@ export function MobileToggleButtonSkeleton() { {intl.formatMessage( - { id: "{totalNights, plural, one {# night} other {# nights}}" }, + { + defaultMessage: + "{totalNights, plural, one {# night} other {# nights}}", + }, { totalNights: 0 } )} diff --git a/apps/scandic-web/components/Carousel/CarouselNavigation.tsx b/apps/scandic-web/components/Carousel/CarouselNavigation.tsx index bd489ee5a..96a410019 100644 --- a/apps/scandic-web/components/Carousel/CarouselNavigation.tsx +++ b/apps/scandic-web/components/Carousel/CarouselNavigation.tsx @@ -22,7 +22,9 @@ export function CarouselPrevious({ className, ...props }: CarouselButtonProps) {
diff --git a/apps/scandic-web/components/ContentType/DestinationPage/DestinationCountryPage/CountryMap/CityList/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/DestinationCountryPage/CountryMap/CityList/index.tsx index ec1696b08..ff4b20e00 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/DestinationCountryPage/CountryMap/CityList/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/DestinationCountryPage/CountryMap/CityList/index.tsx @@ -29,7 +29,9 @@ export default function CityList() {
{intl.formatMessage( - { id: "{count} destinations" }, + { + defaultMessage: "{count} destinations", + }, { count: activeCities.length } )} @@ -38,9 +40,12 @@ export default function CityList() { {activeCities.length === 0 ? ( ) : ( diff --git a/apps/scandic-web/components/ContentType/DestinationPage/DestinationCountryPage/CountryMap/CityListItem/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/DestinationCountryPage/CountryMap/CityListItem/index.tsx index 3a727dfb6..4e78ed4b7 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/DestinationCountryPage/CountryMap/CityListItem/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/DestinationCountryPage/CountryMap/CityListItem/index.tsx @@ -29,7 +29,9 @@ export default function CityListItem({ city }: CityListItemProps) { images={galleryImages} fill title={intl.formatMessage( - { id: "{title} - Image gallery" }, + { + defaultMessage: "{title} - Image gallery", + }, { title: city.cityName } )} /> @@ -47,7 +49,9 @@ export default function CityListItem({ city }: CityListItemProps) { @@ -113,7 +121,9 @@ export function ClientInline({ > {showResults ? ( - {intl.formatMessage({ id: "Where to?" })} + {intl.formatMessage({ + defaultMessage: "Where to?", + })} - {intl.formatMessage({ id: "Hotels & Destinations" })} + {intl.formatMessage({ + defaultMessage: "Hotels & Destinations", + })} @@ -62,12 +66,16 @@ export function ClientModal({ - {intl.formatMessage({ id: "Find a location" })} + {intl.formatMessage({ + defaultMessage: "Find a location", + })} @@ -91,14 +99,16 @@ export function ClientModal({ > { startTransition(() => { @@ -115,7 +125,9 @@ export function ClientModal({ {state.value !== "" && ( - Clear + {intl.formatMessage({ + defaultMessage: "Clear", + })} )} @@ -132,7 +144,9 @@ export function ClientModal({ > {showResults ? (
{intl.formatMessage({ - id: "Loading results", + defaultMessage: "Loading results", })}
diff --git a/apps/scandic-web/components/ContentType/DestinationPage/DestinationOverviewPage/JumpTo/Client/Results/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/DestinationOverviewPage/JumpTo/Client/Results/index.tsx index 3e41881cf..de5e47794 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/DestinationOverviewPage/JumpTo/Client/Results/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/DestinationOverviewPage/JumpTo/Client/Results/index.tsx @@ -45,13 +45,16 @@ export function Results({ <>
- {intl.formatMessage({ id: "No results" })} + {intl.formatMessage({ + defaultMessage: "No results", + })}
{intl.formatMessage({ - id: "We couldn't find a matching location for your search.", + defaultMessage: + "We couldn't find a matching location for your search.", })} diff --git a/apps/scandic-web/components/ContentType/DestinationPage/DestinationOverviewPage/JumpTo/Client/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/DestinationOverviewPage/JumpTo/Client/index.tsx index db8d77eb0..97d802125 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/DestinationOverviewPage/JumpTo/Client/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/DestinationOverviewPage/JumpTo/Client/index.tsx @@ -158,7 +158,9 @@ export function JumpToClient({ type: "clearHistory", closesModal: false, icon: , - displayName: intl.formatMessage({ id: "Clear searches" }), + displayName: intl.formatMessage({ + defaultMessage: "Clear searches", + }), }, ], }, diff --git a/apps/scandic-web/components/ContentType/DestinationPage/DestinationOverviewPage/OverviewMapContainer/InputForm/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/DestinationOverviewPage/OverviewMapContainer/InputForm/index.tsx index f91466b9f..7677fb992 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/DestinationOverviewPage/OverviewMapContainer/InputForm/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/DestinationOverviewPage/OverviewMapContainer/InputForm/index.tsx @@ -10,7 +10,7 @@ export default function InputForm() { diff --git a/apps/scandic-web/components/ContentType/DestinationPage/ExperienceList/utils.tsx b/apps/scandic-web/components/ContentType/DestinationPage/ExperienceList/utils.tsx index 967bd9bf3..f6c970cad 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/ExperienceList/utils.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/ExperienceList/utils.tsx @@ -17,49 +17,63 @@ export function mapExperiencesToListData( Icon: (props: MaterialIconSetIconProps) => ( ), - name: intl.formatMessage({ id: "Hiking" }), + name: intl.formatMessage({ + defaultMessage: "Hiking", + }), } case "Kayaking": return { Icon: (props: MaterialIconSetIconProps) => ( ), - name: intl.formatMessage({ id: "Kayaking" }), + name: intl.formatMessage({ + defaultMessage: "Kayaking", + }), } case "Bike friendly": return { Icon: (props: MaterialIconSetIconProps) => ( ), - name: intl.formatMessage({ id: "Bike friendly" }), + name: intl.formatMessage({ + defaultMessage: "Bike friendly", + }), } case "Museums": return { Icon: (props: MaterialIconSetIconProps) => ( ), - name: intl.formatMessage({ id: "Museums" }), + name: intl.formatMessage({ + defaultMessage: "Museums", + }), } case "Family friendly": return { Icon: (props: MaterialIconSetIconProps) => ( ), - name: intl.formatMessage({ id: "Family friendly" }), + name: intl.formatMessage({ + defaultMessage: "Family friendly", + }), } case "City pulse": return { Icon: (props: MaterialIconSetIconProps) => ( ), - name: intl.formatMessage({ id: "City pulse" }), + name: intl.formatMessage({ + defaultMessage: "City pulse", + }), } case "Nightlife": return { Icon: (props: MaterialIconSetIconProps) => ( ), - name: intl.formatMessage({ id: "Nightlife" }), + name: intl.formatMessage({ + defaultMessage: "Nightlife", + }), } default: return { diff --git a/apps/scandic-web/components/ContentType/DestinationPage/HotelDataContainer/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/HotelDataContainer/index.tsx index 2197306da..099c52a57 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/HotelDataContainer/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/HotelDataContainer/index.tsx @@ -23,13 +23,22 @@ export default async function HotelDataContainer({ const sortItems: SortItem[] = [ { - label: intl.formatMessage({ id: "Distance to city center" }), + label: intl.formatMessage({ + defaultMessage: "Distance to city center", + }), value: SortOption.Distance, isDefault: true, }, - { label: intl.formatMessage({ id: "Name" }), value: SortOption.Name }, { - label: intl.formatMessage({ id: "TripAdvisor rating" }), + label: intl.formatMessage({ + defaultMessage: "Name", + }), + value: SortOption.Name, + }, + { + label: intl.formatMessage({ + defaultMessage: "TripAdvisor rating", + }), value: SortOption.TripAdvisorRating, }, ] diff --git a/apps/scandic-web/components/ContentType/DestinationPage/HotelListing/HotelListingItem/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/HotelListing/HotelListingItem/index.tsx index dc4ce233a..3e961c8cf 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/HotelListing/HotelListingItem/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/HotelListing/HotelListingItem/index.tsx @@ -48,7 +48,9 @@ export default function HotelListingItem(data: DestinationPagesHotelData) { fill sizes="(min-width: 768px) 350px, 100vw" title={intl.formatMessage( - { id: "{title} - Image gallery" }, + { + defaultMessage: "{title} - Image gallery", + }, { title: hotel.name } )} /> @@ -72,7 +74,9 @@ export default function HotelListingItem(data: DestinationPagesHotelData) { {intl.formatMessage( - { id: "{number} km to city center" }, + { + defaultMessage: "{number} km to city center", + }, { number: getSingleDecimal( hotel.location.distanceToCentre / 1000 @@ -107,7 +111,9 @@ export default function HotelListingItem(data: DestinationPagesHotelData) { scroll={true} onClick={() => setActiveMarker(hotel.id)} > - {intl.formatMessage({ id: "See on map" })} + {intl.formatMessage({ + defaultMessage: "See on map", + })}
diff --git a/apps/scandic-web/components/ContentType/DestinationPage/HotelListing/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/HotelListing/index.tsx index 3a6d2af6b..d4f51cf5f 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/HotelListing/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/HotelListing/index.tsx @@ -51,7 +51,7 @@ export default function HotelListing() { {intl.formatMessage( { - id: "{count, plural, one {# Hotel} other {# Hotels}}", + defaultMessage: "{count, plural, one {# Hotel} other {# Hotels}}", }, { count: activeHotels.length } )} @@ -68,7 +68,9 @@ export default function HotelListing() { > - {intl.formatMessage({ id: "See on map" })} + {intl.formatMessage({ + defaultMessage: "See on map", + })} )} @@ -78,9 +80,12 @@ export default function HotelListing() { {activeHotels.length === 0 ? ( ) : ( diff --git a/apps/scandic-web/components/ContentType/DestinationPage/HotelMapCard/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/HotelMapCard/index.tsx index 6ffbb721c..1ed744181 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/HotelMapCard/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/HotelMapCard/index.tsx @@ -55,7 +55,9 @@ export default function HotelMapCard({ variant="icon" className={styles.closeButton} onClick={handleClose} - aria-label={intl.formatMessage({ id: "Close" })} + aria-label={intl.formatMessage({ + defaultMessage: "Close", + })} > - {intl.formatMessage({ id: "See hotel information" })} + {intl.formatMessage({ + defaultMessage: "See hotel information", + })} )} diff --git a/apps/scandic-web/components/ContentType/DestinationPage/Map/DynamicMap/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/Map/DynamicMap/index.tsx index 441021181..b3ec2fb17 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/Map/DynamicMap/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/Map/DynamicMap/index.tsx @@ -111,7 +111,15 @@ export default function DynamicMap({ )} ref={ref} > - Unable to display map}> + + {intl.formatMessage({ + defaultMessage: "Unable to display map", + })} + + } + > {children}
@@ -125,7 +133,11 @@ export default function DynamicMap({ onClick={onClose} > - {intl.formatMessage({ id: "Close the map" })} + + {intl.formatMessage({ + defaultMessage: "Close the map", + })} + )}
@@ -136,7 +148,9 @@ export default function DynamicMap({ size="small" className={styles.zoomButton} onClick={zoomIn} - aria-label={intl.formatMessage({ id: "Zoom out" })} + aria-label={intl.formatMessage({ + defaultMessage: "Zoom out", + })} > @@ -147,7 +161,9 @@ export default function DynamicMap({ size="small" className={styles.zoomButton} onClick={zoomOut} - aria-label={intl.formatMessage({ id: "Zoom in" })} + aria-label={intl.formatMessage({ + defaultMessage: "Zoom in", + })} > diff --git a/apps/scandic-web/components/ContentType/DestinationPage/Map/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/Map/index.tsx index d14640285..409600c9a 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/Map/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/Map/index.tsx @@ -146,7 +146,9 @@ export default function Map({ style={ { "--destination-map-height": mapHeight } as React.CSSProperties } - aria-label={intl.formatMessage({ id: "Map view" })} + aria-label={intl.formatMessage({ + defaultMessage: "Map view", + })} >
- {buttonText || intl.formatMessage({ id: "Read more" })} + {buttonText || + intl.formatMessage({ + defaultMessage: "Read more", + })} - {intl.formatMessage({ id: "See on map" })} + {intl.formatMessage({ + defaultMessage: "See on map", + })} ) diff --git a/apps/scandic-web/components/ContentType/DestinationPage/StaticMap/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/StaticMap/index.tsx index 527ecd69d..50853f44d 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/StaticMap/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/StaticMap/index.tsx @@ -32,8 +32,12 @@ export default async function DestinationStaticMap({ }: StaticMapProps) { const intl = await getIntl() const altText = city - ? intl.formatMessage({ id: "Map of the city" }) - : intl.formatMessage({ id: "Map of the country" }) + ? intl.formatMessage({ + defaultMessage: "Map of the city", + }) + : intl.formatMessage({ + defaultMessage: "Map of the country", + }) const coordinates = location ? { lat: location.latitude, lng: location.longitude } : undefined diff --git a/apps/scandic-web/components/ContentType/DestinationPage/TopImages/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/TopImages/index.tsx index 584a74b51..4883eec7c 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/TopImages/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/TopImages/index.tsx @@ -65,12 +65,16 @@ export default function TopImages({ images, destinationName }: TopImageProps) { onClick={() => setLightboxState({ open: true, activeIndex: 0 })} className={styles.seeAllButton} > - {intl.formatMessage({ id: "See all photos" })} + {intl.formatMessage({ + defaultMessage: "See all photos", + })} -

{intl.formatMessage({ id: "At the hotel" })}

+

+ {intl.formatMessage({ + defaultMessage: "At the hotel", + })} +

{facilities.map((facility) => { @@ -52,7 +56,9 @@ export default async function AmenitiesList({ weight="bold" className={styles.showAllAmenities} > - {intl.formatMessage({ id: "See all amenities" })} + {intl.formatMessage({ + defaultMessage: "See all amenities", + })}
diff --git a/apps/scandic-web/components/ContentType/HotelPage/Facilities/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/Facilities/index.tsx index 73b4b3423..f1479fca4 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/Facilities/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/Facilities/index.tsx @@ -51,10 +51,14 @@ export default async function Facilities({ case FacilityCardButtonText.MEETINGS: case FacilityCardButtonText.RESTAURANT: case FacilityCardButtonText.WELLNESS: - return intl.formatMessage({ id: "Read more" }) + return intl.formatMessage({ + defaultMessage: "Read more", + }) default: console.warn(`Unsupported option given: ${text}`) - return intl.formatMessage({ id: "Read more" }) + return intl.formatMessage({ + defaultMessage: "Read more", + }) } } diff --git a/apps/scandic-web/components/ContentType/HotelPage/IntroSection/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/IntroSection/index.tsx index 79357c565..102024b52 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/IntroSection/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/IntroSection/index.tsx @@ -22,7 +22,9 @@ export default async function IntroSection({ const { streetAddress, city } = address const { distanceToCentre } = location const formattedDistanceText = intl.formatMessage( - { id: "{number} km to city center" }, + { + defaultMessage: "{number} km to city center", + }, { number: getSingleDecimal(distanceToCentre / 1000) } ) @@ -32,7 +34,9 @@ export default async function IntroSection({ ) const formattedTripAdvisorText = hasTripAdvisorData ? intl.formatMessage( - { id: "{rating} ({count} reviews on Tripadvisor)" }, + { + defaultMessage: "{rating} ({count} reviews on Tripadvisor)", + }, { rating: tripAdvisor.rating, count: tripAdvisor.numberOfReviews } ) : "" @@ -43,7 +47,9 @@ export default async function IntroSection({
- {intl.formatMessage({ id: "Welcome to" })} + {intl.formatMessage({ + defaultMessage: "Welcome to", + })} @@ -72,7 +78,9 @@ export default async function IntroSection({ href={`#s-${SidepeekSlugs.about}`} scroll={false} > - {intl.formatMessage({ id: "Read more" })} + {intl.formatMessage({ + defaultMessage: "Read more", + })} {intl.formatMessage( - { id: "Things nearby {hotelName}" }, + { + defaultMessage: "Things nearby {hotelName}", + }, { hotelName } )} @@ -163,7 +183,9 @@ export default function Sidebar({ {poi.name} {intl.formatMessage( - { id: "{distanceInKm} km" }, + { + defaultMessage: "{distanceInKm} km", + }, { distanceInKm: poi.distance, } diff --git a/apps/scandic-web/components/ContentType/HotelPage/Map/DynamicMap/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/Map/DynamicMap/index.tsx index d82ec8ba0..c2455b3bc 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/Map/DynamicMap/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/Map/DynamicMap/index.tsx @@ -94,7 +94,11 @@ export default function DynamicMap({ onClick={handleClose} > - {intl.formatMessage({ id: "Close the map" })} + + {intl.formatMessage({ + defaultMessage: "Close the map", + })} + ) @@ -109,7 +113,9 @@ export default function DynamicMap({ className={styles.dynamicMap} style={{ "--hotel-map-height": mapHeight } as React.CSSProperties} aria-label={intl.formatMessage( - { id: "Things nearby {hotelName}" }, + { + defaultMessage: "Things nearby {hotelName}", + }, { hotelName } )} > diff --git a/apps/scandic-web/components/ContentType/HotelPage/Map/MapCard/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/Map/MapCard/index.tsx index de436cf6e..4ea36f82b 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/Map/MapCard/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/Map/MapCard/index.tsx @@ -34,7 +34,9 @@ export default function MapCard({ hotelName, pois }: MapCardProps) { textTransform="uppercase" textAlign="center" > - {intl.formatMessage({ id: "Nearby" })} + {intl.formatMessage({ + defaultMessage: "Nearby", + })} {poi.name}</Body> <Caption> {intl.formatMessage( - { id: "{distanceInKm} km" }, + { + defaultMessage: "{distanceInKm} km", + }, { distanceInKm: poi.distance } )} </Caption> @@ -68,7 +72,9 @@ export default function MapCard({ hotelName, pois }: MapCardProps) { {mapUrl ? ( <Button theme="base" intent="secondary" size="small" fullWidth asChild> <Link href={mapUrl} scroll={true} onClick={trackHotelMapClick}> - {intl.formatMessage({ id: "Explore nearby" })} + {intl.formatMessage({ + defaultMessage: "Explore nearby", + })} </Link> </Button> ) : null} diff --git a/apps/scandic-web/components/ContentType/HotelPage/Map/MobileMapToggle/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/Map/MobileMapToggle/index.tsx index a15e7c830..2a97cde47 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/Map/MobileMapToggle/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/Map/MobileMapToggle/index.tsx @@ -41,7 +41,11 @@ export default function MobileMapToggle() { color={!isMapView ? "Icon/Inverted" : "Icon/Accent"} /> <Typography variant="Body/Supporting text (caption)/smBold"> - <span>{intl.formatMessage({ id: "Hotel" })}</span> + <span> + {intl.formatMessage({ + defaultMessage: "Hotel", + })} + </span> </Typography> </span> <span @@ -58,7 +62,11 @@ export default function MobileMapToggle() { color={isMapView ? "Icon/Inverted" : "Icon/Interactive/Accent"} /> <Typography variant="Body/Supporting text (caption)/smBold"> - <span>{intl.formatMessage({ id: "Map" })}</span> + <span> + {intl.formatMessage({ + defaultMessage: "Map", + })} + </span> </Typography> </Link> </span> diff --git a/apps/scandic-web/components/ContentType/HotelPage/Map/StaticMap/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/Map/StaticMap/index.tsx index 231acddb8..8ded39998 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/Map/StaticMap/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/Map/StaticMap/index.tsx @@ -34,7 +34,9 @@ export default async function StaticMap({ height={mapHeight} zoomLevel={zoomLevel} altText={intl.formatMessage( - { id: "Map of {hotelName}" }, + { + defaultMessage: "Map of {hotelName}", + }, { hotelName } )} mapId={mapId} diff --git a/apps/scandic-web/components/ContentType/HotelPage/PreviewImages/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/PreviewImages/index.tsx index b5b567d8b..2e462d5e7 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/PreviewImages/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/PreviewImages/index.tsx @@ -44,12 +44,16 @@ export default function PreviewImages({ onClick={() => setLightboxIsOpen(true)} className={styles.seeAllButton} > - {intl.formatMessage({ id: "See all photos" })} + {intl.formatMessage({ + defaultMessage: "See all photos", + })} </Button> <Lightbox images={lightboxImages} dialogTitle={intl.formatMessage( - { id: "{title} - Image gallery" }, + { + defaultMessage: "{title} - Image gallery", + }, { title: hotelName } )} isOpen={lightboxIsOpen} diff --git a/apps/scandic-web/components/ContentType/HotelPage/Rooms/RoomCard/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/Rooms/RoomCard/index.tsx index 464b1ec53..dbc60c8a6 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/Rooms/RoomCard/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/Rooms/RoomCard/index.tsx @@ -34,7 +34,9 @@ export function RoomCard({ room }: RoomCardProps) { <ImageGallery images={galleryImages} title={intl.formatMessage( - { id: "{title} - Image gallery" }, + { + defaultMessage: "{title} - Image gallery", + }, { title: name } )} fill @@ -55,7 +57,8 @@ export function RoomCard({ room }: RoomCardProps) { <Body color="grey"> {intl.formatMessage( { - id: "{size} ({max, plural, one {{range} guest} other {{range} guests}})", + defaultMessage: + "{size} ({max, plural, one {{range} guest} other {{range} guests}})", }, { size, @@ -67,7 +70,9 @@ export function RoomCard({ room }: RoomCardProps) { </div> <Button intent="text" type="button" size="medium" theme="base" asChild> <Link scroll={false} href={`#s-room-${getRoomNameAsParam(name)}`}> - {intl.formatMessage({ id: "See room details" })} + {intl.formatMessage({ + defaultMessage: "See room details", + })} <MaterialIcon icon="chevron_right" size={20} color="CurrentColor" /> </Link> </Button> diff --git a/apps/scandic-web/components/ContentType/HotelPage/Rooms/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/Rooms/index.tsx index 7308ca1b3..62bffa80d 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/Rooms/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/Rooms/index.tsx @@ -38,7 +38,11 @@ export function Rooms({ rooms, preamble }: RoomsProps) { <div ref={scrollRef} className={styles.scrollRef}></div> <div className={styles.sectionHeader}> <Typography variant="Title/md" className={styles.heading}> - <h2>{intl.formatMessage({ id: "Rooms" })}</h2> + <h2> + {intl.formatMessage({ + defaultMessage: "Rooms", + })} + </h2> </Typography> {preamble && ( <Typography variant="Body/Paragraph/mdRegular"> diff --git a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/index.tsx index ab004c021..a092bd3f6 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/index.tsx @@ -31,20 +31,26 @@ export default async function ContactInformation({ <div className={styles.wrapper}> <Subtitle color="burgundy" asChild> <Title level="h3"> - {intl.formatMessage({ id: "Practical information" })} + {intl.formatMessage({ + defaultMessage: "Practical information", + })}
- {intl.formatMessage({ id: "Address" })} + {intl.formatMessage({ + defaultMessage: "Address", + })} {hotelAddress.streetAddress} {hotelAddress.city}
- {intl.formatMessage({ id: "Driving directions" })} + {intl.formatMessage({ + defaultMessage: "Driving directions", + })} - {intl.formatMessage({ id: "Google Maps" })} + {intl.formatMessage({ + defaultMessage: "Google Maps", + })}
- {intl.formatMessage({ id: "Contact us" })} + {intl.formatMessage({ + defaultMessage: "Contact us", + })} {intl.formatMessage({ - id: "Price 0,16 €/min + local call charges", + defaultMessage: "Price 0,16 €/min + local call charges", })} ) : null}
- {intl.formatMessage({ id: "Follow us" })} + {intl.formatMessage({ + defaultMessage: "Follow us", + })}
{socials.instagram && ( @@ -95,7 +107,9 @@ export default async function ContactInformation({
- {intl.formatMessage({ id: "Email" })} + {intl.formatMessage({ + defaultMessage: "Email", + })}
- {intl.formatMessage({ id: "Nordic Swan Ecolabel" })} + {intl.formatMessage({ + defaultMessage: "Nordic Swan Ecolabel", + })} {ecoLabels.svanenEcoLabelCertificateNumber} diff --git a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/index.tsx index 683ff2815..87e42a9df 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/index.tsx @@ -24,7 +24,9 @@ export default async function AboutTheHotelSidePeek({ return (
{preamble}
diff --git a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Accessibility/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Accessibility/index.tsx index 0667c30e1..af0acb0bd 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Accessibility/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Accessibility/index.tsx @@ -18,7 +18,9 @@ export default async function AccessibilityAmenity({ return ( - {intl.formatMessage({ id: "About accessibility" })} + {intl.formatMessage({ + defaultMessage: "About accessibility", + })} diff --git a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Breakfast/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Breakfast/index.tsx index 0bd9c2ce2..9b42adee9 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Breakfast/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Breakfast/index.tsx @@ -16,18 +16,26 @@ export default async function BreakfastAmenity({ const accordionContent = hotelType === HotelTypeEnum.ScandicGo ? ( - {intl.formatMessage({ id: "All-day breakfast" })} + + {intl.formatMessage({ + defaultMessage: "All-day breakfast", + })} + ) : ( ) return ( - {intl.formatMessage({ id: "Times" })} + + {intl.formatMessage({ + defaultMessage: "Times", + })} + {intl.formatMessage( - { id: "Check in from: {checkInTime}" }, + { + defaultMessage: "Check in from: {checkInTime}", + }, { checkInTime } )} {intl.formatMessage( - { id: "Check out at latest: {checkOutTime}" }, + { + defaultMessage: "Check out at latest: {checkOutTime}", + }, { checkOutTime } )} diff --git a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx index d485ca2d3..5c1568ee9 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx @@ -17,7 +17,9 @@ export default async function ParkingAmenity({ return ( - {intl.formatMessage({ id: "About parking" })} + {intl.formatMessage({ + defaultMessage: "About parking", + })} )}
diff --git a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx index 6599b49e4..0e9ef9147 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx @@ -45,7 +45,10 @@ export default async function AmenitiesSidePeek({ const breakfastDetail = restaurant.openingDetails.find( (details) => details.openingHours.name === "Breakfast" || - details.openingHours.name === intl.formatMessage({ id: "Breakfast" }) + details.openingHours.name === + intl.formatMessage({ + defaultMessage: "Breakfast", + }) ) return breakfastDetail }) @@ -54,7 +57,9 @@ export default async function AmenitiesSidePeek({ return (
- {intl.formatMessage({ id: "Creative spaces for meetings" })} + {intl.formatMessage({ + defaultMessage: "Creative spaces for meetings", + })} {primaryImage && ( @@ -84,7 +90,9 @@ export default async function MeetingsAndConferencesSidePeek({ color="burgundy" appendToCurrentPath > - {intl.formatMessage({ id: "Read more" })} + {intl.formatMessage({ + defaultMessage: "Read more", + })}
diff --git a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/MeetingsAndConferences/util.ts b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/MeetingsAndConferences/util.ts index c9bd177ea..5ccd5d0bc 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/MeetingsAndConferences/util.ts +++ b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/MeetingsAndConferences/util.ts @@ -28,12 +28,17 @@ export async function getRoomText(roomSizes: number[]) { let roomText if (largestRoom === smallestRoom) { - roomText = intl.formatMessage({ id: "{value} m²" }, { value: largestRoom }) + roomText = intl.formatMessage( + { + defaultMessage: "{value} m²", + }, + { value: largestRoom } + ) } else if (smallestRoom != null && largestRoom) { { roomText = intl.formatMessage( { - id: "{smallest}–{largest} m²", + defaultMessage: "{smallest}–{largest} m²", }, { largest: largestRoom, smallest: smallestRoom } ) @@ -50,14 +55,16 @@ export async function getSeatingText(roomSeating: number[]) { let seatingText if (biggestSeating === smallestSeating) { seatingText = intl.formatMessage( - { id: "{value, plural, one {# guest} other {# guests}}" }, + { + defaultMessage: "{value, plural, one {# guest} other {# guests}}", + }, { value: biggestSeating } ) } else if (smallestSeating != null && biggestSeating) { { seatingText = intl.formatMessage( { - id: "{lowest}–{highest} guests", + defaultMessage: "{lowest}–{highest} guests", }, { highest: biggestSeating, lowest: smallestSeating } ) diff --git a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/RestaurantBar/RestaurantBarItem/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/RestaurantBar/RestaurantBarItem/index.tsx index 80c725413..1eb811d2b 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/RestaurantBar/RestaurantBarItem/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/RestaurantBar/RestaurantBarItem/index.tsx @@ -55,7 +55,9 @@ export default async function RestaurantBarItem({

- {intl.formatMessage({ id: "Opening hours" })} + {intl.formatMessage({ + defaultMessage: "Opening hours", + })}

{openingDetails.map((details) => ( @@ -71,7 +73,9 @@ export default async function RestaurantBarItem({

- {intl.formatMessage({ id: "Menus" })} + {intl.formatMessage({ + defaultMessage: "Menus", + })}

    @@ -111,8 +115,12 @@ export default async function RestaurantBarItem({ trackingParams={{ restaurantName: name }} > {restaurantPage && !mainBody?.length - ? intl.formatMessage({ id: "Read more" }) - : intl.formatMessage({ id: "Book a table online" })} + ? intl.formatMessage({ + defaultMessage: "Read more", + }) + : intl.formatMessage({ + defaultMessage: "Book a table online", + })} ) : null} {restaurantPage && mainBody?.length ? ( @@ -124,7 +132,12 @@ export default async function RestaurantBarItem({ href={`/${restaurant.nameInUrl}`} appendToCurrentPath > - {intl.formatMessage({ id: "Discover {name}" }, { name: name })} + {intl.formatMessage( + { + defaultMessage: "Discover {name}", + }, + { name: name } + )} ) : null}
diff --git a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/RestaurantBar/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/RestaurantBar/index.tsx index 44fbd6fe3..3d9646a59 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/RestaurantBar/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/RestaurantBar/index.tsx @@ -16,7 +16,9 @@ export default async function RestaurantBarSidePeek({ return (
{restaurants.map((restaurant) => ( diff --git a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Room/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Room/index.tsx index 67f9b0bc2..752e46a48 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Room/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/Room/index.tsx @@ -51,24 +51,28 @@ export default async function RoomSidePeek({

{intl.formatMessage( { - id: "Max. {max, plural, one {{range} guest} other {{range} guests}}", + defaultMessage: + "Max. {max, plural, one {{range} guest} other {{range} guests}}", }, { max: totalOccupancy.max, range: totalOccupancy.range, } )} - .{" "} + {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} + {". "} {roomSize.min === roomSize.max ? intl.formatMessage( - { id: "{roomSize} m²" }, + { + defaultMessage: "{roomSize} m²", + }, { roomSize: roomSize.min, } ) : intl.formatMessage( { - id: "{roomSizeMin}–{roomSizeMax} m²", + defaultMessage: "{roomSizeMin}–{roomSizeMax} m²", }, { roomSizeMin: roomSize.min, @@ -92,7 +96,11 @@ export default async function RoomSidePeek({

-

{intl.formatMessage({ id: "Room amenities" })}

+

+ {intl.formatMessage({ + defaultMessage: "Room amenities", + })} +

    {room.roomFacilities @@ -125,10 +133,18 @@ export default async function RoomSidePeek({
    -

    {intl.formatMessage({ id: "Bed options" })}

    +

    + {intl.formatMessage({ + defaultMessage: "Bed options", + })} +

    -

    {intl.formatMessage({ id: "Based on availability" })}

    +

    + {intl.formatMessage({ + defaultMessage: "Based on availability", + })} +

      @@ -154,7 +170,9 @@ export default async function RoomSidePeek({
      diff --git a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/WellnessAndExercise/Facility/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/WellnessAndExercise/Facility/index.tsx index 29667026b..f2109ea94 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/WellnessAndExercise/Facility/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/WellnessAndExercise/Facility/index.tsx @@ -33,14 +33,21 @@ export default async function Facility({ data }: FacilityProps) {
      - {intl.formatMessage({ id: "Opening hours" })} + {intl.formatMessage({ + defaultMessage: "Opening hours", + })}
      {ordinaryOpeningTimes.alwaysOpen - ? intl.formatMessage({ id: "Monday–Friday: Always open" }) + ? intl.formatMessage({ + defaultMessage: "Monday–Friday: Always open", + }) : intl.formatMessage( - { id: "Monday–Friday: {openingTime}–{closingTime}" }, + { + defaultMessage: + "Monday–Friday: {openingTime}–{closingTime}", + }, { openingTime: ordinaryOpeningTimes.openingTime, closingTime: ordinaryOpeningTimes.closingTime, @@ -49,9 +56,14 @@ export default async function Facility({ data }: FacilityProps) { {weekendOpeningTimes.alwaysOpen - ? intl.formatMessage({ id: "Saturday–Sunday: Always open" }) + ? intl.formatMessage({ + defaultMessage: "Saturday–Sunday: Always open", + }) : intl.formatMessage( - { id: "Saturday–Sunday: {openingTime}–{closingTime}" }, + { + defaultMessage: + "Saturday–Sunday: {openingTime}–{closingTime}", + }, { openingTime: weekendOpeningTimes.openingTime, closingTime: weekendOpeningTimes.closingTime, diff --git a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/WellnessAndExercise/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/WellnessAndExercise/index.tsx index 7de759020..f5a4d1e06 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/WellnessAndExercise/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/WellnessAndExercise/index.tsx @@ -20,7 +20,9 @@ export default async function WellnessAndExerciseSidePeek({ return (
      {healthFacilities.map((facility) => ( @@ -44,7 +46,9 @@ export default async function WellnessAndExerciseSidePeek({ color="burgundy" appendToCurrentPath > - {intl.formatMessage({ id: "Show Gym & Wellness" })} + {intl.formatMessage({ + defaultMessage: "Show Gym & Wellness", + })} )} diff --git a/apps/scandic-web/components/ContentType/HotelPage/TabNavigation/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/TabNavigation/index.tsx index 5aa6754c4..e2af0b539 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/TabNavigation/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/TabNavigation/index.tsx @@ -40,11 +40,19 @@ export default function TabNavigation({ const tabLinks: { hash: HotelHashValues; text: string }[] = [ { hash: HotelHashValues.overview, - text: tabValues?.overview || intl.formatMessage({ id: "Overview" }), + text: + tabValues?.overview || + intl.formatMessage({ + defaultMessage: "Overview", + }), }, { hash: HotelHashValues.rooms, - text: tabValues?.rooms || intl.formatMessage({ id: "Rooms" }), + text: + tabValues?.rooms || + intl.formatMessage({ + defaultMessage: "Rooms", + }), }, ...(hasRestaurants ? [ @@ -52,7 +60,9 @@ export default function TabNavigation({ hash: HotelHashValues.restaurant, text: tabValues?.restaurant_bar || - intl.formatMessage({ id: "Restaurant & Bar" }), + intl.formatMessage({ + defaultMessage: "Restaurant & Bar", + }), }, ] : []), @@ -62,7 +72,9 @@ export default function TabNavigation({ hash: HotelHashValues.meetings, text: tabValues?.conferences_meetings || - intl.formatMessage({ id: "Meetings & Conferences" }), + intl.formatMessage({ + defaultMessage: "Meetings & Conferences", + }), }, ] : []), @@ -72,7 +84,9 @@ export default function TabNavigation({ hash: HotelHashValues.wellness, text: tabValues?.health_wellness || - intl.formatMessage({ id: "Gym & Wellness" }), + intl.formatMessage({ + defaultMessage: "Gym & Wellness", + }), }, ] : []), @@ -81,7 +95,10 @@ export default function TabNavigation({ { hash: HotelHashValues.activities, text: - tabValues?.activities || intl.formatMessage({ id: "Activities" }), + tabValues?.activities || + intl.formatMessage({ + defaultMessage: "Activities", + }), }, ] : []), @@ -89,7 +106,11 @@ export default function TabNavigation({ ? [ { hash: HotelHashValues.faq, - text: tabValues?.faq || intl.formatMessage({ id: "FAQ" }), + text: + tabValues?.faq || + intl.formatMessage({ + defaultMessage: "FAQ", + }), }, ] : []), diff --git a/apps/scandic-web/components/ContentType/HotelPage/utils.ts b/apps/scandic-web/components/ContentType/HotelPage/utils.ts index 4aae154dc..718698ba6 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/utils.ts +++ b/apps/scandic-web/components/ContentType/HotelPage/utils.ts @@ -54,19 +54,33 @@ export function getTrackingHotelData(hotelData: HotelData["hotel"]) { export function translateWellnessType(type: string, intl: IntlShape) { switch (type) { case HealthFacilitiesEnum.Gym: - return intl.formatMessage({ id: "Gym" }) + return intl.formatMessage({ + defaultMessage: "Gym", + }) case HealthFacilitiesEnum.IndoorPool: - return intl.formatMessage({ id: "Indoor pool" }) + return intl.formatMessage({ + defaultMessage: "Indoor pool", + }) case HealthFacilitiesEnum.Jacuzzi: - return intl.formatMessage({ id: "Jacuzzi" }) + return intl.formatMessage({ + defaultMessage: "Jacuzzi", + }) case HealthFacilitiesEnum.OutdoorPool: - return intl.formatMessage({ id: "Outdoor pool" }) + return intl.formatMessage({ + defaultMessage: "Outdoor pool", + }) case HealthFacilitiesEnum.Relax: - return intl.formatMessage({ id: "Relax" }) + return intl.formatMessage({ + defaultMessage: "Relax", + }) case HealthFacilitiesEnum.Sauna: - return intl.formatMessage({ id: "Sauna" }) + return intl.formatMessage({ + defaultMessage: "Sauna", + }) default: console.warn(`Unsupported group given: ${type}`) - return intl.formatMessage({ id: "Wellness" }) + return intl.formatMessage({ + defaultMessage: "Wellness", + }) } } diff --git a/apps/scandic-web/components/ContentType/HotelSubpage/AdditionalContent/Accessibility/index.tsx b/apps/scandic-web/components/ContentType/HotelSubpage/AdditionalContent/Accessibility/index.tsx index d88827665..3f36455c3 100644 --- a/apps/scandic-web/components/ContentType/HotelSubpage/AdditionalContent/Accessibility/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelSubpage/AdditionalContent/Accessibility/index.tsx @@ -27,7 +27,8 @@ export default function AccessibilityAdditionalContent({
    • {groupItem.details - ? `${groupItem.name}: ${groupItem.details}` + ? // eslint-disable-next-line formatjs/no-literal-string-in-jsx + `${groupItem.name}: ${groupItem.details}` : groupItem.name}
    • diff --git a/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/MeetingsSidebar.tsx b/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/MeetingsSidebar.tsx index cf50792cf..25e078654 100644 --- a/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/MeetingsSidebar.tsx +++ b/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/MeetingsSidebar.tsx @@ -24,7 +24,11 @@ export default async function MeetingsSidebar({
    diff --git a/apps/scandic-web/components/Current/Hero/index.tsx b/apps/scandic-web/components/Current/Hero/index.tsx index 4fa2c8e9c..f7a451139 100644 --- a/apps/scandic-web/components/Current/Hero/index.tsx +++ b/apps/scandic-web/components/Current/Hero/index.tsx @@ -1,3 +1,5 @@ +/* eslint-disable formatjs/no-literal-string-in-jsx */ + import Image from "@/components/Image" import styles from "./hero.module.css" diff --git a/apps/scandic-web/components/Current/LangPopup/index.tsx b/apps/scandic-web/components/Current/LangPopup/index.tsx index 27645c21a..423f6bb11 100644 --- a/apps/scandic-web/components/Current/LangPopup/index.tsx +++ b/apps/scandic-web/components/Current/LangPopup/index.tsx @@ -1,3 +1,5 @@ +/* eslint-disable formatjs/no-literal-string-in-jsx */ + import { headers } from "next/headers" import { Lang, localeToLang } from "@/constants/languages" diff --git a/apps/scandic-web/components/Current/NotFound/index.tsx b/apps/scandic-web/components/Current/NotFound/index.tsx index f048a9261..ddb4c3fe8 100644 --- a/apps/scandic-web/components/Current/NotFound/index.tsx +++ b/apps/scandic-web/components/Current/NotFound/index.tsx @@ -1,3 +1,5 @@ +/* eslint-disable formatjs/no-literal-string-in-jsx */ + import { getLang } from "@/i18n/serverContext" import { texts } from "./Texts" diff --git a/apps/scandic-web/components/DatePicker/Range/Desktop.tsx b/apps/scandic-web/components/DatePicker/Range/Desktop.tsx index 3452eecf5..4941dd3c4 100644 --- a/apps/scandic-web/components/DatePicker/Range/Desktop.tsx +++ b/apps/scandic-web/components/DatePicker/Range/Desktop.tsx @@ -108,7 +108,11 @@ export default function DatePickerRangeDesktop({ theme="base" > - {intl.formatMessage({ id: "Select dates" })} + + {intl.formatMessage({ + defaultMessage: "Select dates", + })} + diff --git a/apps/scandic-web/components/DatePicker/Range/Mobile.tsx b/apps/scandic-web/components/DatePicker/Range/Mobile.tsx index f81659b36..2b678c64c 100644 --- a/apps/scandic-web/components/DatePicker/Range/Mobile.tsx +++ b/apps/scandic-web/components/DatePicker/Range/Mobile.tsx @@ -101,7 +101,11 @@ export default function DatePickerRangeMobile({ theme="base" > - {intl.formatMessage({ id: "Select dates" })} + + {intl.formatMessage({ + defaultMessage: "Select dates", + })} + diff --git a/apps/scandic-web/components/DatePicker/Single/Desktop.tsx b/apps/scandic-web/components/DatePicker/Single/Desktop.tsx index 232c8bd8d..a249ed8c2 100644 --- a/apps/scandic-web/components/DatePicker/Single/Desktop.tsx +++ b/apps/scandic-web/components/DatePicker/Single/Desktop.tsx @@ -109,7 +109,11 @@ export default function DatePickerSingleDesktop({ theme="base" > - {intl.formatMessage({ id: "Select date" })} + + {intl.formatMessage({ + defaultMessage: "Select date", + })} + diff --git a/apps/scandic-web/components/DatePicker/Single/Mobile.tsx b/apps/scandic-web/components/DatePicker/Single/Mobile.tsx index 6c5d597d2..aad227952 100644 --- a/apps/scandic-web/components/DatePicker/Single/Mobile.tsx +++ b/apps/scandic-web/components/DatePicker/Single/Mobile.tsx @@ -92,7 +92,11 @@ export default function DatePickerSingleMobile({ theme="base" > - {intl.formatMessage({ id: "Select dates" })} + + {intl.formatMessage({ + defaultMessage: "Select dates", + })} + diff --git a/apps/scandic-web/components/DatePicker/index.tsx b/apps/scandic-web/components/DatePicker/index.tsx index b9a56cd0e..0bd89e004 100644 --- a/apps/scandic-web/components/DatePicker/index.tsx +++ b/apps/scandic-web/components/DatePicker/index.tsx @@ -146,7 +146,9 @@ export default function DatePickerForm({ name = "date" }: DatePickerFormProps) { {intl.formatMessage( - { id: "{selectedFromDate} - {selectedToDate}" }, + { + defaultMessage: "{selectedFromDate} - {selectedToDate}", + }, { selectedFromDate, selectedToDate, diff --git a/apps/scandic-web/components/DestinationFilterAndSort/Filter/index.tsx b/apps/scandic-web/components/DestinationFilterAndSort/Filter/index.tsx index 800b8f8b1..0a49ceda7 100644 --- a/apps/scandic-web/components/DestinationFilterAndSort/Filter/index.tsx +++ b/apps/scandic-web/components/DestinationFilterAndSort/Filter/index.tsx @@ -33,11 +33,19 @@ export default function Filter({ filters }: FilterProps) { return (
    - {intl.formatMessage({ id: "Filter by" })} + + {intl.formatMessage({ + defaultMessage: "Filter by", + })} +
    - {intl.formatMessage({ id: "Hotel facilities" })} + + {intl.formatMessage({ + defaultMessage: "Hotel facilities", + })} +
      {facilityFilters.map((filter) => ( @@ -55,7 +63,11 @@ export default function Filter({ filters }: FilterProps) {
      - {intl.formatMessage({ id: "Hotel surroundings" })} + + {intl.formatMessage({ + defaultMessage: "Hotel surroundings", + })} +
        {surroundingsFilters.map((filter) => ( diff --git a/apps/scandic-web/components/DestinationFilterAndSort/Sort/index.tsx b/apps/scandic-web/components/DestinationFilterAndSort/Sort/index.tsx index f67beebab..02a73504e 100644 --- a/apps/scandic-web/components/DestinationFilterAndSort/Sort/index.tsx +++ b/apps/scandic-web/components/DestinationFilterAndSort/Sort/index.tsx @@ -24,8 +24,12 @@ export default function Sort({ sortItems }: SortProps) { updateValue(e.target.value), })} diff --git a/apps/scandic-web/components/Forms/BookingWidget/FormContent/RewardNight/index.tsx b/apps/scandic-web/components/Forms/BookingWidget/FormContent/RewardNight/index.tsx index e4a592c8d..76a339c29 100644 --- a/apps/scandic-web/components/Forms/BookingWidget/FormContent/RewardNight/index.tsx +++ b/apps/scandic-web/components/Forms/BookingWidget/FormContent/RewardNight/index.tsx @@ -29,9 +29,12 @@ export default function RewardNight() { trigger, } = useFormContext() const ref = useRef(null) - const reward = intl.formatMessage({ id: "Book Reward Night" }) + const reward = intl.formatMessage({ + defaultMessage: "Book Reward Night", + }) const rewardNightTooltip = intl.formatMessage({ - id: "As a Scandic Friends member you need to be logged in to book a reward night (membership number and password). The points can be used to book reward nights at all Scandic hotels.", + defaultMessage: + "As a Scandic Friends member you need to be logged in to book a reward night (membership number and password). The points can be used to book reward nights at all Scandic hotels.", }) const redemptionErr = errors[REDEMPTION] const isMultiRoomError = redemptionErr?.message?.indexOf("Multi-room") === 0 @@ -122,7 +125,9 @@ export default function RewardNight() { color="Icon/Feedback/Information" className={styles.errorIcon} /> - {intl.formatMessage({ id: redemptionErr.message })} + {intl.formatMessage({ + defaultMessage: redemptionErr.message, + })} {isMultiRoomError ? : null}
    diff --git a/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/SearchList/ClearSearchButton/index.tsx b/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/SearchList/ClearSearchButton/index.tsx index 7f58ec5dc..65d2d0fef 100644 --- a/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/SearchList/ClearSearchButton/index.tsx +++ b/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/SearchList/ClearSearchButton/index.tsx @@ -35,7 +35,11 @@ export default function ClearSearchButton({ > - {intl.formatMessage({ id: "Clear searches" })} + + {intl.formatMessage({ + defaultMessage: "Clear searches", + })} + ) diff --git a/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/SearchList/index.tsx b/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/SearchList/index.tsx index 85f45aa76..afe44049d 100644 --- a/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/SearchList/index.tsx +++ b/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/SearchList/index.tsx @@ -90,9 +90,12 @@ export default function SearchList({ return ( ) @@ -102,9 +105,12 @@ export default function SearchList({ return ( ) @@ -115,9 +121,12 @@ export default function SearchList({ return ( ) @@ -147,11 +156,14 @@ export default function SearchList({ return ( - {intl.formatMessage({ id: "No results" })} + {intl.formatMessage({ + defaultMessage: "No results", + })} {intl.formatMessage({ - id: "We couldn't find a matching location for your search.", + defaultMessage: + "We couldn't find a matching location for your search.", })} {searchHistory && ( @@ -162,7 +174,9 @@ export default function SearchList({ color="uiTextPlaceholder" textTransform="uppercase" > - {intl.formatMessage({ id: "Latest searches" })} + {intl.formatMessage({ + defaultMessage: "Latest searches", + })} - {intl.formatMessage({ id: "Latest searches" })} + {intl.formatMessage({ + defaultMessage: "Latest searches", + })} diff --git a/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/index.tsx b/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/index.tsx index 8420c210b..d0fdd07b5 100644 --- a/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/index.tsx +++ b/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/index.tsx @@ -89,7 +89,11 @@ export default function Search({ handlePressEnter }: SearchProps) { color={isOpen ? "uiTextActive" : "red"} asChild > - {intl.formatMessage({ id: "Where to?" })} + + {intl.formatMessage({ + defaultMessage: "Where to?", + })} +
    @@ -101,7 +105,7 @@ export default function Search({ handlePressEnter }: SearchProps) { openMenu() }, placeholder: intl.formatMessage({ - id: "Hotels & Destinations", + defaultMessage: "Hotels & Destinations", }), value: searchTerm, ...register(SEARCH_TERM_NAME, { @@ -138,7 +142,11 @@ export function SearchSkeleton() {
    - {intl.formatMessage({ id: "Where to?" })} + + {intl.formatMessage({ + defaultMessage: "Where to?", + })} +
    diff --git a/apps/scandic-web/components/Forms/BookingWidget/FormContent/Voucher/index.tsx b/apps/scandic-web/components/Forms/BookingWidget/FormContent/Voucher/index.tsx index ba8e44181..424138329 100644 --- a/apps/scandic-web/components/Forms/BookingWidget/FormContent/Voucher/index.tsx +++ b/apps/scandic-web/components/Forms/BookingWidget/FormContent/Voucher/index.tsx @@ -26,8 +26,12 @@ export default function Voucher() { export function VoucherSkeleton() { const intl = useIntl() - const vouchers = intl.formatMessage({ id: "Code / Voucher" }) - const reward = intl.formatMessage({ id: "Book Reward Night" }) + const vouchers = intl.formatMessage({ + defaultMessage: "Code / Voucher", + }) + const reward = intl.formatMessage({ + defaultMessage: "Book Reward Night", + }) const form = useForm() diff --git a/apps/scandic-web/components/Forms/BookingWidget/FormContent/index.tsx b/apps/scandic-web/components/Forms/BookingWidget/FormContent/index.tsx index 744885db1..52d84b460 100644 --- a/apps/scandic-web/components/Forms/BookingWidget/FormContent/index.tsx +++ b/apps/scandic-web/components/Forms/BookingWidget/FormContent/index.tsx @@ -48,12 +48,13 @@ export default function FormContent({ {nights > 0 ? intl.formatMessage( { - id: "{totalNights, plural, one {# night} other {# nights}}", + defaultMessage: + "{totalNights, plural, one {# night} other {# nights}}", }, { totalNights: nights } ) : intl.formatMessage({ - id: "Check in", + defaultMessage: "Check in", })} @@ -61,7 +62,11 @@ export default function FormContent({
    @@ -105,7 +110,11 @@ export default function FormContent({ className={styles.buttonText} asChild > - {intl.formatMessage({ id: "Search" })} + + {intl.formatMessage({ + defaultMessage: "Search", + })} + @@ -129,7 +138,10 @@ export function BookingWidgetFormContentSkeleton() {
    {intl.formatMessage( - { id: "{totalNights, plural, one {# night} other {# nights}}" }, + { + defaultMessage: + "{totalNights, plural, one {# night} other {# nights}}", + }, { totalNights: 0 } )} @@ -137,7 +149,11 @@ export function BookingWidgetFormContentSkeleton() {
    - {intl.formatMessage({ id: "Rooms & Guests" })} + + {intl.formatMessage({ + defaultMessage: "Rooms & Guests", + })} +
    @@ -159,7 +175,11 @@ export function BookingWidgetFormContentSkeleton() { className={styles.buttonText} asChild > - {intl.formatMessage({ id: "Search" })} + + {intl.formatMessage({ + defaultMessage: "Search", + })} + diff --git a/apps/scandic-web/components/Forms/Edit/Profile/FormContent/index.tsx b/apps/scandic-web/components/Forms/Edit/Profile/FormContent/index.tsx index cdf5217c5..287c11bbd 100644 --- a/apps/scandic-web/components/Forms/Edit/Profile/FormContent/index.tsx +++ b/apps/scandic-web/components/Forms/Edit/Profile/FormContent/index.tsx @@ -21,21 +21,43 @@ export default function FormContent() { const lang = useLang() const languageOptions = getLocalizedLanguageOptions(lang) - const city = intl.formatMessage({ id: "City" }) - const country = intl.formatMessage({ id: "Country" }) - const email = `${intl.formatMessage({ id: "Email" })} ${intl.formatMessage({ id: "Address" }).toLowerCase()}` - const street = intl.formatMessage({ id: "Address" }) - const phoneNumber = intl.formatMessage({ id: "Phone number" }) - const currentPassword = intl.formatMessage({ id: "Current password" }) - const retypeNewPassword = intl.formatMessage({ id: "Retype new password" }) - const zipCode = intl.formatMessage({ id: "Zip code" }) + const city = intl.formatMessage({ + defaultMessage: "City", + }) + const country = intl.formatMessage({ + defaultMessage: "Country", + }) + const email = `${intl.formatMessage({ + defaultMessage: "Email", + })} ${intl + .formatMessage({ + defaultMessage: "Address", + }) + .toLowerCase()}` + const street = intl.formatMessage({ + defaultMessage: "Address", + }) + const phoneNumber = intl.formatMessage({ + defaultMessage: "Phone number", + }) + const currentPassword = intl.formatMessage({ + defaultMessage: "Current password", + }) + const retypeNewPassword = intl.formatMessage({ + defaultMessage: "Retype new password", + }) + const zipCode = intl.formatMessage({ + defaultMessage: "Zip code", + }) return ( <>
    - {intl.formatMessage({ id: "User information" })} + {intl.formatMessage({ + defaultMessage: "User information", + })}
    @@ -68,7 +90,9 @@ export default function FormContent() { @@ -122,7 +141,9 @@ export default function SignupForm({ title }: SignUpFormProps) {
    - {intl.formatMessage({ id: "Birth date" })} + {intl.formatMessage({ + defaultMessage: "Birth date", + })}
    - {intl.formatMessage({ id: "Password" })} + {intl.formatMessage({ + defaultMessage: "Password", + })}
    - {intl.formatMessage({ id: "Terms and conditions" })} + {intl.formatMessage({ + defaultMessage: "Terms and conditions", + })}
    - {intl.formatMessage({ id: "I accept" })} + {intl.formatMessage({ + defaultMessage: "I accept", + })} {/* TODO: Update copy once ready */} {intl.formatMessage( { - id: "By accepting the Terms and Conditions for Scandic Friends I understand that my personal data will be processed in accordance with Scandic's Privacy Policy.", + defaultMessage: + "By accepting the Terms and Conditions for Scandic Friends I understand that my personal data will be processed in accordance with Scandic's Privacy Policy.", }, { termsAndConditionsLink: (str) => ( diff --git a/apps/scandic-web/components/GuestsRoomsPicker/AdultSelector/index.tsx b/apps/scandic-web/components/GuestsRoomsPicker/AdultSelector/index.tsx index 94884200b..d05693f87 100644 --- a/apps/scandic-web/components/GuestsRoomsPicker/AdultSelector/index.tsx +++ b/apps/scandic-web/components/GuestsRoomsPicker/AdultSelector/index.tsx @@ -17,7 +17,9 @@ export default function AdultSelector({ }: SelectorProps) { const name = `rooms.${roomIndex}.adults` const intl = useIntl() - const adultsLabel = intl.formatMessage({ id: "Adults" }) + const adultsLabel = intl.formatMessage({ + defaultMessage: "Adults", + }) const { setValue } = useFormContext() function increaseAdultsCount() { diff --git a/apps/scandic-web/components/GuestsRoomsPicker/ChildSelector/ChildInfoSelector.tsx b/apps/scandic-web/components/GuestsRoomsPicker/ChildSelector/ChildInfoSelector.tsx index fbedbd796..2c6f5ec5f 100644 --- a/apps/scandic-web/components/GuestsRoomsPicker/ChildSelector/ChildInfoSelector.tsx +++ b/apps/scandic-web/components/GuestsRoomsPicker/ChildSelector/ChildInfoSelector.tsx @@ -33,9 +33,15 @@ export default function ChildInfoSelector({ const ageFieldName = `rooms.${roomIndex}.childrenInRoom.${index}.age` const bedFieldName = `rooms.${roomIndex}.childrenInRoom.${index}.bed` const intl = useIntl() - const ageLabel = intl.formatMessage({ id: "Age" }) - const bedLabel = intl.formatMessage({ id: "Bed" }) - const errorMessage = intl.formatMessage({ id: "Child age is required" }) + const ageLabel = intl.formatMessage({ + defaultMessage: "Age", + }) + const bedLabel = intl.formatMessage({ + defaultMessage: "Bed", + }) + const errorMessage = intl.formatMessage({ + defaultMessage: "Child age is required", + }) const { setValue, formState } = useFormContext() function updateSelectedBed(bed: number) { @@ -50,15 +56,21 @@ export default function ChildInfoSelector({ const allBedTypes: ChildBed[] = [ { - label: intl.formatMessage({ id: "In adults bed" }), + label: intl.formatMessage({ + defaultMessage: "In adults bed", + }), value: ChildBedMapEnum.IN_ADULTS_BED, }, { - label: intl.formatMessage({ id: "In crib" }), + label: intl.formatMessage({ + defaultMessage: "In crib", + }), value: ChildBedMapEnum.IN_CRIB, }, { - label: intl.formatMessage({ id: "In extra bed" }), + label: intl.formatMessage({ + defaultMessage: "In extra bed", + }), value: ChildBedMapEnum.IN_EXTRA_BED, }, ] diff --git a/apps/scandic-web/components/GuestsRoomsPicker/ChildSelector/index.tsx b/apps/scandic-web/components/GuestsRoomsPicker/ChildSelector/index.tsx index 1ce8ffa77..3a74690fc 100644 --- a/apps/scandic-web/components/GuestsRoomsPicker/ChildSelector/index.tsx +++ b/apps/scandic-web/components/GuestsRoomsPicker/ChildSelector/index.tsx @@ -19,7 +19,9 @@ export default function ChildSelector({ currentChildren, }: SelectorProps) { const intl = useIntl() - const childrenLabel = intl.formatMessage({ id: "Children" }) + const childrenLabel = intl.formatMessage({ + defaultMessage: "Children", + }) const { setValue } = useFormContext() function increaseChildrenCount(roomIndex: number) { diff --git a/apps/scandic-web/components/GuestsRoomsPicker/Form.tsx b/apps/scandic-web/components/GuestsRoomsPicker/Form.tsx index b9b391191..3c91477ac 100644 --- a/apps/scandic-web/components/GuestsRoomsPicker/Form.tsx +++ b/apps/scandic-web/components/GuestsRoomsPicker/Form.tsx @@ -32,16 +32,22 @@ export default function GuestsRoomsPickerDialog({ const { getFieldState, trigger, setValue, getValues } = useFormContext() const roomsValue = useWatch({ name: "rooms" }) - const addRoomLabel = intl.formatMessage({ id: "Add room" }) - const doneLabel = intl.formatMessage({ id: "Done" }) + const addRoomLabel = intl.formatMessage({ + defaultMessage: "Add room", + }) + const doneLabel = intl.formatMessage({ + defaultMessage: "Done", + }) // Disable add room if booking code is either voucher or corporate cheque, or reward night is enabled const addRoomDisabledTextForSpecialRate = getValues(REDEMPTION) ? intl.formatMessage({ - id: "Multi-room booking is not available with reward night.", + defaultMessage: + "Multi-room booking is not available with reward night.", }) : getValues("bookingCode.value")?.toLowerCase().startsWith("vo") && intl.formatMessage({ - id: "Multi-room booking is not available with this booking code.", + defaultMessage: + "Multi-room booking is not available with this booking code.", }) const handleClose = useCallback(async () => { diff --git a/apps/scandic-web/components/GuestsRoomsPicker/GuestsRoom/index.tsx b/apps/scandic-web/components/GuestsRoomsPicker/GuestsRoom/index.tsx index 0ee57b6ac..44c84d332 100644 --- a/apps/scandic-web/components/GuestsRoomsPicker/GuestsRoom/index.tsx +++ b/apps/scandic-web/components/GuestsRoomsPicker/GuestsRoom/index.tsx @@ -25,7 +25,9 @@ export function GuestsRoom({ }) { const intl = useIntl() const roomLabel = intl.formatMessage( - { id: "Room {roomIndex}" }, + { + defaultMessage: "Room {roomIndex}", + }, { roomIndex: index + 1, } @@ -64,7 +66,9 @@ export function GuestsRoom({ className={styles.roomActionsButton} > - {intl.formatMessage({ id: "Remove room" })} + {intl.formatMessage({ + defaultMessage: "Remove room", + })} )}
    diff --git a/apps/scandic-web/components/GuestsRoomsPicker/index.tsx b/apps/scandic-web/components/GuestsRoomsPicker/index.tsx index f37e26db7..6b8ad7f82 100644 --- a/apps/scandic-web/components/GuestsRoomsPicker/index.tsx +++ b/apps/scandic-web/components/GuestsRoomsPicker/index.tsx @@ -138,11 +138,15 @@ function Trigger({ const parts = [ intl.formatMessage( - { id: "{totalRooms, plural, one {# room} other {# rooms}}" }, + { + defaultMessage: "{totalRooms, plural, one {# room} other {# rooms}}", + }, { totalRooms: rooms.length } ), intl.formatMessage( - { id: "{totalAdults, plural, one {# adult} other {# adults}}" }, + { + defaultMessage: "{totalAdults, plural, one {# adult} other {# adults}}", + }, { totalAdults: rooms.reduce((acc, room) => acc + room.adults, 0) } ), ] @@ -151,7 +155,8 @@ function Trigger({ parts.push( intl.formatMessage( { - id: "{totalChildren, plural, one {# child} other {# children}}", + defaultMessage: + "{totalChildren, plural, one {# child} other {# children}}", }, { totalChildren: rooms.reduce( diff --git a/apps/scandic-web/components/Header/MainMenu/LogoLink/index.tsx b/apps/scandic-web/components/Header/MainMenu/LogoLink/index.tsx index 651169f07..b005c53d4 100644 --- a/apps/scandic-web/components/Header/MainMenu/LogoLink/index.tsx +++ b/apps/scandic-web/components/Header/MainMenu/LogoLink/index.tsx @@ -28,7 +28,9 @@ export function LogoLink() { className={styles.logoLink} href={`/${lang}`} onClick={handleNavigate} - aria-label={intl.formatMessage({ id: "Back to scandichotels.com" })} + aria-label={intl.formatMessage({ + defaultMessage: "Back to scandichotels.com", + })} > {children}
    @@ -92,14 +94,18 @@ export default function MobileMenu({ iconName={IconName.Search} onClick={() => toggleDropdown(DropdownTypeEnum.HamburgerMenu)} > - {intl.formatMessage({ id: "Find booking" })} + {intl.formatMessage({ + defaultMessage: "Find booking", + })} - {intl.formatMessage({ id: "Customer service" })} + {intl.formatMessage({ + defaultMessage: "Customer service", + })}
    @@ -118,7 +124,7 @@ export function MobileMenuSkeleton() { disabled className={styles.hamburger} aria-label={intl.formatMessage({ - id: "Open menu", + defaultMessage: "Open menu", })} > diff --git a/apps/scandic-web/components/Header/MainMenu/MyPagesMenu/index.tsx b/apps/scandic-web/components/Header/MainMenu/MyPagesMenu/index.tsx index 50318fc63..b29de0d25 100644 --- a/apps/scandic-web/components/Header/MainMenu/MyPagesMenu/index.tsx +++ b/apps/scandic-web/components/Header/MainMenu/MyPagesMenu/index.tsx @@ -61,7 +61,9 @@ export default function MyPagesMenu({ {intl.formatMessage( - { id: "Hi {firstName}!" }, + { + defaultMessage: "Hi {firstName}!", + }, { firstName: user.firstName } )} diff --git a/apps/scandic-web/components/Header/MainMenu/MyPagesMenuContent/index.tsx b/apps/scandic-web/components/Header/MainMenu/MyPagesMenuContent/index.tsx index 67e84c957..75a2fcb73 100644 --- a/apps/scandic-web/components/Header/MainMenu/MyPagesMenuContent/index.tsx +++ b/apps/scandic-web/components/Header/MainMenu/MyPagesMenuContent/index.tsx @@ -48,7 +48,9 @@ export default function MyPagesMenuContent({
    {intl.formatMessage( - { id: "Hi {firstName}!" }, + { + defaultMessage: "Hi {firstName}!", + }, { firstName: user.firstName } )} @@ -57,7 +59,9 @@ export default function MyPagesMenuContent({ {membershipLevel.name} {intl.formatMessage( - { id: "{pointsAmount, number} points" }, + { + defaultMessage: "{pointsAmount, number} points", + }, { pointsAmount: membershipPoints } )} @@ -150,7 +154,9 @@ function SecondaryLinks({ variant="menu" className={styles.link} > - {intl.formatMessage({ id: "Log out" })} + {intl.formatMessage({ + defaultMessage: "Log out", + })}
diff --git a/apps/scandic-web/components/Header/MainMenu/MyPagesMenuWrapper/index.tsx b/apps/scandic-web/components/Header/MainMenu/MyPagesMenuWrapper/index.tsx index 6ef9a075c..b275b47f6 100644 --- a/apps/scandic-web/components/Header/MainMenu/MyPagesMenuWrapper/index.tsx +++ b/apps/scandic-web/components/Header/MainMenu/MyPagesMenuWrapper/index.tsx @@ -57,13 +57,17 @@ export default function MyPagesMenuWrapper() { ) : ( - {intl.formatMessage({ id: "Log in/Join" })} + {intl.formatMessage({ + defaultMessage: "Log in/Join", + })} )} diff --git a/apps/scandic-web/components/Header/MainMenu/MyPagesMobileMenu/index.tsx b/apps/scandic-web/components/Header/MainMenu/MyPagesMobileMenu/index.tsx index 31db8ee17..d2ead5b65 100644 --- a/apps/scandic-web/components/Header/MainMenu/MyPagesMobileMenu/index.tsx +++ b/apps/scandic-web/components/Header/MainMenu/MyPagesMobileMenu/index.tsx @@ -52,14 +52,18 @@ export default function MyPagesMobileMenu({ toggleDropdown(DropdownTypeEnum.MyPagesMobileMenu)} - aria-label={intl.formatMessage({ id: "Open my pages menu" })} + aria-label={intl.formatMessage({ + defaultMessage: "Open my pages menu", + })} > - {intl.formatMessage({ id: "Find booking" })} + {intl.formatMessage({ + defaultMessage: "Find booking", + })}
diff --git a/apps/scandic-web/components/HotelReservation/AddToCalendar/index.tsx b/apps/scandic-web/components/HotelReservation/AddToCalendar/index.tsx index 0e95a51fa..4830d7543 100644 --- a/apps/scandic-web/components/HotelReservation/AddToCalendar/index.tsx +++ b/apps/scandic-web/components/HotelReservation/AddToCalendar/index.tsx @@ -26,7 +26,11 @@ export default function AddToCalendar({ createEvent(event, (error, value) => { if (error) { console.error("ICS Error:", error) - toast.error(intl.formatMessage({ id: "Failed to add to calendar" })) + toast.error( + intl.formatMessage({ + defaultMessage: "Failed to add to calendar", + }) + ) return } @@ -42,7 +46,11 @@ export default function AddToCalendar({ }) } catch (error) { console.error("Download error:", error) - toast.error(intl.formatMessage({ id: "Failed to add to calendar" })) + toast.error( + intl.formatMessage({ + defaultMessage: "Failed to add to calendar", + }) + ) } } diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Alerts/index.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Alerts/index.tsx index a198f895f..bb603c71a 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Alerts/index.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Alerts/index.tsx @@ -26,10 +26,11 @@ export default function Alerts({ booking }: BookingConfirmationAlertsProps) { )} @@ -38,10 +39,11 @@ export default function Alerts({ booking }: BookingConfirmationAlertsProps) { )} diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/Actions/AddToCalendarButton.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/Actions/AddToCalendarButton.tsx index d0edbe334..8b70567dd 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/Actions/AddToCalendarButton.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/Actions/AddToCalendarButton.tsx @@ -15,7 +15,9 @@ export default function AddToCalendarButton({ return ( ) } diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/Actions/DownloadInvoice.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/Actions/DownloadInvoice.tsx index 2ee92e4ee..a63aeaa32 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/Actions/DownloadInvoice.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/Actions/DownloadInvoice.tsx @@ -26,7 +26,9 @@ export default function DownloadInvoice({ mainRef }: DownloadInvoiceProps) { wrapping > - {intl.formatMessage({ id: "Download invoice" })} + {intl.formatMessage({ + defaultMessage: "Download invoice", + })} ) } diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/Actions/ManageBooking.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/Actions/ManageBooking.tsx index 7a3e8bb82..28a81406d 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/Actions/ManageBooking.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/Actions/ManageBooking.tsx @@ -22,7 +22,9 @@ export default function ManageBooking({ bookingUrl }: ManageBookingProps) { > - {intl.formatMessage({ id: "Manage booking" })} + {intl.formatMessage({ + defaultMessage: "Manage booking", + })} ) diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/index.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/index.tsx index bf2bf406b..43f9ceeed 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/index.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/index.tsx @@ -32,7 +32,8 @@ export default function Header({ const text = intl.formatMessage( { - id: "Thank you for booking with us! We look forward to welcoming you and hope you have a pleasant stay. If you have any questions or need to make changes to your reservation, please contact us.", + defaultMessage: + "Thank you for booking with us! We look forward to welcoming you and hope you have a pleasant stay. If you have any questions or need to make changes to your reservation, please contact us.", }, { emailLink: (str) => ( @@ -68,7 +69,9 @@ export default function Header({
- {intl.formatMessage({ id: "Booking confirmation" })} + {intl.formatMessage({ + defaultMessage: "Booking confirmation", + })} {hotel.name} @@ -76,7 +79,9 @@ export default function Header({ </hgroup> <Subtitle color="uiTextHighContrast" type="two"> {intl.formatMessage( - { id: "Booking number {value}" }, + { + defaultMessage: "Booking number {value}", + }, { value: booking.confirmationNumber, } diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/HotelDetails/index.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/HotelDetails/index.tsx index 3e14457f5..78066506a 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/HotelDetails/index.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/HotelDetails/index.tsx @@ -18,13 +18,17 @@ export default function HotelDetails({ <div className={styles.container}> <div className={styles.details}> <Subtitle color="uiTextHighContrast" type="two"> - {intl.formatMessage({ id: "Hotel details" })} + {intl.formatMessage({ + defaultMessage: "Hotel details", + })} </Subtitle> <div className={styles.hotel}> <Body color="uiTextHighContrast">{hotel.name}</Body> <Body color="uiTextHighContrast"> {intl.formatMessage( - { id: "{streetAddress}, {zipCode} {city}" }, + { + defaultMessage: "{streetAddress}, {zipCode} {city}", + }, { streetAddress: hotel.address.streetAddress, zipCode: hotel.address.zipCode, diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/PaymentDetails/index.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/PaymentDetails/index.tsx index 9f85d4269..facf18909 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/PaymentDetails/index.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/PaymentDetails/index.tsx @@ -24,13 +24,17 @@ export default function PaymentDetails() { return ( <div className={styles.details}> <Subtitle color="uiTextHighContrast" type="two"> - {intl.formatMessage({ id: "Payment details" })} + {intl.formatMessage({ + defaultMessage: "Payment details", + })} </Subtitle> <div className={styles.payment}> {hasAllRoomsLoaded ? ( <Body color="uiTextHighContrast"> {intl.formatMessage( - { id: "Total cost: {amount}" }, + { + defaultMessage: "Total cost: {amount}", + }, { amount: formattedTotalCost, } diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/PriceDetailsModal/index.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/PriceDetailsModal/index.tsx index ab0e9c01d..aa776375a 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/PriceDetailsModal/index.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/PriceDetailsModal/index.tsx @@ -117,7 +117,9 @@ export default function PriceDetailsModal() { const diff = dt(checkOutDate).diff(checkInDate, "days") const nights = intl.formatMessage( - { id: "{totalNights, plural, one {# night} other {# nights}}" }, + { + defaultMessage: "{totalNights, plural, one {# night} other {# nights}}", + }, { totalNights: diff } ) @@ -126,11 +128,15 @@ export default function PriceDetailsModal() { ${dt(toDate).locale(lang).format("ddd, D MMM")} (${nights})` return ( <Modal - title={intl.formatMessage({ id: "Price details" })} + title={intl.formatMessage({ + defaultMessage: "Price details", + })} trigger={ <Button intent="text"> <Caption color="burgundy"> - {intl.formatMessage({ id: "Price details" })} + {intl.formatMessage({ + defaultMessage: "Price details", + })} </Caption> <MaterialIcon icon="chevron_right" color="CurrentColor" size={20} /> </Button> @@ -144,7 +150,9 @@ export default function PriceDetailsModal() { {rooms.length > 1 && ( <TableSectionHeader title={intl.formatMessage( - { id: "Room {roomIndex}" }, + { + defaultMessage: "Room {roomIndex}", + }, { roomIndex: idx + 1 } )} bold @@ -172,7 +180,9 @@ export default function PriceDetailsModal() { ) : null} <Row bold - label={intl.formatMessage({ id: "Room charge" })} + label={intl.formatMessage({ + defaultMessage: "Room charge", + })} value={room.formattedRoomCost} /> </TableSection> @@ -182,7 +192,8 @@ export default function PriceDetailsModal() { <Row label={intl.formatMessage( { - id: "Breakfast ({totalAdults, plural, one {# adult} other {# adults}}) x {totalBreakfasts}", + defaultMessage: + "Breakfast ({totalAdults, plural, one {# adult} other {# adults}}) x {totalBreakfasts}", }, { totalAdults: room.adults, totalBreakfasts: diff } )} @@ -196,7 +207,8 @@ export default function PriceDetailsModal() { <Row label={intl.formatMessage( { - id: "Breakfast ({totalChildren, plural, one {# child} other {# children}}) x {totalBreakfasts}", + defaultMessage: + "Breakfast ({totalChildren, plural, one {# child} other {# children}}) x {totalBreakfasts}", }, { totalChildren: room.childrenAges.length, @@ -209,7 +221,7 @@ export default function PriceDetailsModal() { <Row bold label={intl.formatMessage({ - id: "Breakfast charge", + defaultMessage: "Breakfast charge", })} value={formatPrice( intl, @@ -223,15 +235,26 @@ export default function PriceDetailsModal() { ) : null })} <TableSection> - <TableSectionHeader title={intl.formatMessage({ id: "Total" })} /> + <TableSectionHeader + title={intl.formatMessage({ + defaultMessage: "Total", + })} + /> {isVatCurrency ? ( <> <Row - label={intl.formatMessage({ id: "Price excluding VAT" })} + label={intl.formatMessage({ + defaultMessage: "Price excluding VAT", + })} value={formatPrice(intl, bookingTotal.priceExVat, currencyCode)} /> <Row - label={intl.formatMessage({ id: "VAT {vat}%" }, { vat })} + label={intl.formatMessage( + { + defaultMessage: "VAT {vat}%", + }, + { vat } + )} value={formatPrice(intl, bookingTotal.vatAmount, currencyCode)} /> </> @@ -239,7 +262,11 @@ export default function PriceDetailsModal() { <tr className={styles.row}> <td> <Typography variant="Body/Paragraph/mdBold"> - <span>{intl.formatMessage({ id: "Price including VAT" })}</span> + <span> + {intl.formatMessage({ + defaultMessage: "Price including VAT", + })} + </span> </Typography> </td> <td className={styles.price}> @@ -257,7 +284,10 @@ export default function PriceDetailsModal() { icon={<DiscountIcon color="Icon/Feedback/Information" />} > {intl.formatMessage( - { id: "<strong>Booking code</strong>: {value}" }, + { + defaultMessage: + "<strong>Booking code</strong>: {value}", + }, { value: bookingCode, strong: (text) => ( diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Promos/index.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Promos/index.tsx index 1ee922763..c35b08676 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Promos/index.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Promos/index.tsx @@ -25,20 +25,30 @@ export default function Promos({ return ( <div className={styles.promos}> <Promo - buttonText={intl.formatMessage({ id: "View and buy add-ons" })} + buttonText={intl.formatMessage({ + defaultMessage: "View and buy add-ons", + })} href={`${myBookingUrl}?bookingId=${confirmationNumber}&lastName=${lastName}`} text={intl.formatMessage({ - id: "Discover the little extra touches to make your upcoming stay even more unforgettable.", + defaultMessage: + "Discover the little extra touches to make your upcoming stay even more unforgettable.", + })} + title={intl.formatMessage({ + defaultMessage: "Spice things up", })} - title={intl.formatMessage({ id: "Spice things up" })} /> <Promo - buttonText={intl.formatMessage({ id: "Book another stay" })} + buttonText={intl.formatMessage({ + defaultMessage: "Book another stay", + })} href={`${homeUrl}?hotel=${hotelId}`} text={intl.formatMessage({ - id: "Get inspired and start dreaming beyond your next trip. Explore more Scandic destinations.", + defaultMessage: + "Get inspired and start dreaming beyond your next trip. Explore more Scandic destinations.", + })} + title={intl.formatMessage({ + defaultMessage: "Book your next stay", })} - title={intl.formatMessage({ id: "Book your next stay" })} /> </div> ) diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Receipt/Room/index.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Receipt/Room/index.tsx index 1e4219901..52cac6d6f 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Receipt/Room/index.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Receipt/Room/index.tsx @@ -66,7 +66,10 @@ export default function ReceiptRoom({ <Typography variant="Body/Paragraph/mdRegular"> <p className={styles.uiTextMediumContrast}> {intl.formatMessage( - { id: "{totalAdults, plural, one {# adult} other {# adults}}" }, + { + defaultMessage: + "{totalAdults, plural, one {# adult} other {# adults}}", + }, { totalAdults: room.adults, } @@ -88,7 +91,9 @@ export default function ReceiptRoom({ textDecoration="underline" variant="icon" > - {intl.formatMessage({ id: "Reservation policy" })} + {intl.formatMessage({ + defaultMessage: "Reservation policy", + })} <MaterialIcon icon="info" color="CurrentColor" /> </Link> </Button> @@ -101,8 +106,12 @@ export default function ReceiptRoom({ subtitle={ room.rateDefinition.cancellationRule === CancellationRuleEnum.CancellableBefore6PM - ? intl.formatMessage({ id: "Pay later" }) - : intl.formatMessage({ id: "Pay now" }) + ? intl.formatMessage({ + defaultMessage: "Pay later", + }) + : intl.formatMessage({ + defaultMessage: "Pay now", + }) } > <div className={styles.terms}> @@ -161,14 +170,18 @@ export default function ReceiptRoom({ <Typography variant="Body/Paragraph/mdRegular"> <p className={styles.uiTextHighContrast}> {intl.formatMessage( - { id: "Crib (child) × {count}" }, + { + defaultMessage: "Crib (child) × {count}", + }, { count: childBedCrib.quantity } )} </p> </Typography> <Typography variant="Body/Supporting text (caption)/smRegular"> <p className={styles.uiTextHighContrast}> - {intl.formatMessage({ id: "Based on availability" })} + {intl.formatMessage({ + defaultMessage: "Based on availability", + })} </p> </Typography> </div> @@ -185,7 +198,9 @@ export default function ReceiptRoom({ <Typography variant="Body/Paragraph/mdRegular"> <p className={styles.uiTextHighContrast}> {intl.formatMessage( - { id: "Extra bed (child) × {count}" }, + { + defaultMessage: "Extra bed (child) × {count}", + }, { count: childBedExtraBed.quantity, } @@ -203,12 +218,18 @@ export default function ReceiptRoom({ {room.breakfast || breakfastIncluded ? ( <div className={styles.entry}> <Typography variant="Body/Paragraph/mdRegular"> - <p>{intl.formatMessage({ id: "Breakfast buffet" })}</p> + <p> + {intl.formatMessage({ + defaultMessage: "Breakfast buffet", + })} + </p> </Typography> {breakfastIncluded ? ( <Typography variant="Body/Paragraph/mdRegular"> <p className={styles.red}> - {intl.formatMessage({ id: "Included" })} + {intl.formatMessage({ + defaultMessage: "Included", + })} </p> </Typography> ) : null} diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Receipt/TotalPrice/index.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Receipt/TotalPrice/index.tsx index 3b1852b01..8218aadd7 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Receipt/TotalPrice/index.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Receipt/TotalPrice/index.tsx @@ -30,7 +30,11 @@ export default function TotalPrice() { <div className={styles.price}> <div className={styles.entry}> <Typography variant="Body/Paragraph/mdBold"> - <p>{intl.formatMessage({ id: "Total price" })}</p> + <p> + {intl.formatMessage({ + defaultMessage: "Total price", + })} + </p> </Typography> {hasAllRoomsLoaded ? ( <Typography variant="Body/Paragraph/mdBold"> diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Receipt/index.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Receipt/index.tsx index 698e17e46..50d026cc0 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Receipt/index.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Receipt/index.tsx @@ -19,7 +19,9 @@ export default function Receipt() { return ( <section className={styles.receipt}> <Subtitle type="two"> - {intl.formatMessage({ id: "Booking summary" })} + {intl.formatMessage({ + defaultMessage: "Booking summary", + })} </Subtitle> {rooms.map((room, idx) => ( @@ -27,7 +29,9 @@ export default function Receipt() { {rooms.length > 1 ? ( <Body color="uiTextHighContrast" textTransform={"bold"}> {intl.formatMessage( - { id: "Room {roomIndex}" }, + { + defaultMessage: "Room {roomIndex}", + }, { roomIndex: idx + 1 } )} </Body> diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Rooms/LinkedReservation/Retry.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Rooms/LinkedReservation/Retry.tsx index 4cb7cbbf5..72bd589ab 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Rooms/LinkedReservation/Retry.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Rooms/LinkedReservation/Retry.tsx @@ -13,10 +13,16 @@ export default function Retry({ handleRefetch }: RetryProps) { const intl = useIntl() return ( <div className={styles.retry}> - <Body>{intl.formatMessage({ id: "Something went wrong!" })}</Body> + <Body> + {intl.formatMessage({ + defaultMessage: "Something went wrong!", + })} + </Body> <Button size={"small"} onPress={handleRefetch}> - {intl.formatMessage({ id: "Try again" })} + {intl.formatMessage({ + defaultMessage: "Try again", + })} </Button> </div> ) diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Rooms/Room/index.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Rooms/Room/index.tsx index 3f61d7da3..67f3f5ea1 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Rooms/Room/index.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Rooms/Room/index.tsx @@ -50,7 +50,9 @@ export default function Room({ size={20} /> <Caption> - {intl.formatMessage({ id: "Membership benefits applied" })} + {intl.formatMessage({ + defaultMessage: "Membership benefits applied", + })} </Caption> </> ) : null} @@ -65,10 +67,15 @@ export default function Room({ <Typography variant="Body/Supporting text (caption)/smRegular"> <p> <strong> - {intl.formatMessage({ id: "Booking guaranteed." })} - </strong>{" "} + {intl.formatMessage({ + defaultMessage: "Booking guaranteed.", + })} + </strong> + {/* eslint-disable formatjs/no-literal-string-in-jsx */}{" "} + {/* eslint-enable formatjs/no-literal-string-in-jsx */} {intl.formatMessage({ - id: "Your room will remain available for check-in even after 18:00.", + defaultMessage: + "Your room will remain available for check-in even after 18:00.", })} </p> </Typography> @@ -92,7 +99,9 @@ export default function Room({ {roomName} </Subtitle> <Link color="burgundy" href="" variant="icon"> - {intl.formatMessage({ id: "View room details" })} + {intl.formatMessage({ + defaultMessage: "View room details", + })} <MaterialIcon icon="chevron_right" size={20} @@ -103,11 +112,15 @@ export default function Room({ <ul className={styles.details}> <li className={styles.listItem}> <Body color="uiTextPlaceholder"> - {intl.formatMessage({ id: "Check-in" })} + {intl.formatMessage({ + defaultMessage: "Check-in", + })} </Body> <Body color="uiTextHighContrast"> {intl.formatMessage( - { id: "{checkInDate} from {checkInTime}" }, + { + defaultMessage: "{checkInDate} from {checkInTime}", + }, { checkInDate: fromDate.format("ddd, D MMM"), checkInTime: checkInTime, @@ -117,11 +130,15 @@ export default function Room({ </li> <li className={styles.listItem}> <Body color="uiTextPlaceholder"> - {intl.formatMessage({ id: "Check-out" })} + {intl.formatMessage({ + defaultMessage: "Check-out", + })} </Body> <Body color="uiTextHighContrast"> {intl.formatMessage( - { id: "{checkOutDate} from {checkOutTime}" }, + { + defaultMessage: "{checkOutDate} from {checkOutTime}", + }, { checkOutDate: toDate.format("ddd, D MMM"), checkOutTime: checkOutTime, @@ -131,7 +148,9 @@ export default function Room({ </li> <li className={styles.listItem}> <Body color="uiTextPlaceholder"> - {intl.formatMessage({ id: "Cancellation policy" })} + {intl.formatMessage({ + defaultMessage: "Cancellation policy", + })} </Body> <Body color="uiTextHighContrast"> {booking.rateDefinition.cancellationText} @@ -140,11 +159,15 @@ export default function Room({ {isFlexBooking || isChangeBooking ? ( <li className={styles.listItem}> <Body color="uiTextPlaceholder"> - {intl.formatMessage({ id: "Rebooking" })} + {intl.formatMessage({ + defaultMessage: "Rebooking", + })} </Body> <Body color="uiTextHighContrast"> {intl.formatMessage( - { id: "Until {time}, {date}" }, + { + defaultMessage: "Until {time}, {date}", + }, { time: "18:00", date: fromDate.format("dddd D MMM") } )} </Body> @@ -153,13 +176,17 @@ export default function Room({ </ul> <div className={styles.guest}> <Body color="uiTextPlaceholder"> - {intl.formatMessage({ id: "Main guest" })} + {intl.formatMessage({ + defaultMessage: "Main guest", + })} </Body> <Body color="uiTextHighContrast">{guestName}</Body> {booking.guest.membershipNumber ? ( <Body color="uiTextHighContrast"> {intl.formatMessage( - { id: "Friend no. {value}" }, + { + defaultMessage: "Friend no. {value}", + }, { value: booking.guest.membershipNumber, } diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Rooms/index.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Rooms/index.tsx index 477fa1279..498e4347c 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Rooms/index.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Rooms/index.tsx @@ -22,7 +22,12 @@ export default async function Rooms({ <div className={styles.room}> {linkedReservations.length ? ( <Subtitle color="mainGrey60" type="two"> - {intl.formatMessage({ id: "Room {roomIndex}" }, { roomIndex: 1 })} + {intl.formatMessage( + { + defaultMessage: "Room {roomIndex}", + }, + { roomIndex: 1 } + )} </Subtitle> ) : null} <Room @@ -38,7 +43,9 @@ export default async function Rooms({ <div className={styles.room} key={reservation.confirmationNumber}> <Subtitle color="mainGrey60" type="two"> {intl.formatMessage( - { id: "Room {roomIndex}" }, + { + defaultMessage: "Room {roomIndex}", + }, { roomIndex: idx + 2 } )} </Subtitle> diff --git a/apps/scandic-web/components/HotelReservation/Contact/index.tsx b/apps/scandic-web/components/HotelReservation/Contact/index.tsx index 6fc7d03c2..936065235 100644 --- a/apps/scandic-web/components/HotelReservation/Contact/index.tsx +++ b/apps/scandic-web/components/HotelReservation/Contact/index.tsx @@ -27,7 +27,9 @@ export default function Contact({ hotel }: ContactProps) { <ul className={styles.contactInfo}> <li> <Body textTransform="bold"> - {intl.formatMessage({ id: "Address" })} + {intl.formatMessage({ + defaultMessage: "Address", + })} </Body> <Body> {addressStr} @@ -37,19 +39,25 @@ export default function Contact({ hotel }: ContactProps) { </li> <li> <Body textTransform="bold"> - {intl.formatMessage({ id: "Driving directions" })} + {intl.formatMessage({ + defaultMessage: "Driving directions", + })} </Body> <Link href={`https://www.google.com/maps/dir/?api=1&destination=${hotel.location.latitude},${hotel.location.longitude}`} > <span className={styles.link}> - {intl.formatMessage({ id: "Google Maps" })} + {intl.formatMessage({ + defaultMessage: "Google Maps", + })} </span> </Link> </li> <li> <Body textTransform="bold"> - {intl.formatMessage({ id: "Contact us" })} + {intl.formatMessage({ + defaultMessage: "Contact us", + })} </Body> <Link href={`tel:${hotel.contactInformation.phoneNumber}`}> <span className={styles.link}> @@ -61,7 +69,9 @@ export default function Contact({ hotel }: ContactProps) { {(hotel.socialMedia.facebook || hotel.socialMedia.instagram) && ( <> <Body textTransform="bold"> - {intl.formatMessage({ id: "Follow us" })} + {intl.formatMessage({ + defaultMessage: "Follow us", + })} </Body> <div className={styles.soMeIcons}> {hotel.socialMedia.instagram && ( @@ -80,7 +90,9 @@ export default function Contact({ hotel }: ContactProps) { </li> <li> <Body textTransform="bold"> - {intl.formatMessage({ id: "Email" })} + {intl.formatMessage({ + defaultMessage: "Email", + })} </Body> <Link href={`mailto:${hotel.contactInformation.email}`}> <span className={styles.link}> @@ -96,12 +108,18 @@ export default function Contact({ hotel }: ContactProps) { <Image height={38} width={38} - alt={intl.formatMessage({ id: "Nordic Swan Ecolabel" })} + alt={intl.formatMessage({ + defaultMessage: "Nordic Swan Ecolabel", + })} src={`/_static/img/icons/swan-eco/swan_eco_dark_${lang}.png`} /> </div> <div className={styles.ecoLabelText}> - <span>{intl.formatMessage({ id: "Nordic Swan Ecolabel" })}</span> + <span> + {intl.formatMessage({ + defaultMessage: "Nordic Swan Ecolabel", + })} + </span> <span> {hotel.hotelFacts.ecoLabels.svanenEcoLabelCertificateNumber} </span> diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/BedType/BedTypeInfo/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/BedType/BedTypeInfo/index.tsx index 4d39beab2..0c4514a41 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/BedType/BedTypeInfo/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/BedType/BedTypeInfo/index.tsx @@ -17,11 +17,12 @@ export default function BedTypeInfo({ hasMultipleBedTypes }: BedTypeInfoProps) { ) const availabilityText = intl.formatMessage({ - id: "Your selected bed type will be provided based on availability", + defaultMessage: + "Your selected bed type will be provided based on availability", }) const extraBedText = intl.formatMessage({ - id: "Extra bed will be provided additionally", + defaultMessage: "Extra bed will be provided additionally", }) const combinedStr = `${availabilityText}. ${extraBedText}` diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/index.tsx index b85dd6e1c..4340b6aa1 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/index.tsx @@ -72,7 +72,8 @@ export default function Breakfast() { {hasChildrenInRoom ? ( <Body> {intl.formatMessage({ - id: "Children's breakfast is always free as part of the adult's breakfast.", + defaultMessage: + "Children's breakfast is always free as part of the adult's breakfast.", })} </Body> ) : null} @@ -83,22 +84,29 @@ export default function Breakfast() { name="breakfast" value={pkg.code} Icon={BreakfastBuffetIcon} - title={intl.formatMessage({ id: "Breakfast buffet" })} + title={intl.formatMessage({ + defaultMessage: "Breakfast buffet", + })} subtitle={ pkg.code === BreakfastPackageEnum.FREE_MEMBER_BREAKFAST - ? intl.formatMessage({ id: "Included" }) + ? intl.formatMessage({ + defaultMessage: "Included", + }) : `+ ${formatPrice(intl, pkg.localPrice.price, pkg.localPrice.currency ?? "")}` } - subtitleSecondary={intl.formatMessage({ id: "Per adult/night" })} + subtitleSecondary={intl.formatMessage({ + defaultMessage: "Per adult/night", + })} description={ hasChildrenInRoom ? intl.formatMessage({ - id: "Free for kids aged 12 and under.", + defaultMessage: "Free for kids aged 12 and under.", }) : undefined } descriptionSecondary={intl.formatMessage({ - id: "Includes vegan, gluten-free, and other allergy-friendly options.", + defaultMessage: + "Includes vegan, gluten-free, and other allergy-friendly options.", })} /> ))} @@ -106,15 +114,19 @@ export default function Breakfast() { name="breakfast" value="false" Icon={NoBreakfastBuffetIcon} - title={intl.formatMessage({ id: "No breakfast" })} + title={intl.formatMessage({ + defaultMessage: "No breakfast", + })} subtitle={`+ ${formatPrice(intl, totalPriceForNoBreakfast, packages?.[0].localPrice.currency ?? "")}`} descriptionSecondary={ hasChildrenInRoom ? intl.formatMessage({ - id: "Breakfast can be added after booking for an extra cost for adults and kids ages 4 and up.", + defaultMessage: + "Breakfast can be added after booking for an extra cost for adults and kids ages 4 and up.", }) : intl.formatMessage({ - id: "Breakfast can be added after booking for an additional fee.", + defaultMessage: + "Breakfast can be added after booking for an additional fee.", }) } /> diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Confirm/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Confirm/index.tsx index a069cf534..1eb442b6b 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Confirm/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Confirm/index.tsx @@ -44,7 +44,7 @@ export default function ConfirmBooking({ <Typography variant="Body/Paragraph/mdBold"> <p> {intl.formatMessage({ - id: "Guarantee room for late arrival", + defaultMessage: "Guarantee room for late arrival", })} </p> </Typography> @@ -57,27 +57,33 @@ export default function ConfirmBooking({ onPress={() => setModalOpen(true)} > <MaterialIcon icon="info" size={20} color="CurrentColor" /> - {intl.formatMessage({ id: "How does it work" })} + {intl.formatMessage({ + defaultMessage: "How does it work", + })} </Button> <Modal isOpen={isModalOpen} onToggle={() => setModalOpen(false)}> <div className={styles.modalContainer}> <Typography variant="Title/smRegular"> <h3> - {intl.formatMessage({ id: "Guarantee for late arrival" })} + {intl.formatMessage({ + defaultMessage: "Guarantee for late arrival", + })} </h3> </Typography> <Typography variant="Body/Lead text"> <p className={styles.modalText}> {intl.formatMessage({ - id: "When guaranteeing your booking with a credit card, we will hold the booking until 07:00 the day after check-in.", + defaultMessage: + "When guaranteeing your booking with a credit card, we will hold the booking until 07:00 the day after check-in.", })} </p> </Typography> <Typography variant="Body/Supporting text (caption)/smRegular"> <p className={styles.modalText}> {intl.formatMessage({ - id: "In case of a no-show, your credit card will be charged for the first night.", + defaultMessage: + "In case of a no-show, your credit card will be charged for the first night.", })} </p> </Typography> @@ -88,7 +94,9 @@ export default function ConfirmBooking({ onPress={() => setModalOpen(false)} className={styles.closeButton} > - {intl.formatMessage({ id: "Close" })} + {intl.formatMessage({ + defaultMessage: "Close", + })} </Button> </div> </Modal> @@ -97,7 +105,8 @@ export default function ConfirmBooking({ <Typography variant="Body/Supporting text (caption)/smRegular"> <p> {intl.formatMessage({ - id: "I may arrive later than 18:00 and want to guarantee my booking with a credit card.", + defaultMessage: + "I may arrive later than 18:00 and want to guarantee my booking with a credit card.", })} </p> </Typography> @@ -108,13 +117,19 @@ export default function ConfirmBooking({ <> {savedCreditCards?.length ? ( <Typography variant="Title/Overline/sm"> - <h4>{intl.formatMessage({ id: "OTHER" })}</h4> + <h4> + {intl.formatMessage({ + defaultMessage: "OTHER", + })} + </h4> </Typography> ) : null} <PaymentOption name="paymentMethod" value={PaymentMethodEnum.card} - label={intl.formatMessage({ id: "Credit card" })} + label={intl.formatMessage({ + defaultMessage: "Credit card", + })} /> </> )} @@ -134,7 +149,8 @@ export function ConfirmBookingRedemption() { <Typography variant="Body/Supporting text (caption)/smRegular"> <p> {intl.formatMessage({ - id: "When you confirm the booking the room will be guaranteed for late arrival. If you fail to arrive without cancelling in advance or if you cancel after 18:00 local time, you will be charged for one reward night.", + defaultMessage: + "When you confirm the booking the room will be guaranteed for late arrival. If you fail to arrive without cancelling in advance or if you cancel after 18:00 local time, you will be charged for one reward night.", })} </p> </Typography> diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Details/Multiroom/JoinScandicFriendsCard/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Details/Multiroom/JoinScandicFriendsCard/index.tsx index 75911724f..b72122485 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Details/Multiroom/JoinScandicFriendsCard/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Details/Multiroom/JoinScandicFriendsCard/index.tsx @@ -25,14 +25,26 @@ export default function JoinScandicFriendsCard({ } const list = [ - { title: intl.formatMessage({ id: "Earn bonus nights & points" }) }, - { title: intl.formatMessage({ id: "Get member benefits & offers" }) }, - { title: intl.formatMessage({ id: "Join at no cost" }) }, + { + title: intl.formatMessage({ + defaultMessage: "Earn bonus nights & points", + }), + }, + { + title: intl.formatMessage({ + defaultMessage: "Get member benefits & offers", + }), + }, + { + title: intl.formatMessage({ + defaultMessage: "Join at no cost", + }), + }, ] const saveOnJoiningLabel = intl.formatMessage( { - id: "Pay the member price of {amount} for Room {roomNr}", + defaultMessage: "Pay the member price of {amount} for Room {roomNr}", }, { amount: formatPrice( @@ -53,7 +65,8 @@ export default function JoinScandicFriendsCard({ </Caption> <Caption color="uiTextHighContrast"> {intl.formatMessage({ - id: "I promise to join Scandic Friends before checking in", + defaultMessage: + "I promise to join Scandic Friends before checking in", })} </Caption> </div> diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Details/Multiroom/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Details/Multiroom/index.tsx index 8252e9360..d2bbbd2d1 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Details/Multiroom/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Details/Multiroom/index.tsx @@ -75,42 +75,56 @@ export default function Details() { type="label" className={styles.fullWidth} > - {intl.formatMessage({ id: "Guest information" })} + {intl.formatMessage({ + defaultMessage: "Guest information", + })} </Footnote> <Input - label={intl.formatMessage({ id: "First name" })} + label={intl.formatMessage({ + defaultMessage: "First name", + })} maxLength={30} name="firstName" registerOptions={{ required: true }} /> <Input - label={intl.formatMessage({ id: "Last name" })} + label={intl.formatMessage({ + defaultMessage: "Last name", + })} maxLength={30} name="lastName" registerOptions={{ required: true }} /> <CountrySelect className={styles.fullWidth} - label={intl.formatMessage({ id: "Country" })} + label={intl.formatMessage({ + defaultMessage: "Country", + })} name="countryCode" registerOptions={{ required: true }} /> <Input className={styles.fullWidth} - label={intl.formatMessage({ id: "Email address" })} + label={intl.formatMessage({ + defaultMessage: "Email address", + })} name="email" registerOptions={{ required: true }} /> <Phone className={styles.fullWidth} - label={intl.formatMessage({ id: "Phone number" })} + label={intl.formatMessage({ + defaultMessage: "Phone number", + })} name="phoneNumber" registerOptions={{ required: true }} /> {guestIsGoingToJoin ? null : ( <Input className={styles.fullWidth} - label={intl.formatMessage({ id: "Membership no" })} + label={intl.formatMessage({ + defaultMessage: "Membership no", + })} name="membershipNo" type="tel" /> @@ -131,9 +145,13 @@ export default function Details() { type="submit" > {isPaymentNext - ? intl.formatMessage({ id: "Continue" }) + ? intl.formatMessage({ + defaultMessage: "Continue", + }) : intl.formatMessage( - { id: "Continue to room {nextRoomNumber}" }, + { + defaultMessage: "Continue to room {nextRoomNumber}", + }, { nextRoomNumber: roomNr + 1 } )} </Button> diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/JoinScandicFriendsCard/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/JoinScandicFriendsCard/index.tsx index 86e64c526..556e6c2cf 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/JoinScandicFriendsCard/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/JoinScandicFriendsCard/index.tsx @@ -32,14 +32,26 @@ export default function JoinScandicFriendsCard({ } const list = [ - { title: intl.formatMessage({ id: "Friendly room rates" }) }, - { title: intl.formatMessage({ id: "Earn & spend points" }) }, - { title: intl.formatMessage({ id: "Join for free" }) }, + { + title: intl.formatMessage({ + defaultMessage: "Friendly room rates", + }), + }, + { + title: intl.formatMessage({ + defaultMessage: "Earn & spend points", + }), + }, + { + title: intl.formatMessage({ + defaultMessage: "Join for free", + }), + }, ] const saveOnJoiningLabel = intl.formatMessage( { - id: "Get the member price: {amount}", + defaultMessage: "Get the member price: {amount}", }, { amount: formatPrice( @@ -62,20 +74,27 @@ export default function JoinScandicFriendsCard({ textTransform="uppercase" color="uiTextHighContrast" > - {intl.formatMessage({ id: "Join Scandic Friends" })} + {intl.formatMessage({ + defaultMessage: "Join Scandic Friends", + })} </Caption> </div> </Checkbox> <Footnote color="uiTextHighContrast" className={styles.login}> - {intl.formatMessage({ id: "Already a friend?" })}{" "} + {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} + {`${intl.formatMessage({ + defaultMessage: "Already a friend?", + })} `} <LoginButton color="burgundy" position="enter details" trackingId="join-scandic-friends-enter-details" variant="breadcrumb" > - {intl.formatMessage({ id: "Log in" })} + {intl.formatMessage({ + defaultMessage: "Log in", + })} </LoginButton> </Footnote> @@ -99,7 +118,8 @@ export default function JoinScandicFriendsCard({ <Footnote color="uiTextPlaceholder"> {intl.formatMessage( { - id: "By signing up you accept the Scandic Friends <termsAndConditionsLink>Terms and Conditions</termsAndConditionsLink>. Your membership is valid until further notice, and you can terminate your membership at any time by sending an email to Scandic's customer service", + defaultMessage: + "By signing up you accept the Scandic Friends <termsAndConditionsLink>Terms and Conditions</termsAndConditionsLink>. Your membership is valid until further notice, and you can terminate your membership at any time by sending an email to Scandic's customer service", }, { termsAndConditionsLink: (str) => ( diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/MemberPriceModal/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/MemberPriceModal/index.tsx index 0155c5232..f69924c27 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/MemberPriceModal/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/MemberPriceModal/index.tsx @@ -42,7 +42,7 @@ export default function MemberPriceModal({ <MagicWandIcon width="265px" /> <Title as="h3" level="h1" textTransform="regular"> {intl.formatMessage({ - id: "Member price activated", + defaultMessage: "Member price activated", })} @@ -50,7 +50,7 @@ export default function MemberPriceModal({ {intl.formatMessage({ - id: "The new price is", + defaultMessage: "The new price is", })} @@ -64,7 +64,9 @@ export default function MemberPriceModal({ )}
diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/Signup/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/Signup/index.tsx index 00fab6aab..47f438935 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/Signup/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/Signup/index.tsx @@ -27,14 +27,18 @@ export default function Signup({ name }: { name: string }) {
- {intl.formatMessage({ id: "Birth date" })} + {intl.formatMessage({ + defaultMessage: "Birth date", + })}
@@ -43,7 +47,9 @@ export default function Signup({ name }: { name: string }) {
) : ( diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/index.tsx index 6dcffb119..1697e6a01 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/index.tsx @@ -93,17 +93,23 @@ export default function Details({ user }: DetailsProps) { type="label" className={styles.fullWidth} > - {intl.formatMessage({ id: "Guest information" })} + {intl.formatMessage({ + defaultMessage: "Guest information", + })} {isPaymentNext - ? intl.formatMessage({ id: "Continue" }) + ? intl.formatMessage({ + defaultMessage: "Continue", + }) : intl.formatMessage( - { id: "Continue to room {nextRoomNumber}" }, + { + defaultMessage: "Continue to room {nextRoomNumber}", + }, { nextRoomNumber: roomNr + 1 } )} diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Details/SpecialRequests/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Details/SpecialRequests/index.tsx index 33768f4b9..75366c46c 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Details/SpecialRequests/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Details/SpecialRequests/index.tsx @@ -27,7 +27,9 @@ export default function SpecialRequests() { className={styles.header} textAlign="left" > - {intl.formatMessage({ id: "Special requests" })} + {intl.formatMessage({ + defaultMessage: "Special requests", + })} @@ -74,7 +76,8 @@ export default function SpecialRequests() { /> */}