From af36a3b1bf51a3bd809ae3c72dad433523397802 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sat, 25 Oct 2025 23:55:29 +0200 Subject: [PATCH] Remove extra qtbase translations for buttons --- i18n/README.md | 17 ----------------- i18n/qtbase.py | 49 ------------------------------------------------- utils/assets.py | 1 - 3 files changed, 67 deletions(-) delete mode 100644 i18n/qtbase.py diff --git a/i18n/README.md b/i18n/README.md index b2df46f0..6b8ce27f 100644 --- a/i18n/README.md +++ b/i18n/README.md @@ -114,23 +114,6 @@ You can now test the translation in novelWriter. The Preferences dialog should l 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 Projects can have a different language setting than the GUI itself. The files with format diff --git a/i18n/qtbase.py b/i18n/qtbase.py deleted file mode 100644 index e40279cd..00000000 --- a/i18n/qtbase.py +++ /dev/null @@ -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") diff --git a/utils/assets.py b/utils/assets.py index 7f0222cd..5822cc96 100644 --- a/utils/assets.py +++ b/utils/assets.py @@ -111,7 +111,6 @@ def updateTranslationSources(args: argparse.Namespace) -> None: print("") sources = list((ROOT_DIR / "novelwriter").glob("**/*.py")) - sources.insert(0, ROOT_DIR / "i18n" / "qtbase.py") for source in sources: print(source.relative_to(ROOT_DIR))