Rename standard buttons to have transaltions

This commit is contained in:
RumovZ 2021-02-01 23:20:57 +01:00
parent 6c7b195da8
commit 2ddb4edbb0
2 changed files with 6 additions and 2 deletions

View file

@ -83,7 +83,11 @@ class DeckConf(QDialog):
self.setWindowTitle( self.setWindowTitle(
without_unicode_isolation(tr(TR.ACTIONS_OPTIONS_FOR, val=self.deck["name"])) without_unicode_isolation(tr(TR.ACTIONS_OPTIONS_FOR, val=self.deck["name"]))
) )
self.form.buttonBox.addButton(label, QDialogButtonBox.AcceptRole) self.form.buttonBox.button(QDialogButtonBox.Ok).setText(label)
self.form.buttonBox.button(QDialogButtonBox.Cancel).setText(
tr(TR.ACTIONS_CANCEL)
)
self.form.buttonBox.button(QDialogButtonBox.Help).setText(tr(TR.ACTIONS_HELP))
if self.mw.col.schedVer() == 1: if self.mw.col.schedVer() == 1:
self.form.secondFilter.setVisible(False) self.form.secondFilter.setVisible(False)
restoreGeom(self, "dyndeckconf") restoreGeom(self, "dyndeckconf")

View file

@ -269,7 +269,7 @@
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="standardButtons"> <property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Help</set> <set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
</property> </property>
</widget> </widget>
</item> </item>