diff --git a/.gitignore b/.gitignore index 9449676..22564a2 100644 --- a/.gitignore +++ b/.gitignore @@ -99,6 +99,6 @@ ENV/ # Visual Studio Code settings .vscode/ -*.safeeyes.po~ +safeeyes/config/locale/*/LC_MESSAGES/safeeyes.po~ node_modules/ \ No newline at end of file diff --git a/safeeyes/config/locale/ar/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/ar/LC_MESSAGES/safeeyes.po index 9e3b0eb..33aa8f5 100644 --- a/safeeyes/config/locale/ar/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/ar/LC_MESSAGES/safeeyes.po @@ -271,6 +271,10 @@ msgstr "" msgid "Switch the interruptible windows to normal mode" msgstr "" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "" diff --git a/safeeyes/config/locale/bg/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/bg/LC_MESSAGES/safeeyes.po index f86ce95..f520c8b 100644 --- a/safeeyes/config/locale/bg/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/bg/LC_MESSAGES/safeeyes.po @@ -269,6 +269,10 @@ msgstr "" msgid "Switch the interruptible windows to normal mode" msgstr "" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "" diff --git a/safeeyes/config/locale/ca/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/ca/LC_MESSAGES/safeeyes.po index 0902059..7c270a8 100644 --- a/safeeyes/config/locale/ca/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/ca/LC_MESSAGES/safeeyes.po @@ -8,8 +8,8 @@ msgstr "" "POT-Creation-Date: \n" "PO-Revision-Date: 2018-02-01 11:34+0000\n" "Last-Translator: Joan Montané \n" -"Language-Team: Catalan \n" +"Language-Team: Catalan \n" "Language: ca\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -273,6 +273,10 @@ msgstr "" msgid "Switch the interruptible windows to normal mode" msgstr "" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "" diff --git a/safeeyes/config/locale/cs/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/cs/LC_MESSAGES/safeeyes.po index b264b1c..f6ff4f0 100644 --- a/safeeyes/config/locale/cs/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/cs/LC_MESSAGES/safeeyes.po @@ -8,8 +8,8 @@ msgstr "" "POT-Creation-Date: \n" "PO-Revision-Date: 2018-01-29 06:30+0000\n" "Last-Translator: Pavel Borecki \n" -"Language-Team: Czech \n" +"Language-Team: Czech \n" "Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -273,6 +273,10 @@ msgstr "Přerušovat tato okna nehledě na jejich stav" msgid "Switch the interruptible windows to normal mode" msgstr "Přepnout nepřerušitelná okna do normálního režimu" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "Zdravotní statistiky" diff --git a/safeeyes/config/locale/da/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/da/LC_MESSAGES/safeeyes.po index d7a2991..ce7cf97 100644 --- a/safeeyes/config/locale/da/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/da/LC_MESSAGES/safeeyes.po @@ -270,6 +270,10 @@ msgstr "" msgid "Switch the interruptible windows to normal mode" msgstr "" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "" diff --git a/safeeyes/config/locale/de/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/de/LC_MESSAGES/safeeyes.po index c37e6a8..52c7ffd 100644 --- a/safeeyes/config/locale/de/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/de/LC_MESSAGES/safeeyes.po @@ -273,6 +273,10 @@ msgstr "Diese Fenster in jedem Fall unterbrechen" msgid "Switch the interruptible windows to normal mode" msgstr "Unterbrechbare Fenster in normalen Modus umschalten" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "Statistik Gesundheit" diff --git a/safeeyes/config/locale/en_US/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/en_US/LC_MESSAGES/safeeyes.po index cbfe81f..5fbc080 100644 --- a/safeeyes/config/locale/en_US/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/en_US/LC_MESSAGES/safeeyes.po @@ -273,6 +273,10 @@ msgstr "Interrupt these windows regardless of their state" msgid "Switch the interruptible windows to normal mode" msgstr "Switch the interruptible windows to normal mode" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "Do not disturb while on battery" + # plugin/healthstats msgid "Health Statistics" msgstr "Health Statistics" diff --git a/safeeyes/config/locale/es/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/es/LC_MESSAGES/safeeyes.po index a9f51fa..0233534 100644 --- a/safeeyes/config/locale/es/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/es/LC_MESSAGES/safeeyes.po @@ -272,6 +272,10 @@ msgstr "" msgid "Switch the interruptible windows to normal mode" msgstr "" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "Estadísticas de salud" diff --git a/safeeyes/config/locale/et/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/et/LC_MESSAGES/safeeyes.po index 21a529c..dfd999f 100644 --- a/safeeyes/config/locale/et/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/et/LC_MESSAGES/safeeyes.po @@ -8,8 +8,8 @@ msgstr "" "POT-Creation-Date: \n" "PO-Revision-Date: 2018-02-03 07:53+0000\n" "Last-Translator: Kristjan Räts \n" -"Language-Team: Estonian \n" +"Language-Team: Estonian \n" "Language: et\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -272,6 +272,10 @@ msgstr "Nende akende puhul seisundit ei kontrollita" msgid "Switch the interruptible windows to normal mode" msgstr "Lülita katkestatavad aknad tavarežiimi" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "Statistika" diff --git a/safeeyes/config/locale/fa/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/fa/LC_MESSAGES/safeeyes.po index 604894a..3be97b0 100644 --- a/safeeyes/config/locale/fa/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/fa/LC_MESSAGES/safeeyes.po @@ -272,6 +272,10 @@ msgstr "" msgid "Switch the interruptible windows to normal mode" msgstr "" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "" diff --git a/safeeyes/config/locale/fr/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/fr/LC_MESSAGES/safeeyes.po index 206b3e3..84791b6 100644 --- a/safeeyes/config/locale/fr/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/fr/LC_MESSAGES/safeeyes.po @@ -8,8 +8,8 @@ msgstr "" "POT-Creation-Date: \n" "PO-Revision-Date: 2018-01-29 14:24+0000\n" "Last-Translator: French Coordinator OTF/LocLab \n" -"Language-Team: French \n" +"Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -276,6 +276,10 @@ msgstr "Interrompre ces fenêtres, quel que soit leur état" msgid "Switch the interruptible windows to normal mode" msgstr "Passer les fenêtres interruptibles en mode normal" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "Statistiques de santé" diff --git a/safeeyes/config/locale/hi/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/hi/LC_MESSAGES/safeeyes.po index 971cb01..eaa518b 100644 --- a/safeeyes/config/locale/hi/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/hi/LC_MESSAGES/safeeyes.po @@ -271,6 +271,10 @@ msgstr "" msgid "Switch the interruptible windows to normal mode" msgstr "" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "" diff --git a/safeeyes/config/locale/hu/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/hu/LC_MESSAGES/safeeyes.po index eced137..6ab0338 100644 --- a/safeeyes/config/locale/hu/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/hu/LC_MESSAGES/safeeyes.po @@ -271,6 +271,10 @@ msgstr "Szakítsd meg ezeket az ablakokat az állapotuktól függetlenül" msgid "Switch the interruptible windows to normal mode" msgstr "A megszakítható ablakokat váltsd át normál módba" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "Egészség Statisztikák" diff --git a/safeeyes/config/locale/id/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/id/LC_MESSAGES/safeeyes.po index 8266ef2..6f3fa9f 100644 --- a/safeeyes/config/locale/id/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/id/LC_MESSAGES/safeeyes.po @@ -269,6 +269,10 @@ msgstr "" msgid "Switch the interruptible windows to normal mode" msgstr "" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "" diff --git a/safeeyes/config/locale/it/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/it/LC_MESSAGES/safeeyes.po index 79aa58d..d3f1682 100644 --- a/safeeyes/config/locale/it/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/it/LC_MESSAGES/safeeyes.po @@ -8,8 +8,8 @@ msgstr "" "POT-Creation-Date: \n" "PO-Revision-Date: 2018-02-01 00:38+0000\n" "Last-Translator: Guglielmo Wilmup \n" -"Language-Team: Italian \n" +"Language-Team: Italian \n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -276,6 +276,10 @@ msgstr "Interrompe le finestre in oggetto in base al loro stato" msgid "Switch the interruptible windows to normal mode" msgstr "Passa le finestre interrompibili a modalità normale" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "Statistiche" diff --git a/safeeyes/config/locale/lt/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/lt/LC_MESSAGES/safeeyes.po index d8fea21..752c9de 100644 --- a/safeeyes/config/locale/lt/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/lt/LC_MESSAGES/safeeyes.po @@ -8,8 +8,8 @@ msgstr "" "POT-Creation-Date: \n" "PO-Revision-Date: 2018-03-06 00:52+0000\n" "Last-Translator: Moo \n" -"Language-Team: Lithuanian \n" +"Language-Team: Lithuanian \n" "Language: lt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -275,6 +275,10 @@ msgstr "Pertraukti šiuos langus nepriklausomai nuo jų būsenos" msgid "Switch the interruptible windows to normal mode" msgstr "Perjungti nepertraukiamus langus į normalią veikseną" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "Sveikatos statistika" diff --git a/safeeyes/config/locale/mk/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/mk/LC_MESSAGES/safeeyes.po index 0c6f75c..64e7123 100644 --- a/safeeyes/config/locale/mk/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/mk/LC_MESSAGES/safeeyes.po @@ -272,6 +272,10 @@ msgstr "" msgid "Switch the interruptible windows to normal mode" msgstr "" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "" diff --git a/safeeyes/config/locale/nb/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/nb/LC_MESSAGES/safeeyes.po index ad9a39d..4f61623 100644 --- a/safeeyes/config/locale/nb/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/nb/LC_MESSAGES/safeeyes.po @@ -8,8 +8,8 @@ msgstr "" "POT-Creation-Date: \n" "PO-Revision-Date: 2018-05-14 19:53+0000\n" "Last-Translator: Håkon Solbjørg \n" -"Language-Team: Norwegian Bokmål \n" +"Language-Team: Norwegian Bokmål \n" "Language: nb\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -270,6 +270,10 @@ msgstr "Forstyrr disse vinduene uavhengig av tilstand" msgid "Switch the interruptible windows to normal mode" msgstr "Bytt avbruddsfritt vindu til normalt modus" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "Helsestatistikk" diff --git a/safeeyes/config/locale/nl/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/nl/LC_MESSAGES/safeeyes.po index 4c9e3d2..7fb5543 100644 --- a/safeeyes/config/locale/nl/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/nl/LC_MESSAGES/safeeyes.po @@ -8,8 +8,8 @@ msgstr "" "POT-Creation-Date: \n" "PO-Revision-Date: 2018-01-29 09:57+0000\n" "Last-Translator: Heimen Stoffels \n" -"Language-Team: Dutch \n" +"Language-Team: Dutch \n" "Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -276,6 +276,10 @@ msgstr "Deze vensters storen, ongeacht hun status" msgid "Switch the interruptible windows to normal mode" msgstr "Stoorbare vensters overschakelen naar normale modus" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "Gezondheidsstatistieken" diff --git a/safeeyes/config/locale/pl/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/pl/LC_MESSAGES/safeeyes.po index 3ceb158..0058e4f 100644 --- a/safeeyes/config/locale/pl/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/pl/LC_MESSAGES/safeeyes.po @@ -273,6 +273,10 @@ msgstr "Przerywaj okna niezależnie od ich stanu" msgid "Switch the interruptible windows to normal mode" msgstr "Przełącz przerwane okna do trybu normalnego" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "Statystyki Zdrowotne" diff --git a/safeeyes/config/locale/pt/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/pt/LC_MESSAGES/safeeyes.po index 4a15c40..07e2ef4 100644 --- a/safeeyes/config/locale/pt/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/pt/LC_MESSAGES/safeeyes.po @@ -275,6 +275,10 @@ msgstr "Interrompa essas janelas, independentemente do seu estado" msgid "Switch the interruptible windows to normal mode" msgstr "Mude as janelas interruptíveis para o modo normal" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "Estatísticas de saúde" diff --git a/safeeyes/config/locale/ru/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/ru/LC_MESSAGES/safeeyes.po index 8db57cf..7f34bc0 100644 --- a/safeeyes/config/locale/ru/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/ru/LC_MESSAGES/safeeyes.po @@ -8,14 +8,14 @@ msgstr "" "POT-Creation-Date: \n" "PO-Revision-Date: 2018-02-15 09:11+0000\n" "Last-Translator: Paul \n" -"Language-Team: Russian \n" +"Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=" -"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 2.19-dev\n" # Short break @@ -271,6 +271,10 @@ msgstr "Прерывать эти окна независимо от их сос msgid "Switch the interruptible windows to normal mode" msgstr "Преключать прерываемые окна в нормальный режим" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "Статистика здоровья" diff --git a/safeeyes/config/locale/safeeyes.pot b/safeeyes/config/locale/safeeyes.pot index 755e70b..3256b13 100644 --- a/safeeyes/config/locale/safeeyes.pot +++ b/safeeyes/config/locale/safeeyes.pot @@ -258,6 +258,10 @@ msgstr "" msgid "Switch the interruptible windows to normal mode" msgstr "" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "" diff --git a/safeeyes/config/locale/sk/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/sk/LC_MESSAGES/safeeyes.po index b46417d..497ef88 100644 --- a/safeeyes/config/locale/sk/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/sk/LC_MESSAGES/safeeyes.po @@ -8,8 +8,8 @@ msgstr "" "POT-Creation-Date: \n" "PO-Revision-Date: 2018-01-31 20:18+0000\n" "Last-Translator: Radek Sprta \n" -"Language-Team: Slovak \n" +"Language-Team: Slovak \n" "Language: sk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -272,6 +272,10 @@ msgstr "Vždy prerušuj tieto okná" msgid "Switch the interruptible windows to normal mode" msgstr "Přepnút prerušiteľné okná do normálu" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "Zdravotné štatistiky" diff --git a/safeeyes/config/locale/sv/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/sv/LC_MESSAGES/safeeyes.po index 12af67b..ad253f3 100644 --- a/safeeyes/config/locale/sv/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/sv/LC_MESSAGES/safeeyes.po @@ -269,6 +269,10 @@ msgstr "" msgid "Switch the interruptible windows to normal mode" msgstr "" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "" diff --git a/safeeyes/config/locale/ta/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/ta/LC_MESSAGES/safeeyes.po index 3bd6760..b2db834 100644 --- a/safeeyes/config/locale/ta/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/ta/LC_MESSAGES/safeeyes.po @@ -275,6 +275,10 @@ msgstr "இந்த சாளரங்களின் நிலையை பொ msgid "Switch the interruptible windows to normal mode" msgstr "குறுக்கீடு செய்யும் போது சாளரங்களை சாதாரண நிலைக்கு மாற்றுக" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "மின்கலத்தில் இயங்கும் போது குறுக்கீடு செய்ய வேண்டாம்" + # plugin/healthstats msgid "Health Statistics" msgstr "ஆரோக்கிய புள்ளிவிவரங்கள்" diff --git a/safeeyes/config/locale/tr/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/tr/LC_MESSAGES/safeeyes.po index e2a7fe4..1446866 100644 --- a/safeeyes/config/locale/tr/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/tr/LC_MESSAGES/safeeyes.po @@ -8,8 +8,8 @@ msgstr "" "POT-Creation-Date: \n" "PO-Revision-Date: 2018-01-31 17:50+0000\n" "Last-Translator: Koray Biçer \n" -"Language-Team: Turkish \n" +"Language-Team: Turkish \n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -273,6 +273,10 @@ msgstr "Bu pencerelerin durumuna bakmaksızın engelle" msgid "Switch the interruptible windows to normal mode" msgstr "Engellenebilir pencereleri normal kipe geçir" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "Sağlık İstatistikleri" diff --git a/safeeyes/config/locale/ug/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/ug/LC_MESSAGES/safeeyes.po index 2d7e621..2403378 100644 --- a/safeeyes/config/locale/ug/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/ug/LC_MESSAGES/safeeyes.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: \n" "PO-Revision-Date: \n" +"Last-Translator: \n" "Language-Team: \n" +"Language: ug\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.8.7.1\n" -"Last-Translator: \n" "Plural-Forms: nplurals=1; plural=0;\n" -"Language: ug\n" # Short break msgid "Tightly close your eyes" @@ -269,6 +269,10 @@ msgstr "" msgid "Switch the interruptible windows to normal mode" msgstr "" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "" diff --git a/safeeyes/config/locale/uk/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/uk/LC_MESSAGES/safeeyes.po index 1c7448d..3f867d9 100644 --- a/safeeyes/config/locale/uk/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/uk/LC_MESSAGES/safeeyes.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=" -"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 2.20-dev\n" # Short break @@ -228,7 +228,8 @@ msgstr "Будь ласка, встановіть засіб командног # Settings dialog msgid "Please add the resource %(resource)s to %(config_resource)s directory" -msgstr "Будь ласка, додайте ресурс %(resource)s до каталогу %(config_resource)s" +msgstr "" +"Будь ласка, додайте ресурс %(resource)s до каталогу %(config_resource)s" # Settings dialog msgid "New Break" @@ -275,6 +276,10 @@ msgstr "Переривати ці вікна незалежно від їх ст msgid "Switch the interruptible windows to normal mode" msgstr "Перемикати ці недоступні для переривання вікна в нормальний режим" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "Статистика здоров'я" diff --git a/safeeyes/config/locale/vi/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/vi/LC_MESSAGES/safeeyes.po index 9391cbb..ab15e46 100644 --- a/safeeyes/config/locale/vi/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/vi/LC_MESSAGES/safeeyes.po @@ -274,6 +274,10 @@ msgstr "Tạm ngắt những cửa sổ này bất kể trạng thái của nó" msgid "Switch the interruptible windows to normal mode" msgstr "Chuyển các cửa sổ có thể ngắt được sang chế độ bình thường" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "Thống kê sức khoẻ" diff --git a/safeeyes/config/locale/zh_CN/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/zh_CN/LC_MESSAGES/safeeyes.po index 34595de..3000286 100644 --- a/safeeyes/config/locale/zh_CN/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/zh_CN/LC_MESSAGES/safeeyes.po @@ -272,6 +272,10 @@ msgstr "中断这些窗口无视其状态" msgid "Switch the interruptible windows to normal mode" msgstr "将可中断窗口切换到正常模式" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "健康统计" diff --git a/safeeyes/config/locale/zh_TW/LC_MESSAGES/safeeyes.po b/safeeyes/config/locale/zh_TW/LC_MESSAGES/safeeyes.po index c8993b5..1fc2b52 100644 --- a/safeeyes/config/locale/zh_TW/LC_MESSAGES/safeeyes.po +++ b/safeeyes/config/locale/zh_TW/LC_MESSAGES/safeeyes.po @@ -270,6 +270,10 @@ msgstr "" msgid "Switch the interruptible windows to normal mode" msgstr "" +# plugin/donotdisturb +msgid "Do not disturb while on battery" +msgstr "" + # plugin/healthstats msgid "Health Statistics" msgstr "" diff --git a/safeeyes/config/safeeyes.json b/safeeyes/config/safeeyes.json index 7feb1a8..975b440 100644 --- a/safeeyes/config/safeeyes.json +++ b/safeeyes/config/safeeyes.json @@ -50,11 +50,12 @@ { "id": "donotdisturb", "enabled": true, - "version": "0.0.1", + "version": "0.0.2", "settings": { "skip_break_windows": "", "take_break_windows": "", - "unfullscreen": true + "unfullscreen": true, + "while_on_battery": false } }, { diff --git a/safeeyes/plugins/donotdisturb/config.json b/safeeyes/plugins/donotdisturb/config.json index 94e5166..9ffa1cf 100644 --- a/safeeyes/plugins/donotdisturb/config.json +++ b/safeeyes/plugins/donotdisturb/config.json @@ -2,7 +2,7 @@ "meta": { "name": "Do Not Disturb", "description": "Skip break if the active window is in fullscreen mode", - "version": "0.0.1" + "version": "0.0.2" }, "dependencies": { "python_modules": [], @@ -28,6 +28,12 @@ "label": "Switch the interruptible windows to normal mode", "type": "BOOL", "default": true + }, + { + "id": "while_on_battery", + "label": "Do not disturb while on battery", + "type": "BOOL", + "default": false } ], "break_override_allowed": true diff --git a/safeeyes/plugins/donotdisturb/plugin.py b/safeeyes/plugins/donotdisturb/plugin.py index b00ebfe..7b0c009 100644 --- a/safeeyes/plugins/donotdisturb/plugin.py +++ b/safeeyes/plugins/donotdisturb/plugin.py @@ -21,6 +21,7 @@ Skip Fullscreen plugin skips the break if the active window is fullscreen. NOTE: Do not remove the unused import 'GdkX11' becuase it is required in Ubuntu 14.04 """ +import os import logging import re import subprocess @@ -39,7 +40,7 @@ unfullscreen_allowed = True def is_active_window_skipped(pre_break): """ Check for full-screen applications. - This method must be executed by the main thread. If not, it will cause to random failure. + This method must be executed by the main thread. If not, it will cause random failure. """ logging.info('Searching for full-screen application') screen = Gdk.Screen.get_default() @@ -47,7 +48,8 @@ def is_active_window_skipped(pre_break): active_window = screen.get_active_window() if active_window: active_xid = str(active_window.get_xid()) - cmdlist = ['xprop', '-root', '-notype', '-id', active_xid, 'WM_CLASS', '_NET_WM_STATE'] + cmdlist = ['xprop', '-root', '-notype', '-id', + active_xid, 'WM_CLASS', '_NET_WM_STATE'] try: stdout = subprocess.check_output(cmdlist).decode('utf-8') @@ -67,7 +69,8 @@ def is_active_window_skipped(pre_break): try: active_window.unfullscreen() except BaseException: - logging.error('Error in unfullscreen the window ' + process) + logging.error( + 'Error in unfullscreen the window ' + process) return False return is_fullscreen @@ -75,25 +78,59 @@ def is_active_window_skipped(pre_break): return False +def is_on_battery(): + """ + Check if the computer is running on battery. + """ + charging = True + available_power_sources = os.listdir('/sys/class/power_supply') + for power_source in available_power_sources: + if 'BAT' in power_source: + # Found battery + battery_status = os.path.join( + '/sys/class/power_supply', power_source, 'status') + if os.path.isfile(battery_status): + # Additional check to confirm that the status file exists + try: + with open(battery_status, 'r') as status_file: + status = status_file.read() + if status: + charging = 'charging' in status.lower() + except BaseException: + logging.error('Failed to read %s' % battery_status) + break + return not charging + + def init(ctx, safeeyes_config, plugin_config): global context global skip_break_window_classes global take_break_window_classes global unfullscreen_allowed + global dnd_while_on_battery logging.debug('Initialize Skip Fullscreen plugin') context = ctx skip_break_window_classes = plugin_config['skip_break_windows'].split() take_break_window_classes = plugin_config['take_break_windows'].split() unfullscreen_allowed = plugin_config['unfullscreen'] + dnd_while_on_battery = plugin_config['while_on_battery'] def on_pre_break(break_obj): """ + Lifecycle method executes before the pre-break period. """ - return is_active_window_skipped(True) + skip_break = is_active_window_skipped(True) + if dnd_while_on_battery and not skip_break: + skip_break = is_on_battery() + return skip_break def on_start_break(break_obj): """ + Lifecycle method executes just before the break. """ - return is_active_window_skipped(False) + skip_break = is_active_window_skipped(False) + if dnd_while_on_battery and not skip_break: + skip_break = is_on_battery() + return skip_break