mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-20 14:37:01 +01:00
Update iobroker.py
This commit is contained in:
@@ -19,20 +19,20 @@ keys = {
|
||||
}
|
||||
|
||||
|
||||
langs = ["en_US", "de_DE", "nl_NL", "da_DK", "es_ES", "fr_FR", "it_IT", "ru_RU"]
|
||||
langs = ["en-US", "de-DE", "nl-NL", "da-DK", "es-ES", "fr-FR", "it-IT", "ru-RU", "nb-NO", "pl-PL", "pt-PT"]
|
||||
|
||||
|
||||
def build_locale_filestring(locale):
|
||||
if locale in ["zh_CN", "zh_Hans_CN", "zh_Hans"]:
|
||||
if locale in ["zh-CN", "zh-Hans-CN", "zh-Hans"]:
|
||||
locale = "zh-Hans"
|
||||
elif locale in ["zh_TW", "zh_Hant_TW", "zh_Hant"]:
|
||||
elif locale in ["zh-TW", "zh-Hant-TW", "zh-Hant"]:
|
||||
locale = "zh-Hant"
|
||||
elif locale == "en_GB":
|
||||
locale = "en-GB"
|
||||
elif locale == "pt_BR":
|
||||
locale = "pt-BR"
|
||||
else:
|
||||
locale = locale.split("_")[0]
|
||||
locale = locale.split("-")[0]
|
||||
|
||||
filename = f"{locale}.json"
|
||||
dir_path = os.getcwd()
|
||||
|
||||
Reference in New Issue
Block a user