I18N Code Work done.
This commit is contained in:
@@ -15,10 +15,10 @@ from PyQt6.QtSql import QSqlQuery
|
||||
from PyQt6.QtWidgets import QCheckBox, QDialog, QListView, QMessageBox
|
||||
|
||||
from main import query_error
|
||||
from ui.SessionDialog import Ui_Dialog
|
||||
from ui.SessionDialog import Ui_SessionDialog
|
||||
|
||||
|
||||
class SessionDialog(QDialog, Ui_Dialog):
|
||||
class SessionDialog(QDialog, Ui_SessionDialog):
|
||||
WordIdRole = Qt.ItemDataRole.UserRole
|
||||
SectionIdRole = Qt.ItemDataRole.UserRole + 1
|
||||
BlockRole = Qt.ItemDataRole.UserRole + 2
|
||||
@@ -90,8 +90,8 @@ class SessionDialog(QDialog, Ui_Dialog):
|
||||
@pyqtSlot()
|
||||
def rejected(self): # type: ignore[no-untyped-def]
|
||||
msg = QMessageBox()
|
||||
msg.setText("There is unsaved data.")
|
||||
msg.setInformativeText("Do you want to save the session?")
|
||||
msg.setText(self.tr("There is unsaved data."))
|
||||
msg.setInformativeText(self.tr("Do you want to save the session?"))
|
||||
msg.setStandardButtons(
|
||||
QMessageBox.StandardButton.Save
|
||||
| QMessageBox.StandardButton.Discard
|
||||
@@ -212,7 +212,7 @@ class SessionDialog(QDialog, Ui_Dialog):
|
||||
if not query.exec():
|
||||
query_error(query)
|
||||
else:
|
||||
print(f"Not active: {word_id}")
|
||||
print(self.tr("Not active: ") + f"{word_id}")
|
||||
return
|
||||
|
||||
@pyqtSlot(int, int)
|
||||
|
||||
Reference in New Issue
Block a user