Make constant's variable name consistent with the codebase

This commit is contained in:
Olari Tšernobrovkin
2026-01-17 20:03:34 +02:00
parent f4324a5d19
commit 5ddc380dac
+2 -2
View File
@@ -107,7 +107,7 @@ function getCurrentTime() {
// Patterns for specific weather conditions (order matters - combined effects first)
// Grouped by languages for easy editing
const weatherPatternsByLanguage = {
const WEATHER_PATTERNS_BY_LANGUAGE = {
en: [
{ id: "blizzard", patterns: [ "blizzard" ] }, // Snow + Wind
{ id: "storm", patterns: [ "storm", "thunder", "lightning" ] }, // Rain + Lightning
@@ -138,7 +138,7 @@ function parseWeatherType(weatherText) {
const text = weatherText.toLowerCase();
for (const language of Object.values(weatherPatternsByLanguage)) {
for (const language of Object.values(WEATHER_PATTERNS_BY_LANGUAGE)) {
for (const { id, patterns } of language) {
if (patterns.some(p => text.includes(p))) {
return id;