Include i18n files in the minimal zip files

This commit is contained in:
Veronica K. B. Olsen
2021-03-28 15:42:58 +02:00
parent 90871d5859
commit a4567939d6
+17
View File
@@ -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")