Skip to content

Commit

Permalink
Add spanish translation (#19)
Browse files Browse the repository at this point in the history
* Add spanish translation

* Update README
  • Loading branch information
ajtudela authored May 21, 2021
1 parent f441782 commit 6af65bf
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ This card supports translations. Please, help to add more translations and impro
- Italiano (Italian)
- Nederlands (Dutch)
- Polski (Polish)
- Español (Spanish)
- [_Your language?_](./CONTRIBUTING.md#how-to-add-translation)

## Supported integrations
Expand Down
4 changes: 3 additions & 1 deletion src/localize.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import * as it from './translations/it.json';
import * as nl from './translations/nl.json';
import * as pl from './translations/pl.json';
import * as et from './translations/et.json';
import * as es from './translations/es.json';

var languages = {
de,
Expand All @@ -16,7 +17,8 @@ var languages = {
pl,
et,
fr,
it
it,
es
};

const DEFAULT_LANG = 'en';
Expand Down
30 changes: 30 additions & 0 deletions src/translations/es.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"common": {
"name": "Tarjeta Meteoalarm",
"description": "La tarjeta Meteoalarm le advierte sobre eventos meteorológicos actuales.",
"not_available": "Meteoalarm no está disponible"
},
"error": {
"missing_entity": "¡Se requiere especificar la entidad!"
},
"events": {
"no_warnings": "Sin avisos",
"wind": "viento",
"snow_ice": "nieve/hielo",
"thunderstorms": "tormentas",
"fog": "niebla",
"hight_temperature": "temperatura máxima extrema",
"low_temperature": "temperatura mínima extrema",
"coastal_event": "fenómeno costero",
"forest_fire": "incendios",
"avalanches": "aludes",
"rain": "lluvia",
"flood": "inundación",
"rain_flood": "inundación de lluvia"
},
"messages": {
"yellow": "Aviso de {0} amarillo",
"orange": "Aviso de {0} naranja",
"red": "Aviso de {0} rojo"
}
}

0 comments on commit 6af65bf

Please sign in to comment.