Prune some unneeded translation strings
This commit is contained in:
+36
-95
@@ -2198,57 +2198,57 @@
|
||||
<context>
|
||||
<name>GuiManuscriptBuild</name>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="72" />
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="70" />
|
||||
<source>Build Manuscript</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="93" />
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="91" />
|
||||
<source>Output Format</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="119" />
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="117" />
|
||||
<source>Table of Contents</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="147" />
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="145" />
|
||||
<source>Path</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="157" />
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="155" />
|
||||
<source>File Name</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="160" />
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="158" />
|
||||
<source>Reset file name to default</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="184" />
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="182" />
|
||||
<source>Open Folder</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="186" />
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="184" />
|
||||
<source>&Build</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="281" />
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="279" />
|
||||
<source>Select Folder</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="319" />
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="317" />
|
||||
<source>Output folder does not exist.</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="327" />
|
||||
<location filename="../novelwriter/tools/manusbuild.py" line="325" />
|
||||
<source>The file already exists. Do you want to overwrite it?</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
@@ -2415,7 +2415,7 @@
|
||||
<context>
|
||||
<name>GuiOutlineToolBar</name>
|
||||
<message>
|
||||
<location filename="../novelwriter/gui/outline.py" line="223" />
|
||||
<location filename="../novelwriter/gui/outline.py" line="222" />
|
||||
<source>Outline of</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
@@ -3860,65 +3860,6 @@
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QWizard</name>
|
||||
<message>
|
||||
<location filename="qtbase.py" line="54" />
|
||||
<source>Go Back</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qtbase.py" line="55" />
|
||||
<source>< &Back</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qtbase.py" line="56" />
|
||||
<source>Continue</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qtbase.py" line="57" />
|
||||
<source>&Next</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qtbase.py" line="58" />
|
||||
<source>&Next ></source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qtbase.py" line="59" />
|
||||
<source>Commit</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qtbase.py" line="60" />
|
||||
<source>Done</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qtbase.py" line="61" />
|
||||
<source>&Finish</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qtbase.py" line="63" />
|
||||
<location filename="qtbase.py" line="62" />
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qtbase.py" line="64" />
|
||||
<source>Help</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qtbase.py" line="65" />
|
||||
<source>&Help</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SharedData</name>
|
||||
<message>
|
||||
@@ -4041,32 +3982,32 @@
|
||||
<context>
|
||||
<name>_DetailsWidget</name>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="522" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="533" />
|
||||
<source>Setting</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="522" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="533" />
|
||||
<source>Value</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="589" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="600" />
|
||||
<source>Name</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="595" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="606" />
|
||||
<source>Selection</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="611" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="622" />
|
||||
<source>Title</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="612" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="623" />
|
||||
<source>Hidden</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
@@ -4438,27 +4379,27 @@
|
||||
<context>
|
||||
<name>_PreviewWidget</name>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="757" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="769" />
|
||||
<source>Press the "Preview" button to generate ...</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="855" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="867" />
|
||||
<source>Processing ...</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="877" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="888" />
|
||||
<source>Done</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="927" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="938" />
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="928" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="939" />
|
||||
<source>Built</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
@@ -4557,59 +4498,59 @@
|
||||
<context>
|
||||
<name>_StatsWidget</name>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1090" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1050" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1102" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1062" />
|
||||
<source>Words</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1117" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1053" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1129" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1065" />
|
||||
<source>Characters</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1091" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1103" />
|
||||
<source>Words in Headings</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1092" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1104" />
|
||||
<source>Words in Text</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1094" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1106" />
|
||||
<source>Headings</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1095" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1107" />
|
||||
<source>Paragraphs</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1118" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1130" />
|
||||
<source>Characters in Headings</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1119" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1131" />
|
||||
<source>Characters in Text</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1120" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1132" />
|
||||
<source>Characters, No Spaces</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1121" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1133" />
|
||||
<source>Characters in Headings, No Spaces</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1122" />
|
||||
<location filename="../novelwriter/tools/manuscript.py" line="1134" />
|
||||
<source>Characters in Text, No Spaces</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
|
||||
@@ -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")
|
||||
|
||||
+33
-33
@@ -25,13 +25,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
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, (
|
||||
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
|
||||
"<!DOCTYPE TS>\n"
|
||||
f"<TS version=\"2.0\" language=\"{lCode}\" sourcelanguage=\"en_GB\"/>\n"
|
||||
f"<TS version=\"2.0\" language=\"{langCode}\" sourcelanguage=\"en_GB\"/>\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")
|
||||
|
||||
Reference in New Issue
Block a user