Merge branch 'main' into add-cards-per-row

This commit is contained in:
DigiLive
2025-05-17 10:39:15 +02:00
3 changed files with 84 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,80 @@
{
"camera": {
"all_cameras": "Todas as câmeras",
"cameras": "Câmeras"
},
"climate": {
"all_climates": "Todos os climatizadores",
"climates": "Climatizadores"
},
"cover": {
"all_covers": "Todas as persianas",
"covers": "Persianas"
},
"fan": {
"all_fans": "Todos os ventiladores",
"fans": "Ventiladores"
},
"generic": {
"all": "Todos",
"areas": "Áreas",
"busy": "Ocupado",
"good_afternoon": "Boa tarde",
"good_evening": "Boa noite",
"good_morning": "Bom dia",
"hello": "Olá",
"home": "Início",
"miscellaneous": "Variados",
"numbers": "Números",
"off": "Desligado",
"on": "Ligado",
"open": "Aberto",
"unavailable": "Indisponível",
"unclosed": "Não fechado",
"undisclosed": "Outro",
"unknown": "Desconhecido"
},
"input_select": {
"input_selects": "Seleção de entrada"
},
"light": {
"all_lights": "Todas as luzes",
"lights": "Luzes"
},
"lock": {
"all_locks": "Todas as fechaduras",
"locked": "Travado",
"locks": "Fechaduras",
"unlocked": "Destravado"
},
"media_player": {
"media_players": "Reprodutores de mídia"
},
"scene": {
"scenes": "Cenas"
},
"select": {
"selects": "Seleção"
},
"sensor": {
"binary": "Binário",
"sensors": "Sensores"
},
"switch": {
"all_switches": "Todos os interruptores",
"switches": "Interruptores"
},
"vacuum": {
"all_vacuums": "Todos os aspiradores",
"vacuums": "Aspiradores"
},
"valve": {
"all_valves": "Todas as válvulas",
"valves": "Válvulas",
"open": "Aberto",
"opening": "Abrindo",
"closed": "Fechado",
"closing": "Fechando",
"stopped": "Parado"
}
}

View File

@@ -2,6 +2,7 @@ import * as de from '../translations/de.json';
import * as en from '../translations/en.json';
import * as es from '../translations/es.json';
import * as nl from '../translations/nl.json';
import * as pt_br from '../translations/pt-BR.json';
import { HomeAssistant } from '../types/homeassistant/types';
import { logMessage, lvlWarn } from './debug';
@@ -11,6 +12,7 @@ const languages: Record<string, unknown> = {
en,
es,
nl,
'pt-BR': pt_br,
};
/** The fallback language if the user-defined language isn't defined */
@@ -50,7 +52,7 @@ let _localize: ((key: string) => string) | undefined = undefined;
* It reads the user-defined language with a fall-back to English and returns a function to get strings from
* language-files by keyword.
*
* If the keyword is undefined, or on error, the keyword itself is returned.
* If the keyword is undefined, or on an error, the keyword itself is returned.
*
* @param {HomeAssistant} hass The Home Assistant object.
*/