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

@@ -6,35 +6,37 @@ export function translateRoomLighting(option: string, intl: IntlShape) {
switch (option) {
case RoomLighting.WindowsNaturalDaylight:
return intl.formatMessage({
id: "Windows with natural daylight",
defaultMessage: "Windows with natural daylight",
})
case RoomLighting.IndoorWindowsExcellentLighting:
return intl.formatMessage({
id: "Indoor windows and excellent lighting",
defaultMessage: "Indoor windows and excellent lighting",
})
case RoomLighting.IndoorWindowsFacingHotel:
return intl.formatMessage({
id: "Indoor windows facing the hotel",
defaultMessage: "Indoor windows facing the hotel",
})
case RoomLighting.NoWindows:
return intl.formatMessage({
id: "No windows",
defaultMessage: "No windows",
})
case RoomLighting.NoWindowsExcellentLighting:
return intl.formatMessage({
id: "No windows but excellent lighting",
defaultMessage: "No windows but excellent lighting",
})
case RoomLighting.WindowsNaturalDaylightBlackoutFacilities:
return intl.formatMessage({
id: "Windows natural daylight and blackout facilities",
defaultMessage: "Windows natural daylight and blackout facilities",
})
case RoomLighting.WindowsNaturalDaylightExcellentView:
return intl.formatMessage({
id: "Windows natural daylight and excellent view",
defaultMessage: "Windows natural daylight and excellent view",
})
default:
console.warn(`Unsupported conference room ligthing option: ${option}`)
return intl.formatMessage({ id: "N/A" })
return intl.formatMessage({
defaultMessage: "N/A",
})
}
}
@@ -42,38 +44,40 @@ export function translateSeatingType(type: string, intl: IntlShape) {
switch (type) {
case SeatingType.Boardroom:
return intl.formatMessage({
id: "Boardroom",
defaultMessage: "Boardroom",
})
case SeatingType.Cabaret:
return intl.formatMessage({
id: "Cabaret seating",
defaultMessage: "Cabaret seating",
})
case SeatingType.Classroom:
return intl.formatMessage({
id: "Classroom",
defaultMessage: "Classroom",
})
case SeatingType.FullCircle:
return intl.formatMessage({
id: "Full circle",
defaultMessage: "Full circle",
})
case SeatingType.HalfCircle:
return intl.formatMessage({
id: "Half circle",
defaultMessage: "Half circle",
})
case SeatingType.StandingTable:
return intl.formatMessage({
id: "Standing table",
defaultMessage: "Standing table",
})
case SeatingType.Theatre:
return intl.formatMessage({
id: "Theatre",
defaultMessage: "Theatre",
})
case SeatingType.UShape:
return intl.formatMessage({
id: "U-shape",
defaultMessage: "U-shape",
})
default:
console.warn(`Unsupported conference room type : ${type}`)
return intl.formatMessage({ id: "N/A" })
return intl.formatMessage({
defaultMessage: "N/A",
})
}
}