Replacing entire backend messages (especially logs) with English instead of Germany

This commit is contained in:
Rafael Foster
2026-04-25 10:56:46 -03:00
parent 140fa78ca1
commit bdd6e559d5
19 changed files with 271 additions and 271 deletions
+4 -4
View File
@@ -45,7 +45,7 @@ router.get('/', async (req, res) => {
const currentUrl = `https://api.openweathermap.org/data/2.5/weather?q=${encodeURIComponent(city)}&appid=${apiKey}&units=${units}&lang=${lang}`;
const currentRes = await fetch(currentUrl, { signal: AbortSignal.timeout(8000) });
if (!currentRes.ok) {
log.warn(`API Fehler: ${currentRes.status}`);
log.warn(`API error: ${currentRes.status}`);
return res.json({ data: null });
}
const currentJson = await currentRes.json();
@@ -116,7 +116,7 @@ router.get('/', async (req, res) => {
cache = { data, ts: Date.now() };
res.json({ data });
} catch (err) {
log.warn('Fehler:', err.message);
log.warn('Error:', err.message);
res.json({ data: null }); // Fallback: Widget ausblenden, kein Error-Screen
}
});
@@ -145,8 +145,8 @@ router.get('/icon/:code', async (req, res) => {
res.setHeader('Cache-Control', 'public, max-age=86400'); // 24 Stunden
upstream.body.pipe(res);
} catch (err) {
log.warn('Icon-Proxy Fehler:', err.message);
res.status(502).json({ error: 'Icon-Proxy fehlgeschlagen.', code: 502 });
log.warn('Icon proxy error:', err.message);
res.status(502).json({ error: 'Icon proxy failed.', code: 502 });
}
});