1 from PySide2 import QtWidgets as qtw
4 from ui_about_minimisation import Ui_AboutMinimisationDialog
7 class AboutMinimisationDialog(qtw.QDialog):
8 def __init__(self, parent):
9 super().__init__(parent)
10 self.ui = Ui_AboutMinimisationDialog()
12 lang = parent.settings.value('language', 'en_US', type=str)
13 filename = 'minimisation_{}.txt'.format(lang)
14 if not path.exists(filename):
15 filename = 'minimisation_en_US.txt'
16 if not path.exists(filename):
18 text = open(filename).read()
19 self.ui.minimTextEdit.setPlainText(text)
20 self.setWindowTitle(parent.tr('What is Minimisation'))
21 self.ui.closePushButton.setText(parent.tr('Close'))
22 self.ui.closePushButton.clicked.connect(self.close)