1
0
mirror of https://github.com/donaldzou/WGDashboard.git synced 2024-11-22 15:20:09 +01:00

Proposed changes

This commit is contained in:
Daan 2024-11-14 21:36:27 +01:00
parent 43f6bd41c9
commit 915783699b
4 changed files with 37 additions and 34 deletions

View File

@ -4,7 +4,7 @@
"Password": "Wachtwoord", "Password": "Wachtwoord",
"OTP from your authenticator": "OTP van uw authenticator", "OTP from your authenticator": "OTP van uw authenticator",
"Sign In": "Inloggen", "Sign In": "Inloggen",
"Signing In...": "Inloggen...", "Signing In\\.\\.\\.": "Inloggen...",
"Access Remote Server": "Toegang tot Remote Server", "Access Remote Server": "Toegang tot Remote Server",
"Server": "Server", "Server": "Server",
"Click": "Klik", "Click": "Klik",

View File

@ -4,7 +4,7 @@
"Password": "Parola", "Password": "Parola",
"OTP from your authenticator": "Kimlik doğrulama uygulamanızdan tek kullanımlık parola", "OTP from your authenticator": "Kimlik doğrulama uygulamanızdan tek kullanımlık parola",
"Sign In": "Giriş Yap", "Sign In": "Giriş Yap",
"Signing In...": "Giriş Yapılıyor...", "Signing In\\.\\.\\.": "Giriş Yapılıyor...",
"Access Remote Server": "Uzak Sunuculara Eriş", "Access Remote Server": "Uzak Sunuculara Eriş",
"Server": "Sunucu", "Server": "Sunucu",
"Click": "Tıkla", "Click": "Tıkla",

View File

@ -236,6 +236,7 @@
"IP Address": "IP-адреса", "IP Address": "IP-адреса",
"Enter IP Address / Hostname": "Введіть IP-адресу / ім’я хоста", "Enter IP Address / Hostname": "Введіть IP-адресу / ім’я хоста",
"IP Address / Hostname": "IP-адресу / ім’я хоста", "IP Address / Hostname": "IP-адресу / ім’я хоста",
"Dashboard IP Address \\& Listen Port": "",
"Count": "Граф", "Count": "Граф",
"Geolocation": "", "Geolocation": "",
"Is Alive": "", "Is Alive": "",

View File

@ -15,36 +15,38 @@ print("Active Languages")
status = {} status = {}
for k in range(len(active_languages)): for language in active_languages:
print(f"[Language] {active_languages[k]['lang_name']}") print(f"[Language] {language['lang_name']}")
if active_languages[k]['lang_id'] != "en":
with open(f"{active_languages[k]['lang_id']}.json", "r") as f:
lang_file = json.loads(f.read())
missing_translation = []
deprecated_translation = []
for a in language_template.keys(): if language['lang_id'] != "en":
if a not in lang_file.keys(): with open(f"{language['lang_id']}.json", "r") as f:
missing_translation.append(a) lang_file = json.load(f)
for b in lang_file.keys(): # Identify missing and deprecated translations
if b not in language_template.keys(): missing_translation = [
deprecated_translation.append(b) key for key in language_template
if key not in lang_file or not lang_file[key].strip()
]
deprecated_translation = [
key for key in lang_file
if key not in language_template
]
# Print missing translations
print("\t[Missing Translations]") print("\t[Missing Translations]")
if len(missing_translation) > 0: if missing_translation:
for a in range(len(missing_translation)): print(",\n".join(f'\t\t"{key}": ""'
print(f'\t\t"{missing_translation[a]}": ""{(',' if a < len(missing_translation) - 1 else '')}') for key in missing_translation))
else: else:
print("\t\tNo missing translations") print("\t\tNo missing translations")
# Print deprecated translations
print("\n\t[Deprecated Translations]") print("\n\t[Deprecated Translations]")
if len(deprecated_translation) > 0: if deprecated_translation:
for a in range(len(deprecated_translation)): print("\n".join(f'\t\t"{key}": "{lang_file[key]}"'
print(f'\t\t"{deprecated_translation[a]}": "{lang_file[deprecated_translation[a]]}"') for key in deprecated_translation))
else: else:
print("\t\tNo deprecated translations") print("\t\tNo deprecated translations")
print() print()