From a4567939d66dfb9c64a453de0430acadf2f80bab Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sun, 28 Mar 2021 15:42:58 +0200 Subject: [PATCH] Include i18n files in the minimal zip files --- setup.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/setup.py b/setup.py index dc47aca3..91d6f45f 100755 --- a/setup.py +++ b/setup.py @@ -274,6 +274,14 @@ def makeMinimalPackage(targetOS): print(str(e)) sys.exit(1) + # Make translation files + try: + buildQtI18n() + except Exception as e: + print("Failed with error:") + print(str(e)) + sys.exit(1) + print("") print("Building Minimal ZIP File") print("=========================") @@ -318,6 +326,15 @@ def makeMinimalPackage(targetOS): continue zipObj.write(os.path.join(nRoot, aFile)) + for aFile in os.listdir("i18n"): + i18File = os.path.join("i18n", aFile) + if not os.path.isfile(i18File): + continue + + if i18File.endswith((".json", ".qm")): + zipObj.write(i18File) + print("Adding File: %s" % i18File) + if targetOS == OS_WIN: zipObj.write("novelWriter.py", "novelWriter.pyw") print("Adding File: novelWriter.pyw")