Skip to content

Commit 0c30af9

Browse files
SerpikoITteuchezh
andauthored
feat: added Italian translation following existing localization structure (#15)
* Add Italian translations for weather conditions * Add Italian translations to i18n module * Add Italian language support in resolveLanguage * Update Language Italian test.html * Update translation.js * Update translation.js * Update translation.js * Update translation.js * Update translation.js --------- Co-authored-by: Teuchezh Nurbiy <40827089+teuchezh@users.noreply.github.com>
1 parent d9ad74d commit 0c30af9

9 files changed

Lines changed: 104 additions & 0 deletions

File tree

src/internalization/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import de from './locales/de/translation.js';
33
import nl from './locales/nl/translation.js';
44
import fr from './locales/fr/translation.js';
55
import en from './locales/en/translation.js';
6+
import it from './locales/it/translation.js';
67
import es from './locales/es/translation.js';
78

89
const translations = {
@@ -11,6 +12,7 @@ const translations = {
1112
de,
1213
nl,
1314
fr,
15+
it,
1416
es
1517
};
1618

src/internalization/locales/de/translation.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ export default {
8585
'title': '🌍 Sprache',
8686
'english': '🇺🇸 English',
8787
'russian': '🇷🇺 Русский',
88+
'french': '🇫🇷 Français',
8889
'german': '🇩🇪 Deutsch',
8990
'dutch': '🇳🇱 Nederlands',
91+
'italy': '🇮🇹 Italia',
9092
'spanish': '🇪🇸 Español'
9193
}
9294
}

src/internalization/locales/en/translation.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export default {
8888
'french': '🇫🇷 Français',
8989
'german': '🇩🇪 Deutsch',
9090
'dutch': '🇳🇱 Nederlands',
91+
'italy': '🇮🇹 Italia',
9192
'spanish': '🇪🇸 Español'
9293
}
9394
}

src/internalization/locales/fr/translation.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export default {
8888
'french': '🇫🇷 Français',
8989
'german': '🇩🇪 Deutsch',
9090
'dutch': '🇳🇱 Nederlands',
91+
'italy': '🇮🇹 Italia',
9192
'spanish': '🇪🇸 Español'
9293
}
9394
}
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
export default {
2+
'sunny': 'Soleggiato',
3+
'clear': 'Sereno',
4+
'overcast': 'Coperto',
5+
'cloudy': 'Nuvoloso',
6+
'partlycloudy': 'Parzialmente Nuvoloso',
7+
'rainy': 'Piovoso',
8+
'rain': 'Pioggia',
9+
'snowy': 'Nevoso',
10+
'snow': 'Neve',
11+
'foggy': 'Nebbia',
12+
'fog': 'Nebbia',
13+
'lightning': 'Fulmine',
14+
'lightning-rainy': 'Temporale',
15+
'pouring': 'Pioggia Intensa',
16+
'snowy-rainy': 'Nevischio',
17+
'hail': 'Grandine',
18+
'clear-night': 'Notte Serena',
19+
'feels_like': 'Percepita',
20+
'forecast_title': "Previsioni di oggi",
21+
'no_data': 'Nessun dato',
22+
'forecast_unavailable': 'Previsioni non disponibili',
23+
'weather': 'Meteo',
24+
'language': 'Lingua',
25+
'wind_unit_kmh': 'km/h',
26+
'wind_unit_ms': 'm/s',
27+
'demo': {
28+
'pageTitle': '🌤️ Dynamic Weather Card',
29+
'pageSubtitle': 'Demo interattiva & Strumento di configurazione',
30+
'livePreview': 'Anteprima live',
31+
'configuration': '⚙️ Configurazione',
32+
'quickPresets': '🎨 Preset veloci',
33+
'sunnyDay': 'Giornata Soleggiata',
34+
'rainy': 'Piovoso',
35+
'snowy': 'Nevoso',
36+
'clearNight': 'Notte Serena',
37+
'weatherCondition': '🌦️ Condizione Meteo',
38+
'condition': 'Condizione',
39+
'temperature': 'Temperatura (°C)',
40+
'humidity': 'Umidità (%)',
41+
'windSpeed': 'Velocità del Vento',
42+
'timeOfDay': '🕐 Momento della giornata',
43+
'timeMode': 'Modalità ora',
44+
'autoTime': '🕐 Automatico (Ora corrente)',
45+
'manualControl': '⏱️ Controllo manuale',
46+
'sunrise': '🌅 Alba',
47+
'day': '☀️ Giorno',
48+
'sunset': '🌇 Tramonto',
49+
'night': '🌙 Notte',
50+
'currentTime': 'Ora corrente',
51+
'displayOptions': '👁️ Opzioni di visualizzazione',
52+
'cardName': 'Nome della card',
53+
'height': 'Altezza (px)',
54+
'feelsLike': 'Temperatura percepita',
55+
'minTemp': 'Temperatura minima',
56+
'windDirection': 'Direzione del vento',
57+
'windGust': 'Raffiche di vento',
58+
'hourlyForecast': 'Previsioni orarie',
59+
'sunriseSunset': 'Alba/Tramonto',
60+
'updateCard': '🔄 Aggiorna card',
61+
'startDemo': '🎬 Avvia Demo',
62+
'stopDemo': '⏹️ Ferma Demo',
63+
'madeWith': 'Creato con ❤️ per Home Assistant',
64+
'loading': '⏳ Caricamento card...',
65+
'errorTitle': '⚠️ Impossibile caricare la card',
66+
'errorDetails': 'Controlla la console del browser (F12) per i dettagli',
67+
'errorServer': 'Assicurati che il file sia servito tramite server locale (non file://)',
68+
'placeholderEmpty': 'Lascia vuoto per nascondere',
69+
'weatherConditions': {
70+
'sunny': '☀️ Soleggiato',
71+
'clear': '☀️ Sereno',
72+
'clearNight': '🌙 Notte Serena',
73+
'partlyCloudy': '⛅ Parzialmente Nuvoloso',
74+
'cloudy': '☁️ Nuvoloso',
75+
'rainy': '🌧️ Piovoso',
76+
'pouring': '⛈️ Pioggia Intensa',
77+
'snowy': '❄️ Nevoso',
78+
'sleet': '🌨️ Nevischio',
79+
'hail': '🧊 Grandine',
80+
'foggy': '🌫️ Nebbia',
81+
'lightning': '⚡ Fulmine',
82+
'thunderstorm': '⛈️ Temporale'
83+
},
84+
'language': {
85+
'title': '🌍 Lingua',
86+
'english': '🇺🇸 Inglese',
87+
'russian': '🇷🇺 Russo',
88+
'french': '🇫🇷 Francese',
89+
'german': '🇩🇪 Tedesco',
90+
'dutch': '🇳🇱 Olandese'
91+
'italy': '🇮🇹 Italia'
92+
}
93+
}
94+
};

src/internalization/locales/nl/translation.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export default {
8787
'russian': '🇷🇺 Русский',
8888
'german': '🇩🇪 Deutsch',
8989
'dutch': '🇳🇱 Nederlands',
90+
'italy': '🇮🇹 Italia',
9091
'spanish': '🇪🇸 Español'
9192
}
9293
}

src/internalization/locales/ru/translation.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export default {
8888
'french': '🇫🇷 Français',
8989
'german': '🇩🇪 Deutsch',
9090
'dutch': '🇳🇱 Nederlands',
91+
'italy': '🇮🇹 Italia',
9192
'spanish': '🇪🇸 Español'
9293
}
9394
}

src/internalization/resolveLanguage.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export const resolveLanguage = ({ configLang, hassLang } = {}) => {
99
if (lang.startsWith('de')) return 'de';
1010
if (lang.startsWith('nl')) return 'nl';
1111
if (lang.startsWith('fr')) return 'fr';
12+
if (lang.startsWith('it')) return 'it';
1213
if (lang.startsWith('es')) return 'es';
1314
}
1415

test.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ <h2 class="panel-title" data-i18n="configuration">⚙️ Configuration</h2>
493493
<option value="fr" data-i18n="language.french">🇫🇷 Français</option>
494494
<option value="de" data-i18n="language.german">🇩🇪 Deutsch</option>
495495
<option value="nl" data-i18n="language.dutch">🇳🇱 Nederlands</option>
496+
<option value="it" data-i18n="language.italian">🇮🇹 Italiano</option>
496497
<option value="es" data-i18n="language.spanish">🇪🇸 Español</option>
497498
</select>
498499
</div>

0 commit comments

Comments
 (0)