From af6d96843d53306678f5869f35ec487550074ada Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Mon, 15 Feb 2021 00:03:14 +0100 Subject: [PATCH] Add docstrings and help info for the i18n tools in setup.py --- setup.py | 14 ++++++++++++++ setup/README.md | 4 ++++ 2 files changed, 18 insertions(+) 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.