feat(SW-880): add translations

This commit is contained in:
Fredrik Thorsson
2024-11-14 22:38:53 +01:00
committed by Joakim Jäderberg
parent edc65af74e
commit c1152109c3
7 changed files with 18 additions and 1 deletions

View File

@@ -3,21 +3,26 @@ import { getIntl } from "@/i18n"
export async function getFacilityType(type: string) {
const intl = await getIntl()
/* TODO: Get full list of types */
const outdoorPool = intl.formatMessage({ id: "Outdoor pool" })
const indoorPool = intl.formatMessage({ id: "Indoor pool" })
const sauna = intl.formatMessage({ id: "Sauna" })
const relax = intl.formatMessage({ id: "Relax" })
const gym = intl.formatMessage({ id: "Gym" })
const jacuzzi = intl.formatMessage({ id: "Jacuzzi" })
switch (type) {
case "OutdoorPool":
return outdoorPool
case "IndoorPool":
return indoorPool
case "Sauna":
return sauna
case "Relax":
return relax
case "Gym":
return gym
case "Jacuzzi":
return jacuzzi
default:
return type
}