diff --git a/apps/web/public/locales/de/home.json b/apps/web/public/locales/de/home.json index 72f23564..a2baac10 100644 --- a/apps/web/public/locales/de/home.json +++ b/apps/web/public/locales/de/home.json @@ -23,7 +23,7 @@ "feels like phrase slightly warm": "Perfekte Temeperatur für ein Picknick!", "feels like phrase neutral": "Perfektes Wetter für einen Spaziergang!", "feels like phrase slightly cold": "Eine leichte Jacke könnte erforderlich sein.", - "feels like phrase slightly moor cold": "Es ist ein eisiger Tag!", + "feels like phrase slightly more cold": "Es ist ein eisiger Tag!", "feels like phrase cold": "Sogar Pinguine bestellen sich eine heiße Schokolade!", "feels like phrase very cold": "Auch die Schneemänner frieren!", "feels like phrase extremely cold": "Es ist so kalt, dass sogar die Eisbären im Haus bleiben!", diff --git a/apps/web/public/locales/en/home.json b/apps/web/public/locales/en/home.json index 42e4dc2a..f16ad08f 100644 --- a/apps/web/public/locales/en/home.json +++ b/apps/web/public/locales/en/home.json @@ -23,7 +23,7 @@ "feels like phrase slightly warm": "A perfect day for a picnic!", "feels like phrase neutral": "Just the right temperature, not too hot, not too cold.", "feels like phrase slightly cold": "A light jacket might be needed.", - "feels like phrase slightly moor cold": "It's a frosty day!", + "feels like phrase slightly more cold": "It's a frosty day!", "feels like phrase cold": "Penguins are ordering hot chocolate due to the chill!", "feels like phrase very cold": "Today's frosty weather is making even snowmen shiver!", "feels like phrase extremely cold": "It's so cold, even the polar bears are staying inside!", diff --git a/apps/web/src/pages/home/index.tsx b/apps/web/src/pages/home/index.tsx index 8961effe..a3e24813 100644 --- a/apps/web/src/pages/home/index.tsx +++ b/apps/web/src/pages/home/index.tsx @@ -52,6 +52,20 @@ const Map = dynamic(() => import("@weatherio/ui/map"), { ssr: false }); dayjs.extend(utc); dayjs.extend(timezone); +function getFeelsLikePhrase(feels_like: number) { + if (feels_like > 320) return "feels like phrase extremely warm"; + if (feels_like > 315) return "feels like phrase very warm"; + if (feels_like > 305) return "feels like phrase warm"; + if (feels_like > 300) return "feels like phrase slightly more warm"; + if (feels_like > 295) return "feels like phrase slightly warm"; + if (feels_like > 285) return "feels like phrase neutral"; + if (feels_like > 279) return "feels like phrase slightly cold"; + if (feels_like > 270) return "feels like phrase slightly more cold"; + if (feels_like > 264) return "feels like phrase cold"; + if (feels_like > 255) return "feels like phrase very cold"; + return "feels like phrase extremely cold"; +} + function convertWindSpeed( speedInMetersPerSecond: number, unit: WindSpeedUnitType, @@ -795,37 +809,9 @@ const InternalHome = observer(() => { )}°F`}