File tree 3 files changed +36
-18
lines changed
3 files changed +36
-18
lines changed Original file line number Diff line number Diff line change @@ -685,13 +685,13 @@ def _update_next_button(self):
685
685
686
686
name : str = self .ui .nextBtn .text ()
687
687
if isinstance (widget , WizardInstallerSelectPage ):
688
- name = self . _tr ( "Next" )
688
+ name = QApplication . translate ( "WizardInstallerDialog" , "Next" )
689
689
elif isinstance (widget , WizardInstallerRequiresVersionPage ):
690
- name = self . _tr ( "Install anyway" )
690
+ name = QApplication . translate ( "WizardInstallerDialog" , "Install anyway" )
691
691
elif isinstance (widget , (WizardInstallerCancelPage , WizardInstallerErrorPage )):
692
692
self .ui .nextBtn .setDisabled (True )
693
693
else :
694
- name = self . _tr ( "Install" )
694
+ name = QApplication . translate ( "WizardInstallerDialog" , "Install" )
695
695
696
696
self .ui .nextBtn .setText (name )
697
697
@@ -747,6 +747,3 @@ def exec(self):
747
747
self ._update_next_button ()
748
748
self ._update_focus ()
749
749
return super ().exec ()
750
-
751
- def _tr (self , value : str ):
752
- return QApplication .translate ("WizardInstallerDialog" , value )
Original file line number Diff line number Diff line change @@ -49,13 +49,15 @@ def name(self):
49
49
return "BAIN Wizard Installer"
50
50
51
51
def localizedName (self ) -> str :
52
- return self . _tr ( "BAIN Wizard Installer" )
52
+ return QApplication . translate ( "WizardInstaller" , "BAIN Wizard Installer" )
53
53
54
54
def author (self ):
55
55
return "Holt59"
56
56
57
57
def description (self ):
58
- return self ._tr ("Installer for BAIN archive containing wizard scripts." )
58
+ return QApplication .translate (
59
+ "WizardInstaller" , "Installer for BAIN archive containing wizard scripts."
60
+ )
59
61
60
62
def version (self ):
61
63
return mobase .VersionInfo (1 , 0 , 2 )
@@ -391,8 +393,3 @@ def install(
391
393
# if user canceled, we simply notify the installation manager
392
394
else :
393
395
return mobase .InstallResult .CANCELED
394
-
395
- def _tr (self , value : str ) -> str :
396
- # we need this to translate string in Python. Check the common documentation
397
- # for more details
398
- return QApplication .translate ("WizardInstaller" , value )
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<!DOCTYPE TS >
3
3
<TS version =" 2.1" >
4
+ <context >
5
+ <name >WizardInstaller</name >
6
+ <message >
7
+ <location filename =" installer.py" line =" 52" />
8
+ <source >BAIN Wizard Installer</source >
9
+ <translation type =" unfinished" />
10
+ </message >
11
+ <message >
12
+ <location filename =" installer.py" line =" 58" />
13
+ <source >Installer for BAIN archive containing wizard scripts.</source >
14
+ <translation type =" unfinished" />
15
+ </message >
16
+ </context >
4
17
<context >
5
18
<name >WizardInstallerComplete</name >
6
19
<message >
31
44
</context >
32
45
<context >
33
46
<name >WizardInstallerDialog</name >
47
+ <message >
48
+ <location filename =" ui\wizardinstallerdialog.ui" line =" 0" />
49
+ <location filename =" dialog.py" line =" 688" />
50
+ <source >Next</source >
51
+ <translation type =" unfinished" />
52
+ </message >
53
+ <message >
54
+ <location filename =" dialog.py" line =" 690" />
55
+ <source >Install anyway</source >
56
+ <translation type =" unfinished" />
57
+ </message >
58
+ <message >
59
+ <location filename =" dialog.py" line =" 694" />
60
+ <source >Install</source >
61
+ <translation type =" unfinished" />
62
+ </message >
34
63
<message >
35
64
<location filename =" ui\wizardinstallerdialog.ui" line =" 0" />
36
65
<source >BAIN Wizard Installer</source >
56
85
<source >Back</source >
57
86
<translation type =" unfinished" />
58
87
</message >
59
- <message >
60
- <location filename =" ui\wizardinstallerdialog.ui" line =" 0" />
61
- <source >Next</source >
62
- <translation type =" unfinished" />
63
- </message >
64
88
<message >
65
89
<location filename =" ui\wizardinstallerdialog.ui" line =" 0" />
66
90
<source >Cancel</source >
You can’t perform that action at this time.
0 commit comments