diff --git a/i18n/nw_base.ts b/i18n/nw_base.ts index 87c473e3..8e5e5379 100644 --- a/i18n/nw_base.ts +++ b/i18n/nw_base.ts @@ -2198,57 +2198,57 @@ GuiManuscriptBuild - + Build Manuscript - + Output Format - + Table of Contents - + Path - + File Name - + Reset file name to default - + Open Folder - + &Build - + Select Folder - + Output folder does not exist. - + The file already exists. Do you want to overwrite it? @@ -2415,7 +2415,7 @@ GuiOutlineToolBar - + Outline of @@ -3860,65 +3860,6 @@ - - QWizard - - - Go Back - - - - - < &Back - - - - - Continue - - - - - &Next - - - - - &Next > - - - - - Commit - - - - - Done - - - - - &Finish - - - - - - Cancel - - - - - Help - - - - - &Help - - - SharedData @@ -4041,32 +3982,32 @@ _DetailsWidget - + Setting - + Value - + Name - + Selection - + Title - + Hidden @@ -4438,27 +4379,27 @@ _PreviewWidget - + Press the "Preview" button to generate ... - + Processing ... - + Done - + Unknown - + Built @@ -4557,59 +4498,59 @@ _StatsWidget - - + + Words - - + + Characters - + Words in Headings - + Words in Text - + Headings - + Paragraphs - + Characters in Headings - + Characters in Text - + Characters, No Spaces - + Characters in Headings, No Spaces - + Characters in Text, No Spaces diff --git a/i18n/qtbase.py b/i18n/qtbase.py index df3ee3e1..90f6f9ae 100644 --- a/i18n/qtbase.py +++ b/i18n/qtbase.py @@ -47,19 +47,3 @@ QT_TRANSLATE_NOOP("QPlatformTheme", "Help") QT_TRANSLATE_NOOP("QPlatformTheme", "Apply") QT_TRANSLATE_NOOP("QPlatformTheme", "Reset") QT_TRANSLATE_NOOP("QPlatformTheme", "Restore Defaults") - -# QWizard -# ======= - -QT_TRANSLATE_NOOP("QWizard", "Go Back") -QT_TRANSLATE_NOOP("QWizard", "< &Back") -QT_TRANSLATE_NOOP("QWizard", "Continue") -QT_TRANSLATE_NOOP("QWizard", "&Next") -QT_TRANSLATE_NOOP("QWizard", "&Next >") -QT_TRANSLATE_NOOP("QWizard", "Commit") -QT_TRANSLATE_NOOP("QWizard", "Done") -QT_TRANSLATE_NOOP("QWizard", "&Finish") -QT_TRANSLATE_NOOP("QWizard", "Cancel") -QT_TRANSLATE_NOOP("QWizard", "Cancel") -QT_TRANSLATE_NOOP("QWizard", "Help") -QT_TRANSLATE_NOOP("QWizard", "&Help") diff --git a/pkgutils.py b/pkgutils.py index 19152c41..1147228d 100755 --- a/pkgutils.py +++ b/pkgutils.py @@ -25,13 +25,13 @@ along with this program. If not, see . """ from __future__ import annotations -import os -import sys -import shutil -import zipfile import datetime -import subprocess import email.utils +import os +import shutil +import subprocess +import sys +import zipfile OS_NONE = 0 OS_LINUX = 1 @@ -330,59 +330,59 @@ def buildQtI18nTS(sysArgs: list[str]) -> None: print("Scanning Source Tree:") print("") - srcList = [os.path.join("i18n", "qtbase.py")] - for nRoot, _, nFiles in os.walk("novelwriter"): - if os.path.isdir(nRoot): - for aFile in nFiles: - aPath = os.path.join(nRoot, aFile) - if os.path.isfile(aPath) and aFile.endswith(".py"): - srcList.append(aPath) + sources = [os.path.join("i18n", "qtbase.py")] + for root, _, files in os.walk("novelwriter"): + if os.path.isdir(root): + for file in files: + source = os.path.join(root, file) + if os.path.isfile(source) and file.endswith(".py"): + sources.append(source) - for aSource in srcList: - print(aSource) + for source in sources: + print(source) print("") print("TS Files to Update:") print("") - tsList = [] + translations = [] if len(sysArgs) >= 2: - for anArg in sysArgs[1:]: - if not (anArg.startswith("i18n") and anArg.endswith(".ts")): + for arg in sysArgs[1:]: + if not (arg.startswith("i18n") and arg.endswith(".ts")): continue - fName = os.path.basename(anArg) - if not fName.startswith("nw_") and len(fName) > 6: - print("Skipping non-novelWriter TS file %s" % fName) + file = os.path.basename(arg) + if not file.startswith("nw_") and len(file) > 6: + print("Skipping non-novelWriter TS file %s" % file) continue - if os.path.isfile(anArg): - tsList.append(anArg) - elif os.path.exists(anArg): + if os.path.isfile(arg): + translations.append(arg) + elif os.path.exists(arg): pass else: # Create an empty new language file - lCode = fName[3:-3] - writeFile(anArg, ( + langCode = file[3:-3] + writeFile(arg, ( "\n" "\n" - f"\n" + f"\n" )) - tsList.append(anArg) + translations.append(arg) else: print("No translation files selected for update ...") print("") return - for aTS in tsList: - print(aTS) + for translation in translations: + print(translation) print("") print("Updating Language Files:") print("") # Using the pylupdate tool from PyQt6 as it supports TS file format 2.1. - lupdate(srcList, tsList, no_obsolete=True, no_summary=False) + lupdate(sources, translations, no_obsolete=True, no_summary=False) print("") @@ -563,7 +563,7 @@ def importI18nUpdates(sysArgs: list[str]) -> None: def makeMinimalPackage(targetOS: int) -> None: """Pack the core source file in a single zip file.""" - from zipfile import ZipFile, ZIP_DEFLATED + from zipfile import ZIP_DEFLATED, ZipFile print("") print("Building Minimal ZIP File") @@ -926,8 +926,8 @@ def makeForLaunchpad(doSign: bool = False, isFirst: bool = False) -> None: def makeAppImage(sysArgs: list[str]) -> list[str]: """Build an AppImage.""" - import glob import argparse + import glob try: import python_appimage # noqa: F401 # type: ignore @@ -1144,9 +1144,9 @@ def makeWindowsEmbedded(sysArgs: list[str]) -> None: """Set up a package with embedded Python and dependencies for Windows installation. """ + import compileall import urllib.request import zipfile - import compileall print("") print("Build Standalone Windows Package")