diff --git a/setup.py b/setup.py index 00564997..f11b5014 100755 --- a/setup.py +++ b/setup.py @@ -186,14 +186,26 @@ def buildQtDocs(): return +## +# Qt Linguist QM Builder (qtlrelease) +## + def buildQtI18n(): + """Build the lang.qm files for Qt Linguist. + """ try: subprocess.call(["lrelease", "-verbose", "novelWriter.pro"]) except Exception as e: print("QtI18n Release Error:") print(str(e)) +## +# Qt Linguist TS Builder (qtlupdate) +## + def buildQtI18nTS(): + """Build the lang.ts files for Qt Linguist. + """ try: subprocess.call(["pylupdate5", "-verbose", "-noobsolete", "novelWriter.pro"]) except Exception as e: @@ -863,6 +875,8 @@ if __name__ == "__main__": "\n" " qthelp Build the help documentation for use with the Qt Assistant. Run before\n" " install to have local help enable in the the installed version.\n" + " qtlupdate Update the translation files for internationalisation.\n" + " qtlrelease Build the language files for internationalisation.\n" " sample Build the sample project as a zip file. Run before install to enable\n" " creating sample projects in the in-app New Project Wizard.\n" "\n" diff --git a/setup/README.md b/setup/README.md index 66bfb548..c64832a6 100644 --- a/setup/README.md +++ b/setup/README.md @@ -25,6 +25,10 @@ To target the command, add one of `--target-linux`, `--target-darwin` or `qthelp` – Build the help documentation for use with the Qt Assistant. Run before install to have local help enable in the the installed version +`qtlupdate` – Update the translation files for internationalisation. + +`qtlrelease` – Build the language files for internationalisation. + `sample` – Build the sample project as a zip file. Run before install to enable creating sample projects in the in-app New Project Wizard.