Some work about adaptive color scheme for Web UI (PR #19901) http://[316:c51a:62a3:8b9::4]/d4708/qBittorrent/src/branch/adaptive-webui
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.0 KiB

#!/usr/bin/env python3
import argparse
import glob
import os
import shutil
import sys
from typing import List
def isNotStub(path: str) -> bool:
return (os.path.getsize(path) >= (10 * 1024))
def main() -> int:
parser = argparse.ArgumentParser(description='Gather valid Qt translations for NSIS packaging.')
parser.add_argument("qt_translations_folder", help="Qt's translations folder")
parser.add_argument("nsis_packaging_folder", help="NSIS packaging translations folder")
args = parser.parse_args()
tmp_translations: List[str] = glob.glob(f'{args.qt_translations_folder}/qt_??.qm')
tmp_translations += glob.glob(f'{args.qt_translations_folder}/qt_??_??.qm')
tmp_translations += glob.glob(f'{args.qt_translations_folder}/qtbase_??.qm')
tmp_translations += glob.glob(f'{args.qt_translations_folder}qtbase_??_??.qm')
filtered = filter(isNotStub, tmp_translations)
for file in filtered:
shutil.copy2(file, args.nsis_packaging_folder)
return 0
if __name__ == '__main__':
sys.exit(main())