Remove extra qtbase translations for buttons
This commit is contained in:
@@ -114,23 +114,6 @@ You can now test the translation in novelWriter. The Preferences dialog should l
|
|||||||
language, so go ahead and select it.
|
language, so go ahead and select it.
|
||||||
|
|
||||||
|
|
||||||
### Missing QtBase Translations
|
|
||||||
|
|
||||||
The default Qt dialogs also have translations, for instance for standard buttons like "Yes", "No",
|
|
||||||
"Ok", "Cancel", etc. Generally, these translation files are installed with the Qt libraries on your
|
|
||||||
system, and novelWriter will collect those translations from there. However, these translations are
|
|
||||||
missing for many languages.
|
|
||||||
|
|
||||||
As a starting point, there is no need to translate any entries in the `.ts` files that are under
|
|
||||||
elements starting with the letter "Q", like "QPlatformTheme", "QWizard", etc. If these turn up in
|
|
||||||
English in novelWriter after activating a translation, it means they are probably missing in the Qt
|
|
||||||
library, and you may also need to translate these.
|
|
||||||
|
|
||||||
These additional translation entries are generated from a file named `i18n/qtbase.py`, which is not
|
|
||||||
a file that novelWriter uses. It is there only to generate these additional entries for the `.ts`
|
|
||||||
files.
|
|
||||||
|
|
||||||
|
|
||||||
## Project Localisation
|
## Project Localisation
|
||||||
|
|
||||||
Projects can have a different language setting than the GUI itself. The files with format
|
Projects can have a different language setting than the GUI itself. The files with format
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
"""
|
|
||||||
Qt Base Translation File
|
|
||||||
========================
|
|
||||||
|
|
||||||
This file causes Qt Linguist to generate translation entries for the Qt
|
|
||||||
elements that need translation in novelWriter for those languages who do
|
|
||||||
not yet have a qtbase_xx.qm file shipped with Qt.
|
|
||||||
|
|
||||||
If a qtbase_xx.qm file already exists, do not add a translation for the
|
|
||||||
entries generated from this file.
|
|
||||||
""" # noqa
|
|
||||||
|
|
||||||
from PyQt6.QtCore import QT_TRANSLATE_NOOP
|
|
||||||
|
|
||||||
# QDialogButtonBox
|
|
||||||
# ================
|
|
||||||
|
|
||||||
QT_TRANSLATE_NOOP("QDialogButtonBox", "OK")
|
|
||||||
|
|
||||||
# QGnomeTheme
|
|
||||||
# ===========
|
|
||||||
|
|
||||||
QT_TRANSLATE_NOOP("QGnomeTheme", "&OK")
|
|
||||||
QT_TRANSLATE_NOOP("QGnomeTheme", "&Save")
|
|
||||||
QT_TRANSLATE_NOOP("QGnomeTheme", "&Cancel")
|
|
||||||
QT_TRANSLATE_NOOP("QGnomeTheme", "&Close")
|
|
||||||
QT_TRANSLATE_NOOP("QGnomeTheme", "Close without Saving")
|
|
||||||
|
|
||||||
# QPlatformTheme
|
|
||||||
# ==============
|
|
||||||
|
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "OK")
|
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "Save")
|
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "Save All")
|
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "Open")
|
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "&Yes")
|
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "Yes to &All")
|
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "&No")
|
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "N&o to All")
|
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "Abort")
|
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "Retry")
|
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "Ignore")
|
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "Close")
|
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "Cancel")
|
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "Discard")
|
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "Help")
|
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "Apply")
|
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "Reset")
|
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "Restore Defaults")
|
|
||||||
@@ -111,7 +111,6 @@ def updateTranslationSources(args: argparse.Namespace) -> None:
|
|||||||
print("")
|
print("")
|
||||||
|
|
||||||
sources = list((ROOT_DIR / "novelwriter").glob("**/*.py"))
|
sources = list((ROOT_DIR / "novelwriter").glob("**/*.py"))
|
||||||
sources.insert(0, ROOT_DIR / "i18n" / "qtbase.py")
|
|
||||||
for source in sources:
|
for source in sources:
|
||||||
print(source.relative_to(ROOT_DIR))
|
print(source.relative_to(ROOT_DIR))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user