feat(SW-706): make eslint rule 'formatjs/no-literal-string-in-jsx' pass

This commit is contained in:
Michael Zetterberg
2025-02-07 06:51:36 +01:00
parent e22fc1f3c8
commit 440e1f92df
393 changed files with 4839 additions and 1554 deletions

View File

@@ -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",
})}
</Caption>
<DatePicker />
@@ -61,7 +62,11 @@ export default function FormContent({
<div className={styles.rooms}>
<label>
<Caption color="red" type="bold" asChild>
<span>{intl.formatMessage({ id: "Rooms & Guests" })}</span>
<span>
{intl.formatMessage({
defaultMessage: "Rooms & Guests",
})}
</span>
</Caption>
</label>
<GuestsRoomsPickerForm />
@@ -105,7 +110,11 @@ export default function FormContent({
className={styles.buttonText}
asChild
>
<span>{intl.formatMessage({ id: "Search" })}</span>
<span>
{intl.formatMessage({
defaultMessage: "Search",
})}
</span>
</Caption>
<span className={styles.icon}>
<MaterialIcon icon="search" color="Icon/Inverted" size={28} />
@@ -129,7 +138,10 @@ export function BookingWidgetFormContentSkeleton() {
<div className={styles.when}>
<Caption color="red" type="bold">
{intl.formatMessage(
{ id: "{totalNights, plural, one {# night} other {# nights}}" },
{
defaultMessage:
"{totalNights, plural, one {# night} other {# nights}}",
},
{ totalNights: 0 }
)}
</Caption>
@@ -137,7 +149,11 @@ export function BookingWidgetFormContentSkeleton() {
</div>
<div className={styles.rooms}>
<Caption color="red" type="bold" asChild>
<span>{intl.formatMessage({ id: "Rooms & Guests" })}</span>
<span>
{intl.formatMessage({
defaultMessage: "Rooms & Guests",
})}
</span>
</Caption>
<SkeletonShimmer width={"100%"} display={"block"} />
</div>
@@ -159,7 +175,11 @@ export function BookingWidgetFormContentSkeleton() {
className={styles.buttonText}
asChild
>
<span>{intl.formatMessage({ id: "Search" })}</span>
<span>
{intl.formatMessage({
defaultMessage: "Search",
})}
</span>
</Caption>
<span className={styles.icon}>
<MaterialIcon icon="search" color="Icon/Inverted" size={28} />