mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-04-19 08:55:12 +00:00
Update verify_locale_files.py
This commit is contained in:
parent
c0a8540ab8
commit
1b0885bffe
@ -1,15 +1,13 @@
|
||||
import json
|
||||
|
||||
active_languages = json.loads(open("active_languages.json", "r").read())
|
||||
language_template = json.loads(open("language_template.json", "r").read())
|
||||
if __name__ == "__main__":
|
||||
welcome = "WGDashboard Locale File Verification [by @donaldzou]"
|
||||
|
||||
print("="*(len(welcome) + 4))
|
||||
print(f"| {welcome} |")
|
||||
print("="*(len(welcome) + 4))
|
||||
print()
|
||||
print("Active Languages\n")
|
||||
|
||||
status = False
|
||||
|
||||
for language in active_languages:
|
||||
@ -55,9 +53,9 @@ with open(f"{lang_id}.json", "w") as f:
|
||||
f.write(json.dumps(new_lang_file, ensure_ascii=False, indent='\t'))
|
||||
|
||||
|
||||
print()
|
||||
# Print missing translations
|
||||
print(f"[Missing Translations] {len(missing_translation)} translation{'s' if len(missing_translation) > 1 else ''}")
|
||||
|
||||
|
||||
print(f"\t[Missing Translations] {len(missing_translation)} translation{'s' if len(missing_translation) > 1 else ''}")
|
||||
# Print deprecated translations
|
||||
print(f"[Deprecated Translations] {len(deprecated_translation)} translation{'s' if len(deprecated_translation) > 1 else ''}")
|
||||
print(f"\t[Deprecated Translations] {len(deprecated_translation)} translation{'s' if len(deprecated_translation) > 1 else ''}")
|
||||
print(f"\t[Note] All missing translations are added into {lang_id}.json, all deprecated translations are removed from {lang_id}.json")
|
Loading…
x
Reference in New Issue
Block a user