|
@@ -10,7 +10,7 @@
|
|
|
|
|
|
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
|
|
|
QMetaObject, QObject, QPoint, QRect,
|
|
|
- QSize, QTime, QUrl, Qt)
|
|
|
+ QSize, QTime, Qt)
|
|
|
from PySide6.QtGui import (QAction, QActionGroup)
|
|
|
from PySide6.QtMultimediaWidgets import QVideoWidget
|
|
|
from PySide6.QtWidgets import (QApplication, QComboBox, QDateTimeEdit, QFrame,
|
|
@@ -21,6 +21,7 @@ from PySide6.QtWidgets import (QApplication, QComboBox, QDateTimeEdit, QFrame,
|
|
|
QWidget)
|
|
|
|
|
|
from widgets import PLineEdit, PStackedWidget
|
|
|
+from module import translate
|
|
|
|
|
|
|
|
|
class Ui_MainWindow(object):
|
|
@@ -265,16 +266,15 @@ class Ui_MainWindow(object):
|
|
|
self.rotate_image_document.setCheckable(True)
|
|
|
self.rotate_image_document.setChecked(True)
|
|
|
self.no_rotate_image_document = QAction(MainWindow)
|
|
|
- self.no_rotate_image_document.setObjectName(u"no_rotate_image_document")
|
|
|
+ self.no_rotate_image_document.setObjectName(
|
|
|
+ u"no_rotate_image_document")
|
|
|
self.no_rotate_image_document.setCheckable(True)
|
|
|
-
|
|
|
+
|
|
|
self.check_rotate = QActionGroup(MainWindow)
|
|
|
self.check_rotate.setObjectName(u"check_rotate")
|
|
|
self.check_rotate.addAction(self.rotate_image_document)
|
|
|
self.check_rotate.addAction(self.no_rotate_image_document)
|
|
|
|
|
|
-
|
|
|
-
|
|
|
MainWindow.setCentralWidget(self.centralwidget)
|
|
|
self.menubar = QMenuBar(MainWindow)
|
|
|
self.menubar.setObjectName(u"menubar")
|
|
@@ -314,7 +314,7 @@ class Ui_MainWindow(object):
|
|
|
self.menu_3.addAction(self.btn_show_personal_window)
|
|
|
self.menu_3.addAction(self.btn_show_place_window)
|
|
|
self.menu_3.addSeparator()
|
|
|
-
|
|
|
+
|
|
|
self.menu_3.addAction(self.update_list)
|
|
|
self.menu_2.addAction(self.action_open_history)
|
|
|
# self.menu_3.addActions(self.check_rotate)
|
|
@@ -325,73 +325,43 @@ class Ui_MainWindow(object):
|
|
|
# setupUi
|
|
|
|
|
|
def retranslateUi(self, MainWindow):
|
|
|
- MainWindow.setWindowTitle(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u043f\u0443\u0441\u043a", None))
|
|
|
- self.actionExit.setText(
|
|
|
- QCoreApplication.translate("MainWindow", u"Exit", None))
|
|
|
- self.actionSave.setText(
|
|
|
- QCoreApplication.translate("MainWindow", u"Save", None))
|
|
|
- self.actionLoad.setText(
|
|
|
- QCoreApplication.translate("MainWindow", u"Load", None))
|
|
|
- self.actionExit_2.setText(
|
|
|
- QCoreApplication.translate("MainWindow", u"Exit", None))
|
|
|
- self.setting_cam.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u0430\u043c\u0435\u0440\u044b", None))
|
|
|
- self.rotate_image_document.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u041F\u0435\u0440\u0435\u0432\u043E\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044C \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442", None))
|
|
|
- self.no_rotate_image_document.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u041D\u0435 \u043F\u0435\u0440\u0435\u0432\u043E\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044C \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442", None))
|
|
|
-
|
|
|
- self.btn_show_personal_window.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u0421\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0438", None))
|
|
|
- self.btn_show_place_window.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u041c\u0435\u0441\u0442\u043e \u0432\u044b\u0434\u0430\u0447\u0438", None))
|
|
|
- self.update_list.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043a\u0438", None))
|
|
|
- self.btn_show_about.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u041e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435", None))
|
|
|
- self.exit.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"Exit", None))
|
|
|
- self.action_open_history.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043e\u0432", None))
|
|
|
- self.groupBox.setTitle(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f:", None))
|
|
|
- self.label.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u043f\u0443\u0441\u043a \u2116:", None))
|
|
|
-
|
|
|
- self.label_2.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u0434\u0430\u0447\u0438:", None))
|
|
|
- self.label_4.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u0435\u043d\u0435 \u0434\u043e:", None))
|
|
|
- self.label_3.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u0412\u044b\u0434\u0430\u043b:", None))
|
|
|
- self.label_5.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u041c\u0435\u0441\u0442\u043e \u0432\u044b\u0434\u0430\u0447\u0438:", None))
|
|
|
- self.label_6.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u0439:", None))
|
|
|
- self.label_7.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u0426\u0435\u043b\u044c \u0432\u0438\u0437\u0438\u0442\u0430:", None))
|
|
|
-
|
|
|
- self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u041A\u0430\u043C\u0435\u0440\u0430 \u0434\u043B\u044F \u043B\u0438\u0446\u0430", None))
|
|
|
- self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u041A\u0430\u043C\u0435\u0440\u0430 \u0434\u043B\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", None))
|
|
|
- self.btn_start_cam.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u0430\u043c\u0435\u0440\u0443", None))
|
|
|
- self.capturePhoto.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u0421\u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0440\u043e\u0432\u0430\u0442\u044c", None))
|
|
|
- self.btn_clear.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u041e\u0442\u0447\u0438\u0441\u0442\u0438\u0442\u044c", None))
|
|
|
- self.btn_save.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c", None))
|
|
|
- self.btn_print.setText(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u041f\u0435\u0447\u0430\u0442\u044c", None))
|
|
|
- self.menuFile.setTitle(
|
|
|
- QCoreApplication.translate("MainWindow", u"File", None))
|
|
|
- self.menu.setTitle(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438", None))
|
|
|
- self.menu_3.setTitle(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u0421\u043f\u0438\u0441\u043a\u0438", None))
|
|
|
- self.menu_2.setTitle(QCoreApplication.translate(
|
|
|
- "MainWindow", u"\u0418\u0441\u0442\u043e\u0440\u0438\u044f", None))
|
|
|
+
|
|
|
+ MainWindow.setWindowTitle(translate('Temporary pass'))
|
|
|
+ self.actionExit.setText(translate('Exit'))
|
|
|
+ self.actionSave.setText(translate('Save'))
|
|
|
+ self.actionLoad.setText(translate('Load'))
|
|
|
+ self.actionExit_2.setText(translate('Exit'))
|
|
|
+ self.setting_cam.setText(translate('Camera settings'))
|
|
|
+ self.rotate_image_document.setText(translate('Flip document'))
|
|
|
+ self.no_rotate_image_document.setText(
|
|
|
+ translate('Do not flip the document'))
|
|
|
+ self.btn_show_personal_window.setText(translate('Employees'))
|
|
|
+ self.btn_show_place_window.setText(translate('Place of issue'))
|
|
|
+ self.update_list.setText(translate('Update lists'))
|
|
|
+ self.btn_show_about.setText(translate('About'))
|
|
|
+ self.exit.setText(translate('Exit'))
|
|
|
+ self.action_open_history.setText(translate('Pass history'))
|
|
|
+ self.groupBox.setTitle(F"{translate('Information')}:")
|
|
|
+ self.label.setText(F"{translate('Temporary pass')} №:")
|
|
|
+
|
|
|
+ self.label_2.setText(F"{translate('Date and time of issue')}:")
|
|
|
+ self.label_4.setText(F"{translate('Valid until')}:")
|
|
|
+ self.label_3.setText(F"{translate('Who issued')}:")
|
|
|
+ self.label_5.setText(F"{translate('Place of issue')}:")
|
|
|
+ self.label_6.setText(F"{translate('Receiving')}:")
|
|
|
+ self.label_7.setText(F"{translate('Purpose of the visit')}")
|
|
|
+
|
|
|
+ self.tabWidget.setTabText(self.tabWidget.indexOf(
|
|
|
+ self.tab), translate('Face camera'))
|
|
|
+ self.tabWidget.setTabText(self.tabWidget.indexOf(
|
|
|
+ self.tab_2), translate('Document camera'))
|
|
|
+ self.btn_start_cam.setText(translate('Launch сamera'))
|
|
|
+ self.capturePhoto.setText(translate('Take photo'))
|
|
|
+ self.btn_clear.setText(translate('Clear'))
|
|
|
+ self.btn_save.setText(translate('Save'))
|
|
|
+ self.btn_print.setText(translate('Print'))
|
|
|
+ self.menuFile.setTitle(translate('File'))
|
|
|
+ self.menu.setTitle(translate('Settings'))
|
|
|
+ self.menu_3.setTitle(translate('Lists'))
|
|
|
+ self.menu_2.setTitle(translate('History'))
|
|
|
# retranslateUi
|