mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-22 15:34:26 +01:00
Update localization.py
This commit is contained in:
@@ -693,7 +693,8 @@ translations = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def get_translation(locale, input):
|
def get_translation(locale, input):
|
||||||
en_fallback_res = translations.get("en_US").get(input, input)
|
locale = locale.split("_")[0]
|
||||||
|
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