Skip to content

Commit

Permalink
refactor: Made the feels-like sentences a little bit more fine-grained
Browse files Browse the repository at this point in the history
  • Loading branch information
FleetAdmiralJakob committed Jan 15, 2024
1 parent cef7fd5 commit 3b82347
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 11 deletions.
8 changes: 7 additions & 1 deletion apps/web/public/locales/de/home.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@
"afternoon": "Nachmittag",
"night": "Nacht",

"feels like phrase extremely warm": "Es ist so heiß, dass die Sonne sich selbst verbrennt!",
"feels like phrase very warm": "Die Sonne probiert sich abzukühlen!",
"feels like phrase warm": "Dein Eis schmilzt dir davon!",
"feels like phrase moderate": "Perfektes Wetter für einen Spaziergang!",
"feels like phrase slightly more warm": "Es ist ein warmer Tag!",
"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 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!",

"air quality text very poor": "Sehr schlecht",
"air quality text poor": "Schlecht",
Expand Down
8 changes: 7 additions & 1 deletion apps/web/public/locales/en/home.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@
"afternoon": "Afternoon",
"night": "Night",

"feels like phrase extremely warm": "The sun is scorching today!",
"feels like phrase very warm": "The sun is likely trying to cool down!",
"feels like phrase warm": "Even ice cream finds warmth too much!",
"feels like phrase moderate": "So moderate, even Goldilocks would approve!",
"feels like phrase slightly more warm": "It's a toasty day!",
"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 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!",

"air quality text very poor": "Very Poor",
"air quality text poor": "Poor",
Expand Down
40 changes: 31 additions & 9 deletions apps/web/src/pages/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -795,15 +795,37 @@ const InternalHome = observer(() => {
)}°F`}
</div>
<div className="text-sm font-medium text-gray-700">
{weatherData.data.feels_like > 309
? translationHome("feels like phrase very warm")
: weatherData.data.feels_like > 299
? translationHome("feels like phrase warm")
: weatherData.data.feels_like > 279
? translationHome("feels like phrase moderate")
: weatherData.data.feels_like > 269
? translationHome("feels like phrase cold")
: translationHome("feels like phrase very cold")}
{weatherData.data.feels_like > 320
? translationHome("feels like phrase extremely warm")
: weatherData.data.feels_like > 315
? translationHome("feels like phrase very warm")
: weatherData.data.feels_like > 305
? translationHome("feels like phrase warm")
: weatherData.data.feels_like > 300
? translationHome(
"feels like phrase slightly more warm",
)
: weatherData.data.feels_like > 295
? translationHome("feels like phrase slightly warm")
: weatherData.data.feels_like > 285
? translationHome("feels like phrase neutral")
: weatherData.data.feels_like > 279
? translationHome(
"feels like phrase slightly cold",
)
: weatherData.data.feels_like > 270
? translationHome(
"feels like phrase slightly more cold",
)
: weatherData.data.feels_like > 264
? translationHome("feels like phrase cold")
: weatherData.data.feels_like > 255
? translationHome(
"feels like phrase very cold",
)
: translationHome(
"feels like phrase extremely cold",
)}
</div>
</div>
</div>
Expand Down

0 comments on commit 3b82347

Please sign in to comment.