From 3b741c1c03041bce3a1fe59b0068d77317b8aa09 Mon Sep 17 00:00:00 2001 From: Edip Hazuri Date: Fri, 30 May 2025 21:02:23 +0300 Subject: [PATCH 1/3] Add a warning for wayland users --- src/MainWindow.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/MainWindow.py b/src/MainWindow.py index aacf69f..3c25287 100644 --- a/src/MainWindow.py +++ b/src/MainWindow.py @@ -50,6 +50,7 @@ def __init__(self, application): self.define_variables() self.main_window.set_application(application) + self.check_wayland_and_warn() self.user_settings() self.set_autostart() self.init_indicator() @@ -431,3 +432,27 @@ def on_ui_main_window_destroy(self, widget, event): if self.about_dialog.is_visible(): self.about_dialog.hide() self.main_window.get_application().quit() + + def check_wayland_and_warn(self): + wayland_display = os.environ.get('WAYLAND_DISPLAY') + xdg_session_type = os.environ.get('XDG_SESSION_TYPE') + + if not wayland_display or xdg_session_type != 'wayland': + return + + dialog = Gtk.MessageDialog( + parent=None, + flags=0, + message_type=Gtk.MessageType.WARNING, + buttons=Gtk.ButtonsType.OK, + text=_("Wayland Compatibility Warning") + ) + + dialog.format_secondary_text( + _("This application is based on Redshift, which does not work properly on Wayland. " + "For best functionality, please use an X11 session or consider using your desktop environment's night light feature.") + ) + + dialog.run() + dialog.destroy() + self.main_window.get_application().quit() \ No newline at end of file From eb1b8d2f4413741ca4aec0fdf3b986d7cd38c9d2 Mon Sep 17 00:00:00 2001 From: Edip Hazuri Date: Fri, 30 May 2025 21:07:29 +0300 Subject: [PATCH 2/3] Update po files --- po/pardus-night-light.pot | 33 ++++++++++++++++++++---------- po/pt.po | 43 ++++++++++++++++++++++++++++++--------- po/tr.po | 33 ++++++++++++++++++++---------- 3 files changed, 77 insertions(+), 32 deletions(-) diff --git a/po/pardus-night-light.pot b/po/pardus-night-light.pot index 7e29d27..6b38077 100644 --- a/po/pardus-night-light.pot +++ b/po/pardus-night-light.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-15 00:57+0300\n" +"POT-Creation-Date: 2025-05-30 21:02+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -29,7 +29,7 @@ msgstr "" msgid "Launch at startup" msgstr "" -#: ui/MainWindow.glade:238 src/MainWindow.py:58 src/MainWindow.py:265 +#: ui/MainWindow.glade:238 src/MainWindow.py:59 src/MainWindow.py:264 msgid "Pardus Night Light" msgstr "" @@ -42,38 +42,49 @@ msgstr "" msgid "translator-credits" msgstr "" -#: src/MainWindow.py:62 +#: src/MainWindow.py:63 msgid "About Pardus Night Light" msgstr "" -#: src/MainWindow.py:216 +#: src/MainWindow.py:215 msgid "Low" msgstr "" -#: src/MainWindow.py:233 +#: src/MainWindow.py:232 msgid "Medium" msgstr "" -#: src/MainWindow.py:250 +#: src/MainWindow.py:249 msgid "High" msgstr "" -#: src/MainWindow.py:273 +#: src/MainWindow.py:272 msgid "Quit" msgstr "" -#: src/MainWindow.py:285 src/MainWindow.py:402 +#: src/MainWindow.py:284 src/MainWindow.py:401 msgid "Disable" msgstr "" -#: src/MainWindow.py:288 src/MainWindow.py:406 +#: src/MainWindow.py:287 src/MainWindow.py:405 msgid "Enable" msgstr "" -#: src/MainWindow.py:292 src/MainWindow.py:309 +#: src/MainWindow.py:291 src/MainWindow.py:308 msgid "Hide App" msgstr "" -#: src/MainWindow.py:294 src/MainWindow.py:306 src/MainWindow.py:428 +#: src/MainWindow.py:293 src/MainWindow.py:305 src/MainWindow.py:427 msgid "Show App" msgstr "" + +#: src/MainWindow.py:448 +msgid "Wayland Compatibility Warning" +msgstr "" + +#: src/MainWindow.py:452 +msgid "" +"This application is based on Redshift, which does not work properly on " +"Wayland. For best functionality, please use an X11 session or consider using " +"your desktop environment's night light feature." +msgstr "" diff --git a/po/pt.po b/po/pt.po index 8c6c1ce..2be5e0e 100644 --- a/po/pt.po +++ b/po/pt.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-19 10:35+0300\n" +"POT-Creation-Date: 2025-05-30 21:02+0300\n" "PO-Revision-Date: 2024-03-20 18:31+0000\n" "Last-Translator: Hugo Carvalho \n" "Language-Team: \n" @@ -30,42 +30,65 @@ msgstr "Temperatura da cor" msgid "Launch at startup" msgstr "Iniciar no arranque" -#: ui/MainWindow.glade:208 src/MainWindow.py:57 src/MainWindow.py:133 +#: ui/MainWindow.glade:238 src/MainWindow.py:59 src/MainWindow.py:264 msgid "Pardus Night Light" msgstr "Luz Noturna Pardus" -#: ui/MainWindow.glade:237 +#: ui/MainWindow.glade:267 msgid "Simple color temperature application based on Redshift." msgstr "Aplicação para ajustar a temperatura da cor baseada no Redshift." #. Name Surname -#: ui/MainWindow.glade:240 +#: ui/MainWindow.glade:270 msgid "translator-credits" msgstr "Hugo Carvalho " -#: src/MainWindow.py:61 +#: src/MainWindow.py:63 msgid "About Pardus Night Light" msgstr "Acerca do Luz Noturna Pardus" -#: src/MainWindow.py:141 +#: src/MainWindow.py:215 +msgid "Low" +msgstr "" + +#: src/MainWindow.py:232 +msgid "Medium" +msgstr "" + +#: src/MainWindow.py:249 +msgid "High" +msgstr "" + +#: src/MainWindow.py:272 msgid "Quit" msgstr "Sair" -#: src/MainWindow.py:153 src/MainWindow.py:203 +#: src/MainWindow.py:284 src/MainWindow.py:401 msgid "Disable" msgstr "Desativar" -#: src/MainWindow.py:156 src/MainWindow.py:207 +#: src/MainWindow.py:287 src/MainWindow.py:405 msgid "Enable" msgstr "Ativar" -#: src/MainWindow.py:160 src/MainWindow.py:177 +#: src/MainWindow.py:291 src/MainWindow.py:308 msgid "Hide App" msgstr "Ocultar aplicação" -#: src/MainWindow.py:162 src/MainWindow.py:174 src/MainWindow.py:230 +#: src/MainWindow.py:293 src/MainWindow.py:305 src/MainWindow.py:427 msgid "Show App" msgstr "Mostrar aplicação" +#: src/MainWindow.py:448 +msgid "Wayland Compatibility Warning" +msgstr "" + +#: src/MainWindow.py:452 +msgid "" +"This application is based on Redshift, which does not work properly on " +"Wayland. For best functionality, please use an X11 session or consider using " +"your desktop environment's night light feature." +msgstr "" + #~ msgid "Based on Redshift" #~ msgstr "Baseada no Redshift" diff --git a/po/tr.po b/po/tr.po index f3003bf..1404f3c 100644 --- a/po/tr.po +++ b/po/tr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-15 00:57+0300\n" +"POT-Creation-Date: 2025-05-30 21:02+0300\n" "PO-Revision-Date: 2025-04-15 00:58+0300\n" "Last-Translator: Fatih Altun \n" "Language-Team: Turkish \n" @@ -31,7 +31,7 @@ msgstr "Renk Sıcaklığı" msgid "Launch at startup" msgstr "Başlangıçta çalıştır" -#: ui/MainWindow.glade:238 src/MainWindow.py:58 src/MainWindow.py:265 +#: ui/MainWindow.glade:238 src/MainWindow.py:59 src/MainWindow.py:264 msgid "Pardus Night Light" msgstr "Pardus Gece Işığı" @@ -44,41 +44,52 @@ msgstr "Redshift tabanlı basit renk sıcaklığı uygulaması." msgid "translator-credits" msgstr "Fatih Altun " -#: src/MainWindow.py:62 +#: src/MainWindow.py:63 msgid "About Pardus Night Light" msgstr "Pardus Gece Işığı Hakkında" -#: src/MainWindow.py:216 +#: src/MainWindow.py:215 msgid "Low" msgstr "Düşük" -#: src/MainWindow.py:233 +#: src/MainWindow.py:232 msgid "Medium" msgstr "Orta" -#: src/MainWindow.py:250 +#: src/MainWindow.py:249 msgid "High" msgstr "Yüksek" -#: src/MainWindow.py:273 +#: src/MainWindow.py:272 msgid "Quit" msgstr "Çıkış" -#: src/MainWindow.py:285 src/MainWindow.py:402 +#: src/MainWindow.py:284 src/MainWindow.py:401 msgid "Disable" msgstr "Devre Dışı Bırak" -#: src/MainWindow.py:288 src/MainWindow.py:406 +#: src/MainWindow.py:287 src/MainWindow.py:405 msgid "Enable" msgstr "Etkinleştir" -#: src/MainWindow.py:292 src/MainWindow.py:309 +#: src/MainWindow.py:291 src/MainWindow.py:308 msgid "Hide App" msgstr "Gizle" -#: src/MainWindow.py:294 src/MainWindow.py:306 src/MainWindow.py:428 +#: src/MainWindow.py:293 src/MainWindow.py:305 src/MainWindow.py:427 msgid "Show App" msgstr "Göster" +#: src/MainWindow.py:448 +msgid "Wayland Compatibility Warning" +msgstr "" + +#: src/MainWindow.py:452 +msgid "" +"This application is based on Redshift, which does not work properly on " +"Wayland. For best functionality, please use an X11 session or consider using " +"your desktop environment's night light feature." +msgstr "" + #~ msgid "Based on Redshift" #~ msgstr "Redshift tabanlı" From e7c06b9120f7b0164e4dd9eac3a5709c48da30e9 Mon Sep 17 00:00:00 2001 From: Edip Hazuri Date: Fri, 30 May 2025 21:09:27 +0300 Subject: [PATCH 3/3] Update turkish translations --- po/tr.po | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/po/tr.po b/po/tr.po index 1404f3c..652db77 100644 --- a/po/tr.po +++ b/po/tr.po @@ -9,15 +9,15 @@ msgstr "" "Project-Id-Version: 0.1.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-05-30 21:02+0300\n" -"PO-Revision-Date: 2025-04-15 00:58+0300\n" -"Last-Translator: Fatih Altun \n" +"PO-Revision-Date: 2025-05-30 21:09+0300\n" +"Last-Translator: Edip Hazuri \n" "Language-Team: Turkish \n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0\n" -"X-Generator: Gtranslator 42.0\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 3.6\n" #: ui/MainWindow.glade:51 msgid "Night Light" @@ -82,7 +82,7 @@ msgstr "Göster" #: src/MainWindow.py:448 msgid "Wayland Compatibility Warning" -msgstr "" +msgstr "Wayland Uyumluluk Uyarısı" #: src/MainWindow.py:452 msgid "" @@ -90,6 +90,9 @@ msgid "" "Wayland. For best functionality, please use an X11 session or consider using " "your desktop environment's night light feature." msgstr "" +"Bu uygulama Redshift tabanlı olduğundan Waylandda düzgün çalışmamaktadır. En " +"iyi deneyim için, Lütfen X11 oturumuna geçin veya masaüstü ortamınızın gece " +"ışığı özelliğini kullanın." #~ msgid "Based on Redshift" #~ msgstr "Redshift tabanlı"