translation

compare_results
Theophile Terraz 2024-12-20 17:13:44 +01:00
parent 2333ab540e
commit 9db90debeb
3 changed files with 762 additions and 150 deletions

View File

@ -785,14 +785,16 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
dlg.setWindowTitle(self._trad["mb_last_open_title"]) dlg.setWindowTitle(self._trad["mb_last_open_title"])
dlg.setText(self._trad["mb_last_open_msg"]) dlg.setText(self._trad["mb_last_open_msg"])
opt = QMessageBox.Cancel | QMessageBox.Ok # | QMessageBox.Open opt = QMessageBox.No | QMessageBox.Yes # | QMessageBox.Open
dlg.setStandardButtons(opt) dlg.setStandardButtons(opt)
dlg.setIcon(QMessageBox.Question) dlg.setIcon(QMessageBox.Question)
dlg.button(QMessageBox.Yes).setText(self._trad["Yes"])
dlg.button(QMessageBox.No).setText(self._trad["No"])
res = dlg.exec() res = dlg.exec()
if res == QMessageBox.Ok: if res == QMessageBox.Yes:
old = self.conf.last_study old = self.conf.last_study
file = self.dialog_reopen_study_select_backup( file = self.dialog_reopen_study_select_backup(
self.conf.last_study self.conf.last_study
@ -805,7 +807,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
elif res == QMessageBox.Open: elif res == QMessageBox.Open:
self.open_model() self.open_model()
return True return True
elif res == QMessageBox.Cancel: elif res == QMessageBox.No:
return False return False
def dialog_reopen_study_select_backup(self, filename): def dialog_reopen_study_select_backup(self, filename):
@ -832,6 +834,10 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
dlg.setStandardButtons(opt) dlg.setStandardButtons(opt)
dlg.setIcon(QMessageBox.Warning) dlg.setIcon(QMessageBox.Warning)
dlg.button(QMessageBox.Save).setText(self._trad["Save"])
dlg.button(QMessageBox.Close).setText(self._trad["Close"])
if cancel:
dlg.button(QMessageBox.Cancel).setText(self._trad["Cancel"])
res = dlg.exec() res = dlg.exec()

View File

@ -201,3 +201,8 @@ class MainTranslate(UnitTranslate):
) )
self._dict["x"] = _translate("MainWindow", "X (m)") self._dict["x"] = _translate("MainWindow", "X (m)")
self._dict["y"] = _translate("MainWindow", "Y (m)") self._dict["y"] = _translate("MainWindow", "Y (m)")
self._dict["Yes"] = _translate("MainWindow", "Yes")
self._dict["No"] = _translate("MainWindow", "No")
self._dict["Cancel"] = _translate("MainWindow", "Cancel")
self._dict["Save"] = _translate("MainWindow", "Save")
self._dict["Close"] = _translate("MainWindow", "Close")

File diff suppressed because it is too large Load Diff