mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-07 08:02:30 -06:00
Apply formatting
This commit is contained in:
@@ -14,6 +14,7 @@ import os
|
||||
import sys
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
|
||||
def getTsStrings(ts_file: str, key: str) -> list[str]:
|
||||
tr_strings: list[str] = []
|
||||
tree = ET.parse(ts_file)
|
||||
@@ -33,6 +34,7 @@ def getTsStrings(ts_file: str, key: str) -> list[str]:
|
||||
|
||||
return tr_strings
|
||||
|
||||
|
||||
def migrate2Json(ts_dir: str, json_dir: str, locale: str) -> None:
|
||||
ts_file: str = f"{ts_dir}/webui_{locale}.ts"
|
||||
js_file: str = f"{json_dir}/{locale}.json"
|
||||
@@ -71,6 +73,7 @@ def migrate2Json(ts_dir: str, json_dir: str, locale: str) -> None:
|
||||
|
||||
print("\tFinished.")
|
||||
|
||||
|
||||
def main() -> int:
|
||||
script_path: str = os.path.dirname(os.path.realpath(__file__))
|
||||
ts_dir: str = f"{script_path}/translations"
|
||||
@@ -97,5 +100,6 @@ def main() -> int:
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
|
||||
Reference in New Issue
Block a user