iamBiB / lovelace-htc-flipclock-weather

HTC Flipclock with Weather card
25 stars 12 forks source link

Italian language #7

Closed djgragra closed 3 years ago

djgragra commented 3 years ago

regional.js.zip I added the Italian language in the regional.js file but unfortunately it doesn't work. What else needs to be changed?

vittorio1968 commented 3 years ago

regional.js.zip I added the Italian language in the regional.js file but unfortunately it doesn't work. What else needs to be changed?

Per la lingua italiana una volta che hai modificato il file regional modifica anche la riga 6 del file
htc-flipclock-weather.js da così: import { regional } from './regional.js?v1.1.4'; a così: import { regional } from './regional.js?v1.1.5';

djgragra commented 3 years ago

regional.js.zip I added the Italian language in the regional.js file but unfortunately it doesn't work. What else needs to be changed?

Per la lingua italiana una volta che hai modificato il file regional modifica anche la riga 6 del file htc-flipclock-weather.js da così: import { regional } from './regional.js?v1.1.4'; a così: import { regional } from './regional.js?v1.1.5';

Funziona. Grazie!

Sai anche come fare uscire i mesi? Per i giorni della settimana è bastato togliere name:

djgragra commented 3 years ago

@vittorio1968 Se sei interessato ad aggiungere il mese ho modificato le seguenti righe del file htc-flipclock-weather.js

Riga 361 (o 360) da così forecast += `

${regional[config.lang]['dayNames'][d_date.getDay()]} ${d_date.getDate()}

a così forecast += `

${regional[config.lang]['dayNames'][d_date.getDay()]} ${d_date.getDate()} ${regional[config.lang]['monthNames'][d_date.getMonth()]}

Riga 380 (o 379) da così var today_date = ${regional[config.lang]['dayNames'][new Date().getDay()]} ${new Date().getDate()};

a così var today_date = ${regional[config.lang]['dayNames'][new Date().getDay()]} ${new Date().getDate()} ${regional[config.lang]['monthNames'][new Date().getMonth()]};

Attenzione che io sto usando la versione 1.2.1 comunque basta che cerchi nel file dayNames e trovi le righe, vedrai invece che non troverai monthNames

iamBiB commented 3 years ago

merged it. thank you