diff --git a/src/anki_hsk_creator/utility.py b/src/anki_hsk_creator/utility.py index 49cadf5..dbf4bcf 100644 --- a/src/anki_hsk_creator/utility.py +++ b/src/anki_hsk_creator/utility.py @@ -24,12 +24,12 @@ class TRANS: """Static Class for Argos translate""" UPDATED = False - PACKAGES = None + PACKAGES = [] @staticmethod def create_translator(from_code, to_code): """Download and install Argos Translate package""" - print(f"Create trasnlator from {from_code} to {to_code}") + print(f"Create translator from {from_code} to {to_code}") if not TRANS.UPDATED: argostranslate.package.update_package_index() TRANS.PACKAGES = argostranslate.package.get_available_packages() @@ -38,10 +38,13 @@ class TRANS: lambda x: x.from_code == from_code or x.to_code == to_code, TRANS.PACKAGES, ) + print(f"available packages {list(packages)}") packages_to_install = [] for in_package in packages: + print(f"Check in_package {in_package.from_code}") if in_package.from_code == from_code: for out_package in packages: + print(f"Check in_package {out_package.to_code}") if out_package.to_code == to_code: if in_package.to_code == out_package.from_code: packages_to_install.append(in_package)