mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
python: Reformat with Black, except quotes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
5028c081cb
commit
11741543da
@@ -9,6 +9,7 @@ from typing import Dict, List
|
||||
def get_json_filename(locale: str) -> str:
|
||||
return f"locale/{locale}/mobile.json"
|
||||
|
||||
|
||||
def get_locales() -> List[str]:
|
||||
output = check_output(['git', 'ls-files', 'locale'], universal_newlines=True)
|
||||
tracked_files = output.split()
|
||||
@@ -21,6 +22,7 @@ def get_locales() -> List[str]:
|
||||
|
||||
return locales
|
||||
|
||||
|
||||
def get_translation_stats(resource_path: str) -> Dict[str, int]:
|
||||
with open(resource_path) as raw_resource_file:
|
||||
raw_info = json.load(raw_resource_file)
|
||||
@@ -29,6 +31,7 @@ def get_translation_stats(resource_path: str) -> Dict[str, int]:
|
||||
not_translated = len([i for i in raw_info.items() if i[1] == ''])
|
||||
return {'total': total, 'not_translated': not_translated}
|
||||
|
||||
|
||||
translation_stats: Dict[str, Dict[str, int]] = {}
|
||||
locale_paths = [] # List[str]
|
||||
for locale in get_locales():
|
||||
|
Reference in New Issue
Block a user