Skip to content

Commit d9ad74d

Browse files
angelrenedoAngel Fernandez Cobo
andauthored
feat: add translation to spanish (#17)
* - Añadir traducción a español * no message * - Strings must use singlequote --------- Co-authored-by: Angel Fernandez Cobo <angel.fernandez@fieldeas.com>
1 parent b201dbb commit d9ad74d

12 files changed

Lines changed: 113 additions & 9 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ The card automatically changes background and animations based on time of day:
169169
- German
170170
- French
171171
- Dutch
172+
- Spanish
172173

173174
## Development
174175

README.ru.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ type: custom:dynamic-weather-card
8181
entity: weather.home
8282
name: Моя погода
8383
height: 250
84-
language: auto # 'auto' (по умолчанию), 'ru' или 'en'
84+
language: auto # 'auto' (по умолчанию), 'ru', 'es' или 'en'
8585
overlay_opacity: 0.2 # Прозрачность затемнения (0-1, по умолчанию: 0.1)
8686
wind_speed_unit: ms # 'ms' (м/с, по умолчанию) или 'kmh' (км/ч)
8787
show_feels_like: true

info.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The card will automatically detect the language from Home Assistant settings.
3232
type: custom:dynamic-weather-card
3333
entity: weather.home
3434
name: My Weather
35-
language: auto # 'auto', 'ru' or 'en'
35+
language: auto # 'auto', 'ru', 'es' or 'en'
3636
show_feels_like: true
3737
show_min_temp: true
3838
show_forecast: true

src/internalization/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ 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 es from './locales/es/translation.js';
67

78
const translations = {
89
en,
910
ru,
1011
de,
1112
nl,
12-
fr
13+
fr,
14+
es
1315
};
1416

1517
class I18n {

src/internalization/locales/de/translation.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ export default {
8686
'english': '🇺🇸 English',
8787
'russian': '🇷🇺 Русский',
8888
'german': '🇩🇪 Deutsch',
89-
'dutch': '🇳🇱 Nederlands'
89+
'dutch': '🇳🇱 Nederlands',
90+
'spanish': '🇪🇸 Español'
9091
}
9192
}
9293
};

src/internalization/locales/en/translation.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ export default {
8787
'russian': '🇷🇺 Русский',
8888
'french': '🇫🇷 Français',
8989
'german': '🇩🇪 Deutsch',
90-
'dutch': '🇳🇱 Nederlands'
90+
'dutch': '🇳🇱 Nederlands',
91+
'spanish': '🇪🇸 Español'
9192
}
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': 'Soleado',
3+
'clear': 'Despejado',
4+
'overcast': 'Cubierto',
5+
'cloudy': 'Nublado',
6+
'partlycloudy': 'Parcialmente Nublado',
7+
'rainy': 'Lluvioso',
8+
'rain': 'Lluvia',
9+
'snowy': 'Nevado',
10+
'snow': 'Nieve',
11+
'foggy': 'Nublado',
12+
'fog': 'Niebla',
13+
'lightning': 'Rayo',
14+
'lightning-rainy': 'Tormenta Eléctrica',
15+
'pouring': 'Lluvia Intensa',
16+
'snowy-rainy': 'Aguanieve',
17+
'hail': 'Granizo',
18+
'clear-night': 'Noche Despejada',
19+
'feels_like': 'Sensación térmica',
20+
'forecast_title': 'Previsión para hoy',
21+
'no_data': 'Sin datos',
22+
'forecast_unavailable': 'Forecast unavailable',
23+
'weather': 'Clima',
24+
'language': 'Idioma',
25+
'wind_unit_kmh': 'km/h',
26+
'wind_unit_ms': 'm/s',
27+
'demo': {
28+
'pageTitle': '🌤️ Tarjeta Meteorológica Dinámica',
29+
'pageSubtitle': 'Demostración interactiva Y Herramienta De Configuración',
30+
'livePreview': 'Vista previa en vivo',
31+
'configuration': '⚙️ Configuración',
32+
'quickPresets': '🎨 Ajustes Rápidos',
33+
'sunnyDay': 'Día soleado',
34+
'rainy': 'Lluvioso',
35+
'snowy': 'Nevado',
36+
'clearNight': 'Noche despejada',
37+
'weatherCondition': '🌦️ Condiciones Meteorológicas',
38+
'condition': 'Condición',
39+
'temperature': 'Temperatura (°C)',
40+
'humidity': 'Humedad (%)',
41+
'windSpeed': 'Velocidad Del Viento',
42+
'timeOfDay': '🕐 Hora del Día',
43+
'timeMode': 'Modo Tiempo',
44+
'autoTime': '🕐 Auto (Hora Actual)',
45+
'manualControl': '⏱️ Manual Control',
46+
'sunrise': '🌅 Amanecer',
47+
'day': '☀️ Día',
48+
'sunset': '🌇 Atardecer',
49+
'night': '🌙 Noche',
50+
'currentTime': 'Hora Actual',
51+
'displayOptions': '👁️ Opciones de Visualización',
52+
'cardName': 'Nombre de la tarjeta',
53+
'height': 'Altura (px)',
54+
'feelsLike': 'Sensación Térmica',
55+
'minTemp': 'Temperatura Mínima',
56+
'windDirection': 'Dirección del Viento',
57+
'windGust': 'Ráfaga de Viento',
58+
'hourlyForecast': 'Previsión por Horas',
59+
'sunriseSunset': 'Amanecer/Atardecer',
60+
'updateCard': '🔄 Actualizar Tarjeta',
61+
'startDemo': '🎬 Iniciar Modo Demostración',
62+
'stopDemo': '⏹️ Detener Demostración',
63+
'madeWith': 'Hecho con ❤️ para Home Assistant',
64+
'loading': '⏳ Cargando tarjeta...',
65+
'errorTitle': '⚠️ No se pudo cargar la tarjeta',
66+
'errorDetails': 'Consulte la consola del navegador (F12) para obtener más detalles',
67+
'errorServer': 'Asegúrate de que el archivo se sirve a través de un servidor local (not file://)',
68+
'placeholderEmpty': 'Deje vacío para ocultar',
69+
'weatherConditions': {
70+
'sunny': '☀️ Soleado',
71+
'clear': '☀️ Despejado',
72+
'clearNight': '🌙 Noche Despejada',
73+
'partlyCloudy': '⛅ Parcialmente Nublado',
74+
'cloudy': '☁️ Nublado',
75+
'rainy': '🌧️ Lluvioso',
76+
'pouring': '⛈️ Torrencial',
77+
'snowy': '❄️ Nevado',
78+
'sleet': '🌨️ Aguanieve',
79+
'hail': '🧊 Granizo',
80+
'foggy': '🌫️ Nublado',
81+
'lightning': '⚡ Rayos',
82+
'thunderstorm': '⛈️ Tormenta Eléctrica'
83+
},
84+
'language': {
85+
'title': '🌍 Idioma',
86+
'english': '🇺🇸 English',
87+
'russian': '🇷🇺 Русский',
88+
'french': '🇫🇷 Français',
89+
'german': '🇩🇪 Deutsch',
90+
'dutch': '🇳🇱 Nederlands',
91+
'spanish': '🇪🇸 Español'
92+
}
93+
}
94+
};

src/internalization/locales/fr/translation.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ export default {
8787
'russian': '🇷🇺 Русский',
8888
'french': '🇫🇷 Français',
8989
'german': '🇩🇪 Deutsch',
90-
'dutch': '🇳🇱 Nederlands'
90+
'dutch': '🇳🇱 Nederlands',
91+
'spanish': '🇪🇸 Español'
9192
}
9293
}
9394
};

src/internalization/locales/nl/translation.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ export default {
8686
'english': '🇺🇸 English',
8787
'russian': '🇷🇺 Русский',
8888
'german': '🇩🇪 Deutsch',
89-
'dutch': '🇳🇱 Nederlands'
89+
'dutch': '🇳🇱 Nederlands',
90+
'spanish': '🇪🇸 Español'
9091
}
9192
}
9293
};

src/internalization/locales/ru/translation.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ export default {
8787
'russian': '🇷🇺 Русский',
8888
'french': '🇫🇷 Français',
8989
'german': '🇩🇪 Deutsch',
90-
'dutch': '🇳🇱 Nederlands'
90+
'dutch': '🇳🇱 Nederlands',
91+
'spanish': '🇪🇸 Español'
9192
}
9293
}
9394
};

0 commit comments

Comments
 (0)