mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-28 07:30:04 +00:00
fix(weather): spell the German descriptions with their umlauts
Bewölkt, Teilweise bewölkt, Überwiegend klar and Schneekörner were written without their umlauts and reached the day details and the planner that way.
This commit is contained in:
@@ -124,13 +124,13 @@ const WMO_MAP: Record<number, string> = {
|
||||
};
|
||||
|
||||
const WMO_DESCRIPTION_DE: Record<number, string> = {
|
||||
0: 'Klar', 1: 'Uberwiegend klar', 2: 'Teilweise bewolkt', 3: 'Bewolkt',
|
||||
0: 'Klar', 1: 'Überwiegend klar', 2: 'Teilweise bewölkt', 3: 'Bewölkt',
|
||||
45: 'Nebel', 48: 'Nebel mit Reif',
|
||||
51: 'Leichter Nieselregen', 53: 'Nieselregen', 55: 'Starker Nieselregen',
|
||||
56: 'Gefrierender Nieselregen', 57: 'Starker gefr. Nieselregen',
|
||||
61: 'Leichter Regen', 63: 'Regen', 65: 'Starker Regen',
|
||||
66: 'Gefrierender Regen', 67: 'Starker gefr. Regen',
|
||||
71: 'Leichter Schneefall', 73: 'Schneefall', 75: 'Starker Schneefall', 77: 'Schneekorner',
|
||||
71: 'Leichter Schneefall', 73: 'Schneefall', 75: 'Starker Schneefall', 77: 'Schneekörner',
|
||||
80: 'Leichte Regenschauer', 81: 'Regenschauer', 82: 'Starke Regenschauer',
|
||||
85: 'Leichte Schneeschauer', 86: 'Starke Schneeschauer',
|
||||
95: 'Gewitter', 96: 'Gewitter mit Hagel', 99: 'Starkes Gewitter mit Hagel',
|
||||
|
||||
@@ -212,7 +212,7 @@ describe('getWeather', () => {
|
||||
|
||||
const result = await getWeather('11.01', '21.01', date, 'de');
|
||||
|
||||
expect(result.description).toBe('Bewolkt'); // German for code 3
|
||||
expect(result.description).toBe('Bewölkt'); // German for code 3
|
||||
});
|
||||
|
||||
it('falls back to "Clouds" for an unknown WMO code', async () => {
|
||||
@@ -308,7 +308,7 @@ describe('getWeather', () => {
|
||||
|
||||
expect(fetch).toHaveBeenCalledTimes(2);
|
||||
expect(en.description).toBe('Overcast');
|
||||
expect(de.description).toBe('Bewolkt');
|
||||
expect(de.description).toBe('Bewölkt');
|
||||
});
|
||||
|
||||
it('falls through to climate path when date is not found in forecast data', async () => {
|
||||
|
||||
Reference in New Issue
Block a user