from gettext import gettext as _

from PyQt6 import QtCore, QtGui, QtWidgets


class Ui_PageGeneral(object):
    def setupUi(self, PageGeneral):
        PageGeneral.setObjectName("PageGeneral")
        PageGeneral.resize(693, 620)
        PageGeneral.setWindowTitle("")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(PageGeneral)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.frame = QtWidgets.QFrame(parent=PageGeneral)
        self.frame.setMinimumSize(QtCore.QSize(550, 0))
        self.frame.setFrameShape(QtWidgets.QFrame.Shape.NoFrame)
        self.frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
        self.frame.setObjectName("frame")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.frame)
        self.verticalLayout_2.setSpacing(15)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.label = QtWidgets.QLabel(parent=self.frame)
        font = QtGui.QFont()
        font.setPointSize(11)
        font.setBold(True)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.verticalLayout_2.addWidget(self.label)
        self.groupBox_3 = QtWidgets.QGroupBox(parent=self.frame)
        self.groupBox_3.setObjectName("groupBox_3")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_3)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.download_path = QtWidgets.QLineEdit(parent=self.groupBox_3)
        self.download_path.setReadOnly(True)
        self.download_path.setObjectName("download_path")
        self.gridLayout_2.addWidget(self.download_path, 0, 0, 1, 1)
        self.btn_path_download = QtWidgets.QPushButton(parent=self.groupBox_3)
        self.btn_path_download.setText("")
        self.btn_path_download.setObjectName("btn_path_download")
        self.gridLayout_2.addWidget(self.btn_path_download, 0, 1, 1, 1)
        self.btn_restore_path_download = QtWidgets.QPushButton(parent=self.groupBox_3)
        self.btn_restore_path_download.setText("")
        self.btn_restore_path_download.setObjectName("btn_restore_path_download")
        self.gridLayout_2.addWidget(self.btn_restore_path_download, 0, 2, 1, 1)
        self.verticalLayout_2.addWidget(self.groupBox_3)
        self.spellchecker_groupBox = QtWidgets.QGroupBox(parent=self.frame)
        self.spellchecker_groupBox.setCheckable(True)
        self.spellchecker_groupBox.setObjectName("spellchecker_groupBox")
        self.gridLayout = QtWidgets.QGridLayout(self.spellchecker_groupBox)
        self.gridLayout.setObjectName("gridLayout")
        self.label_2 = QtWidgets.QLabel(parent=self.spellchecker_groupBox)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
        self.dic_path = QtWidgets.QLineEdit(parent=self.spellchecker_groupBox)
        self.dic_path.setReadOnly(True)
        self.dic_path.setObjectName("dic_path")
        self.gridLayout.addWidget(self.dic_path, 2, 0, 1, 1)
        self.spell_comboBox = QtWidgets.QComboBox(parent=self.spellchecker_groupBox)
        self.spell_comboBox.setObjectName("spell_comboBox")
        self.gridLayout.addWidget(self.spell_comboBox, 0, 0, 1, 3)
        self.btn_path_spell = QtWidgets.QPushButton(parent=self.spellchecker_groupBox)
        self.btn_path_spell.setText("")
        self.btn_path_spell.setObjectName("btn_path_spell")
        self.gridLayout.addWidget(self.btn_path_spell, 2, 1, 1, 1)
        self.btn_default_path_spell = QtWidgets.QPushButton(parent=self.spellchecker_groupBox)
        self.btn_default_path_spell.setText("")
        self.btn_default_path_spell.setObjectName("btn_default_path_spell")
        self.gridLayout.addWidget(self.btn_default_path_spell, 2, 2, 1, 1)
        self.label_3 = QtWidgets.QLabel(parent=self.spellchecker_groupBox)
        font = QtGui.QFont()
        font.setItalic(True)
        self.label_3.setFont(font)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 3, 0, 1, 1)
        self.verticalLayout_2.addWidget(self.spellchecker_groupBox)
        self.groupBox_2 = QtWidgets.QGroupBox(parent=self.frame)
        self.groupBox_2.setObjectName("groupBox_2")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.groupBox_2)
        self.verticalLayout.setObjectName("verticalLayout")
        self.btn_confirm_in_close = QtWidgets.QCheckBox(parent=self.groupBox_2)
        self.btn_confirm_in_close.setObjectName("btn_confirm_in_close")
        self.verticalLayout.addWidget(self.btn_confirm_in_close)
        self.btn_quit_in_close = QtWidgets.QCheckBox(parent=self.groupBox_2)
        self.btn_quit_in_close.setObjectName("btn_quit_in_close")
        self.verticalLayout.addWidget(self.btn_quit_in_close)
        self.btn_start_background = QtWidgets.QCheckBox(parent=self.groupBox_2)
        self.btn_start_background.setObjectName("btn_start_background")
        self.verticalLayout.addWidget(self.btn_start_background)
        self.btn_start_system = QtWidgets.QCheckBox(parent=self.groupBox_2)
        self.btn_start_system.setObjectName("btn_start_system")
        self.verticalLayout.addWidget(self.btn_start_system)
        self.line_2 = QtWidgets.QFrame(parent=self.groupBox_2)
        self.line_2.setFrameShape(QtWidgets.QFrame.Shape.HLine)
        self.line_2.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
        self.line_2.setObjectName("line_2")
        self.verticalLayout.addWidget(self.line_2)
        self.dontUseNativeDialog = QtWidgets.QCheckBox(parent=self.groupBox_2)
        self.dontUseNativeDialog.setObjectName("dontUseNativeDialog")
        self.verticalLayout.addWidget(self.dontUseNativeDialog)
        self.line = QtWidgets.QFrame(parent=self.groupBox_2)
        self.line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
        self.line.setObjectName("line")
        self.verticalLayout.addWidget(self.line)
        self.btn_wayland = QtWidgets.QCheckBox(parent=self.groupBox_2)
        self.btn_wayland.setObjectName("btn_wayland")
        self.verticalLayout.addWidget(self.btn_wayland)
        self.verticalLayout_2.addWidget(self.groupBox_2)
        self.groupBox_debug_logs = QtWidgets.QGroupBox(parent=self.frame)
        self.groupBox_debug_logs.setObjectName("groupBox_debug_logs")
        self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.groupBox_debug_logs)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.debug_logs_path = QtWidgets.QLineEdit(parent=self.groupBox_debug_logs)
        self.debug_logs_path.setReadOnly(True)
        self.debug_logs_path.setObjectName("debug_logs_path")
        self.verticalLayout_4.addWidget(self.debug_logs_path)
        self.label_debug_logs_hint = QtWidgets.QLabel(parent=self.groupBox_debug_logs)
        self.label_debug_logs_hint.setWordWrap(True)
        self.label_debug_logs_hint.setObjectName("label_debug_logs_hint")
        self.verticalLayout_4.addWidget(self.label_debug_logs_hint)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.btn_open_debug_logs = QtWidgets.QPushButton(parent=self.groupBox_debug_logs)
        self.btn_open_debug_logs.setObjectName("btn_open_debug_logs")
        self.horizontalLayout_2.addWidget(self.btn_open_debug_logs)
        self.btn_delete_old_debug_logs = QtWidgets.QPushButton(parent=self.groupBox_debug_logs)
        self.btn_delete_old_debug_logs.setObjectName("btn_delete_old_debug_logs")
        self.horizontalLayout_2.addWidget(self.btn_delete_old_debug_logs)
        self.btn_delete_all_debug_logs = QtWidgets.QPushButton(parent=self.groupBox_debug_logs)
        self.btn_delete_all_debug_logs.setObjectName("btn_delete_all_debug_logs")
        self.horizontalLayout_2.addWidget(self.btn_delete_all_debug_logs)
        self.verticalLayout_4.addLayout(self.horizontalLayout_2)
        self.btn_reset_settings = QtWidgets.QPushButton(parent=self.groupBox_debug_logs)
        self.btn_reset_settings.setObjectName("btn_reset_settings")
        self.verticalLayout_4.addWidget(self.btn_reset_settings)
        self.verticalLayout_2.addWidget(self.groupBox_debug_logs)
        self.horizontalLayout.addWidget(self.frame)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
        self.horizontalLayout.addItem(spacerItem1)
        self.verticalLayout_3.addLayout(self.horizontalLayout)
        spacerItem2 = QtWidgets.QSpacerItem(20, 295, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
        self.verticalLayout_3.addItem(spacerItem2)

        self.retranslateUi(PageGeneral)
        QtCore.QMetaObject.connectSlotsByName(PageGeneral)

    def retranslateUi(self, PageGeneral):
        
        self.label.setText(_("General"))
        self.groupBox_3.setTitle(_("Download Directory"))
        self.btn_path_download.setToolTip(_("Set new folder for downloads"))
        self.btn_restore_path_download.setToolTip(_("Define default folder for downloads"))
        self.spellchecker_groupBox.setTitle(_("Spellchecker"))
        self.label_2.setText(_("Directory"))
        self.btn_path_spell.setToolTip(_("Recognizes only compiled dictionaries (.bdic)"))
        self.btn_default_path_spell.setToolTip(_("Define standard dictionaries"))
        self.label_3.setText(_("Note: Required restart."))
        self.groupBox_2.setTitle(_("Behavior"))
        self.btn_confirm_in_close.setText(_("Confirm before closing the window"))
        self.btn_quit_in_close.setText(_("Close when closing the window"))
        self.btn_start_background.setText(_("Start minimized"))
        self.btn_start_system.setText(_("Start with the system"))
        self.dontUseNativeDialog.setText(_("Don\'t use a platform-native file dialog"))
        self.btn_wayland.setText(_("Wayland window system"))
        self.groupBox_debug_logs.setTitle(_("Debug logs"))
        self.label_debug_logs_hint.setText(_("Crash reports are stored in this folder. You can open the directory or clean old files."))
        self.btn_open_debug_logs.setText(_("Open folder"))
        self.btn_delete_old_debug_logs.setText(_("Delete old"))
        self.btn_delete_all_debug_logs.setText(_("Delete all"))
        self.btn_reset_settings.setText(_("Reset settings"))


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    PageGeneral = QtWidgets.QWidget()
    ui = Ui_PageGeneral()
    ui.setupUi(PageGeneral)
    PageGeneral.show()
    sys.exit(app.exec())
