Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Spanish translation #268

Merged
merged 2 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ This card supports translations. Please, help to add more translations and impro
- 繁體中文 (Traditional Chinese)
- Čeština (Czech)
- Dutch (Netherlands)
- Español (Spanish)
- [_Your language?_][add-translation]

## Supported models
Expand Down
2 changes: 2 additions & 0 deletions src/localize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import * as ru from './translations/ru.json';
import * as it from './translations/it.json';
import * as cs from './translations/cs.json';
import * as nl from './translations/nl.json';
import * as es from './translations/es.json';

type Translations = {
[key: string]: {
Expand All @@ -39,6 +40,7 @@ const languages: Record<string, Translations> = {
it,
cs,
nl,
es,
};

const DEFAULT_LANG = 'en';
Expand Down
37 changes: 37 additions & 0 deletions src/translations/es.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"common": {
"name": "Tarjeta Purificadora",
"description": "La tarjeta purificadora te permite controlar tu purificador inteligente.",
"not_available": "La entidad no está disponible",
"toggle_power": "Encender/Apagar"
},
"state": {
"on": "Encendido",
"off": "Apagado"
},
"preset_mode": {
"auto": "Automático",
"silent": "Nocturno",
"favorite": "Manual",
"fan": "Ventilador"
},
"error": {
"missing_entity": "¡Se requiere especificar la entidad!"
},
"editor": {
"entity": "Entidad (Requerido)",
"compact_view": "Vista Compacta",
"compact_view_aria_label_on": "Activar vista compacta",
"compact_view_aria_label_off": "Desactivar vista compacta",
"show_name": "Mostrar Nombre",
"show_name_aria_label_on": "Activar mostrar nombre",
"show_name_aria_label_off": "Desactivar mostrar nombre",
"show_state": "Mostrar Estado",
"show_state_aria_label_on": "Activar mostrar estado",
"show_state_aria_label_off": "Desactivar mostrar estado",
"show_toolbar": "Mostrar Barra de Herramientas",
"show_toolbar_aria_label_on": "Activar mostrar barra de herramientas",
"show_toolbar_aria_label_off": "Desactivar mostrar barra de herramientas",
"code_only_note": "Nota: La configuración de acciones y opciones de estadísticas solo está disponible mediante el Editor de Código."
}
}
Loading