diff --git a/.gitignore b/.gitignore index 71a1e39..599c8df 100644 --- a/.gitignore +++ b/.gitignore @@ -149,3 +149,9 @@ src/xx11.py.bak src/xx1.py src/xx3.py src/xx10.py +src/locales/de_de/LC_MESSAGES/observer.po.bak +src/tools.pro/__pycache__/stub.cpython-313.pyc +src/tools.pro/__pycache__/zipfiles.cpython-313.pyc +src/tools.pro/flags/__pycache__/downresize.cpython-313.pyc +src/locales/en_us/LC_MESSAGES/observer.mo.gz +src/locales/de_de/LC_MESSAGES/observer.mo.gz diff --git a/src/build_loc.bat b/src/build_loc.bat new file mode 100644 index 0000000..bb459c3 --- /dev/null +++ b/src/build_loc.bat @@ -0,0 +1,43 @@ +:: --------------------------------------------------------------------------- +:: Datei: build_loc.bat - Windows MS-DOS Batch file +:: Author: Jens Kallup - paule32 +:: +:: Rechte: (c) 2024 by kallup non-profit software +:: all rights reserved +:: +:: only for education, and for non-profit usage !!! +:: commercial use ist not allowed. +:: --------------------------------------------------------------------------- +@echo off +echo create directories... + +:: --------------------------------------------------------------------------- +:: for default, the neccassary localization directories, and file are already +:: exists. But I add a "mkdir" command, and return value check for future use +:: new languages can be add into the for range block. +:: --------------------------------------------------------------------------- +:: en => English +:: de => German +:: --------------------------------------------------------------------------- +mkdir __pycache__\_internal\locales\de_de\LC_MESSAGES +mkdir __pycache__\_internal\locales\en_us\LC_MESSAGES + +set BASEDIR=%cd% + +::set PYTHONPATH= +::%PY%\Lib;%PY%\Lib\site-packagesss +::set PYTHONHOME= +set SRC=%BASEDIR%/src +set VPA=%BASEDIR%/venv + +cd %BASEDIR%\locales\de_de\LC_MESSAGES +rm -rf observer.mo.gz +msgfmt -o observer.mo observer.po +gzip -9 observer.mo +copy observer.mo.gz %BASEDIR%\__pycache__\_internal\locales\de_de\LC_MESSAGES + +cd %BASEDIR%\locales\en_us\LC_MESSAGES +rm -rf observer.mo.gz +msgfmt -o observer.mo observer.po +gzip -9 observer.mo +copy observer.mo.gz %BASEDIR%\__pycache__\_internal\locales\en_us\LC_MESSAGES diff --git a/src/client.py b/src/client.py index a0044e3..322b49b 100644 --- a/src/client.py +++ b/src/client.py @@ -16129,47 +16129,68 @@ def ApplicationAtExit(): class LoginDialog(QDialog): def __init__(self): super().__init__() - self.setWindowTitle("Login Screen") - self.setGeometry(100, 100, 400, 300) + self.setWindowTitle("Login") + self.setGeometry(100, 100, 450, 400) + self.setStyleSheet(_("login_dialog_style")) + # Hauptlayout des Dialogs layout = QVBoxLayout() - # Bild (Logo oder Symbol) - self.logo_label = QLabel(self) - pixmap = QPixmap("path/to/your/image.png") # Ersetze den Pfad durch den Pfad zu deinem Bild - self.logo_label.setPixmap(pixmap) - self.logo_label.setAlignment(Qt.AlignCenter) - layout.addWidget(self.logo_label) - - # Eingabe-ComboBox + # Titel: Login + self.title_label = QLabel("Login") + self.title_label.setAlignment(Qt.AlignCenter) + self.title_label.setFont(QFont("Arial", 18, QFont.Bold)) + self.title_label.setStyleSheet("color: #ffffff;") + self.title_label.setMaximumHeight(100) + layout.addWidget(self.title_label) + + # ComboBox zur Auswahl self.combo_box = QComboBox() self.combo_box.addItems(["Option 1", "Option 2", "Option 3"]) - layout.addWidget(self.combo_box) + self.combo_box.setStyleSheet(_("login_dialog_combobox")) - # Weitere Eingabezeile unterhalb der ComboBox + layout.addWidget(self.combo_box) + + # Eingabefeld unter der ComboBox self.additional_field = QLineEdit() - self.additional_field.setPlaceholderText("Zusätzliche Eingabe") - layout.addWidget(self.additional_field) + self.additional_field.setPlaceholderText(_("type in server")) + self.additional_field.setStyleSheet(_("login_dialog_edit1")) + self.additional_field.mouseDoubleClickEvent = self.open_additional_dialog + layout.addWidget(self.additional_field) + # Eingabe für Benutzername self.username_field = QLineEdit() - self.username_field.setPlaceholderText("Benutzername eingeben") - layout.addWidget(self.username_field) + self.username_field.setPlaceholderText(_("type in username")) + self.username_field.setStyleSheet(_("login_dialog_edit2")) + layout.addWidget(self.username_field) + # Eingabe für Passwort self.password_field = QLineEdit() - self.password_field.setPlaceholderText("Passwort eingeben") + self.password_field.setPlaceholderText(_("type in password")) self.password_field.setEchoMode(QLineEdit.Password) - layout.addWidget(self.password_field) + self.password_field.setStyleSheet(_("login_dialog_pass")) + layout.addWidget(self.password_field) + # Login-Button - self.login_button = QPushButton("Login") - layout.addWidget(self.login_button) + self.login_button = QPushButton(_("Login into the System")) + self.login_button.setStyleSheet(_("login_dialog_push")) + self.login_button.setCursor(Qt.PointingHandCursor) + layout.addWidget(self.login_button) + # Setze das Layout self.setLayout(layout) + def open_additional_dialog(self, event): + additional_dialog = QDialog(self) + additional_dialog.setWindowTitle("Zusätzlicher Dialog") + additional_dialog.setGeometry(150, 150, 300, 200) + additional_dialog.exec_() + # ------------------------------------------------------------------------ # this is our "main" entry point, where the application will start. # ------------------------------------------------------------------------ diff --git a/src/locales/de_de/LC_MESSAGES/observer.mo.gz b/src/locales/de_de/LC_MESSAGES/observer.mo.gz index ba824c7..43e7899 100644 Binary files a/src/locales/de_de/LC_MESSAGES/observer.mo.gz and b/src/locales/de_de/LC_MESSAGES/observer.mo.gz differ diff --git a/src/locales/de_de/LC_MESSAGES/observer.po b/src/locales/de_de/LC_MESSAGES/observer.po index abaf18e..fbda7d2 100644 --- a/src/locales/de_de/LC_MESSAGES/observer.po +++ b/src/locales/de_de/LC_MESSAGES/observer.po @@ -862,6 +862,71 @@ msgstr "" "\"Persian (Farsi)\",\"Polish\",\"Portuguese\",\"Romanian\",\"Russian\",\"Serbian\",\"Serbian-Cyrillic\",\"Slovak\"," "\"Slovene\",\"Spanish\",\"Swedish\",\"Turkish\",\"Ukrainian\",\"Vietnamese\"]" +msgid "login_dialog_style" +msgstr "" + "background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0," + "stop: 0 #000080," + "stop: 1 #000000);" + "border: 4px solid red;" + "border-radius: 8px;" + +msgid "login_dialog_combobox" +msgstr "" + "background-color: #fff;" + "padding: 6px;" + "font-size: 14px;" + "line-height: 20px;" + "border: 2px solid #ffffff;" + "border-radius: 4px;" + "margin: 8px 0;" + "font-family: monospace;" + +msgid "login_dialog_edit1" +msgstr "" + "background-color: #fff;" + "padding: 6px;" + "font-size: 14px;" + "line-height: 20px;" + "border: 2px solid #ffffff;" + "border-radius: 4px;" + "margin: 8px 0;" + "font-family: monospace;" + +msgid "login_dialog_edit2" +msgstr "" + "background-color: #fff;" + "padding: 6px;" + "font-size: 14px;" + "line-height: 20px;" + "border: 2px solid #ffffff;" + "border-radius: 4px;" + "margin: 8px 0;" + "font-family: monospace;" + +msgid "login_dialog_pass" +msgstr "" + "background-color: #fff;" + "padding: 6px;" + "font-size: 14px;" + "line-height: 20px;" + "border: 2px solid #ffffff;" + "border-radius: 4px;" + "margin: 8px 0;" + "font-family: monospace;" + +msgid "login_dialog_push" +msgstr "" + "padding: 8px;" + "background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, " + "stop: 0 #243949, stop: 1 #517fa4);" + "color: #ffffff;" + "font-size: 14px;" + "line-height: 20px;" + "font-weight: 500;" + "text-transform: uppercase;" + "border: none;" + "border-radius: 4px;" + msgid "opti00" msgstr "wählen Sie ein gewünschtes Ausgabe-Format:" diff --git a/src/locales/en_us/LC_MESSAGES/observer.mo.gz b/src/locales/en_us/LC_MESSAGES/observer.mo.gz index bd9fbcb..e78268d 100644 Binary files a/src/locales/en_us/LC_MESSAGES/observer.mo.gz and b/src/locales/en_us/LC_MESSAGES/observer.mo.gz differ diff --git a/src/locales/en_us/LC_MESSAGES/observer.po b/src/locales/en_us/LC_MESSAGES/observer.po index 1e57089..c14b04e 100644 --- a/src/locales/en_us/LC_MESSAGES/observer.po +++ b/src/locales/en_us/LC_MESSAGES/observer.po @@ -935,6 +935,71 @@ msgstr "" "\"Persian (Farsi)\",\"Polish\",\"Portuguese\",\"Romanian\",\"Russian\",\"Serbian\",\"Serbian-Cyrillic\",\"Slovak\"," "\"Slovene\",\"Spanish\",\"Swedish\",\"Turkish\",\"Ukrainian\",\"Vietnamese\"]" +msgid "login_dialog_style" +msgstr "" + "background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0," + "stop: 0 #000080," + "stop: 1 #000000);" + "border: 4px solid red;" + "border-radius: 8px;" + +msgid "login_dialog_combobox" +msgstr "" + "background-color: #fff;" + "padding: 6px;" + "font-size: 14px;" + "line-height: 20px;" + "border: 2px solid #ffffff;" + "border-radius: 4px;" + "margin: 8px 0;" + "font-family: monospace;" + +msgid "login_dialog_edit1" +msgstr "" + "background-color: #fff;" + "padding: 6px;" + "font-size: 14px;" + "line-height: 20px;" + "border: 2px solid #ffffff;" + "border-radius: 4px;" + "margin: 8px 0;" + "font-family: monospace;" + +msgid "login_dialog_edit2" +msgstr "" + "background-color: #fff;" + "padding: 6px;" + "font-size: 14px;" + "line-height: 20px;" + "border: 2px solid #ffffff;" + "border-radius: 4px;" + "margin: 8px 0;" + "font-family: monospace;" + +msgid "login_dialog_pass" +msgstr "" + "background-color: #fff;" + "padding: 6px;" + "font-size: 14px;" + "line-height: 20px;" + "border: 2px solid #ffffff;" + "border-radius: 4px;" + "margin: 8px 0;" + "font-family: monospace;" + +msgid "login_dialog_push" +msgstr "" + "padding: 8px;" + "background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, " + "stop: 0 #243949, stop: 1 #517fa4);" + "color: #ffffff;" + "font-size: 14px;" + "line-height: 20px;" + "font-weight: 500;" + "text-transform: uppercase;" + "border: none;" + "border-radius: 4px;" + msgid "opti00" msgstr "Select a desired extraction mode:"