From 400b6b1ce8f3c0784c6788de672ae98d6cf97273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Sun, 21 Jul 2024 16:29:03 +0200 Subject: [PATCH] Update translations. --- src/dialog.py | 8 ++++---- src/installer.py | 6 +++--- src/installer_wizard_en.ts | 34 +++++++++++++++++++++++++++++----- 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/src/dialog.py b/src/dialog.py index 417a481..76d10bb 100644 --- a/src/dialog.py +++ b/src/dialog.py @@ -685,13 +685,13 @@ def _update_next_button(self): name: str = self.ui.nextBtn.text() if isinstance(widget, WizardInstallerSelectPage): - name = self._tr("Next") + name = self.tr("Next") elif isinstance(widget, WizardInstallerRequiresVersionPage): - name = self._tr("Install anyway") + name = self.tr("Install anyway") elif isinstance(widget, (WizardInstallerCancelPage, WizardInstallerErrorPage)): self.ui.nextBtn.setDisabled(True) else: - name = self._tr("Install") + name = self.tr("Install") self.ui.nextBtn.setText(name) @@ -748,5 +748,5 @@ def exec(self): self._update_focus() return super().exec() - def _tr(self, value: str): + def tr(self, value: str): # pyright: ignore[reportIncompatibleMethodOverride] return QApplication.translate("WizardInstallerDialog", value) diff --git a/src/installer.py b/src/installer.py index 27cb2c3..1e57cf4 100644 --- a/src/installer.py +++ b/src/installer.py @@ -49,13 +49,13 @@ def name(self): return "BAIN Wizard Installer" def localizedName(self) -> str: - return self._tr("BAIN Wizard Installer") + return self.tr("BAIN Wizard Installer") def author(self): return "Holt59" def description(self): - return self._tr("Installer for BAIN archive containing wizard scripts.") + return self.tr("Installer for BAIN archive containing wizard scripts.") def version(self): return mobase.VersionInfo(1, 0, 2) @@ -392,7 +392,7 @@ def install( else: return mobase.InstallResult.CANCELED - def _tr(self, value: str) -> str: + def tr(self, value: str) -> str: # we need this to translate string in Python. Check the common documentation # for more details return QApplication.translate("WizardInstaller", value) diff --git a/src/installer_wizard_en.ts b/src/installer_wizard_en.ts index 7e3e9df..0b1bd68 100644 --- a/src/installer_wizard_en.ts +++ b/src/installer_wizard_en.ts @@ -1,6 +1,19 @@ + + WizardInstaller + + + BAIN Wizard Installer + + + + + Installer for BAIN archive containing wizard scripts. + + + WizardInstallerComplete @@ -31,6 +44,22 @@ WizardInstallerDialog + + + + Next + + + + + Install anyway + + + + + Install + + BAIN Wizard Installer @@ -56,11 +85,6 @@ Back - - - Next - - Cancel