mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-18 10:57:01 +01:00
Update localization.py
This commit is contained in:
@@ -509,25 +509,6 @@ translations = {
|
|||||||
'disarm': "Rozbrój",
|
'disarm': "Rozbrój",
|
||||||
'run': "Uruchom",
|
'run': "Uruchom",
|
||||||
},
|
},
|
||||||
'pt': {
|
|
||||||
'PRESS': "Pressione",
|
|
||||||
'ACTIVATE': "Ativar",
|
|
||||||
'aux_heat': "Aquecedor aux",
|
|
||||||
'cooling': "Resfriando",
|
|
||||||
'drying': "Secando",
|
|
||||||
'fan': "Ventilando",
|
|
||||||
'idle': "Oscioso",
|
|
||||||
'off': "Desligado",
|
|
||||||
'arm_away': "Armar ausente",
|
|
||||||
'arm_custom_bypass': "Bypass personalizado",
|
|
||||||
'arm_home': "Armar em casa",
|
|
||||||
'arm_night': "Acionamento noturno",
|
|
||||||
'arm_vacation': "Armar férias",
|
|
||||||
'clear_code': "Limpar",
|
|
||||||
'code': "Código",
|
|
||||||
'disarm': "Desarmar",
|
|
||||||
'run': "Executar",
|
|
||||||
},
|
|
||||||
'pt': {
|
'pt': {
|
||||||
'PRESS': "Pressione",
|
'PRESS': "Pressione",
|
||||||
'ACTIVATE': "Ativar",
|
'ACTIVATE': "Ativar",
|
||||||
@@ -712,8 +693,7 @@ translations = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def get_translation(locale, input):
|
def get_translation(locale, input):
|
||||||
locale = locale.split("_")[0]
|
en_fallback_res = translations.get("en_US").get(input, input)
|
||||||
en_fallback_res = translations.get("en").get(input, input)
|
|
||||||
if locale in translations:
|
if locale in translations:
|
||||||
return translations.get(locale).get(input, en_fallback_res)
|
return translations.get(locale).get(input, en_fallback_res)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user