From 3686a143f9fb5c4ca7d2e60f8a340d16e9c9ef39 Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 14 Dec 2022 14:07:16 +0700 Subject: [PATCH 1/3] new file: superblock/lang/C/messages.po new file: superblock/lang/ar/messages.po new file: superblock/lang/ar/strings.php new file: superblock/lang/ca/strings.php new file: superblock/lang/cs/messages.po new file: superblock/lang/cs/strings.php new file: superblock/lang/da-dk/messages.po new file: superblock/lang/da-dk/strings.php new file: superblock/lang/de/messages.po new file: superblock/lang/de/strings.php new file: superblock/lang/en-gb/messages.po new file: superblock/lang/en-gb/strings.php new file: superblock/lang/en-us/messages.po new file: superblock/lang/en-us/strings.php new file: superblock/lang/eo/strings.php new file: superblock/lang/es/messages.po new file: superblock/lang/es/strings.php new file: superblock/lang/fi-fi/messages.po new file: superblock/lang/fi-fi/strings.php new file: superblock/lang/fr/messages.po new file: superblock/lang/fr/strings.php new file: superblock/lang/hu/messages.po new file: superblock/lang/hu/strings.php new file: superblock/lang/is/strings.php new file: superblock/lang/it/messages.po new file: superblock/lang/it/strings.php new file: superblock/lang/nb-no/strings.php new file: superblock/lang/nl/messages.po new file: superblock/lang/nl/strings.php new file: superblock/lang/pl/messages.po new file: superblock/lang/pl/strings.php new file: superblock/lang/pt-br/messages.po new file: superblock/lang/pt-br/strings.php new file: superblock/lang/ro/messages.po new file: superblock/lang/ro/strings.php new file: superblock/lang/ru/messages.po new file: superblock/lang/ru/strings.php new file: superblock/lang/sv/messages.po new file: superblock/lang/sv/strings.php new file: superblock/lang/zh-cn/strings.php new file: superblock/superblock.php new file: superblock/templates/settings.tpl --- superblock/lang/C/messages.po | 30 ++++++ superblock/lang/ar/messages.po | 36 +++++++ superblock/lang/ar/strings.php | 11 +++ superblock/lang/ca/strings.php | 10 ++ superblock/lang/cs/messages.po | 46 +++++++++ superblock/lang/cs/strings.php | 13 +++ superblock/lang/da-dk/messages.po | 32 ++++++ superblock/lang/da-dk/strings.php | 10 ++ superblock/lang/de/messages.po | 35 +++++++ superblock/lang/de/strings.php | 10 ++ superblock/lang/en-gb/messages.po | 45 +++++++++ superblock/lang/en-gb/strings.php | 13 +++ superblock/lang/en-us/messages.po | 44 +++++++++ superblock/lang/en-us/strings.php | 8 ++ superblock/lang/eo/strings.php | 10 ++ superblock/lang/es/messages.po | 38 ++++++++ superblock/lang/es/strings.php | 11 +++ superblock/lang/fi-fi/messages.po | 45 +++++++++ superblock/lang/fi-fi/strings.php | 13 +++ superblock/lang/fr/messages.po | 33 +++++++ superblock/lang/fr/strings.php | 9 ++ superblock/lang/hu/messages.po | 32 ++++++ superblock/lang/hu/strings.php | 10 ++ superblock/lang/is/strings.php | 10 ++ superblock/lang/it/messages.po | 44 +++++++++ superblock/lang/it/strings.php | 13 +++ superblock/lang/nb-no/strings.php | 10 ++ superblock/lang/nl/messages.po | 44 +++++++++ superblock/lang/nl/strings.php | 11 +++ superblock/lang/pl/messages.po | 33 +++++++ superblock/lang/pl/strings.php | 10 ++ superblock/lang/pt-br/messages.po | 53 ++++++++++ superblock/lang/pt-br/strings.php | 15 +++ superblock/lang/ro/messages.po | 43 ++++++++ superblock/lang/ro/strings.php | 13 +++ superblock/lang/ru/messages.po | 44 +++++++++ superblock/lang/ru/strings.php | 13 +++ superblock/lang/sv/messages.po | 31 ++++++ superblock/lang/sv/strings.php | 7 ++ superblock/lang/zh-cn/strings.php | 10 ++ superblock/superblock.php | 156 ++++++++++++++++++++++++++++++ superblock/templates/settings.tpl | 1 + 42 files changed, 1105 insertions(+) create mode 100644 superblock/lang/C/messages.po create mode 100644 superblock/lang/ar/messages.po create mode 100644 superblock/lang/ar/strings.php create mode 100644 superblock/lang/ca/strings.php create mode 100644 superblock/lang/cs/messages.po create mode 100644 superblock/lang/cs/strings.php create mode 100644 superblock/lang/da-dk/messages.po create mode 100644 superblock/lang/da-dk/strings.php create mode 100644 superblock/lang/de/messages.po create mode 100644 superblock/lang/de/strings.php create mode 100644 superblock/lang/en-gb/messages.po create mode 100644 superblock/lang/en-gb/strings.php create mode 100644 superblock/lang/en-us/messages.po create mode 100644 superblock/lang/en-us/strings.php create mode 100644 superblock/lang/eo/strings.php create mode 100644 superblock/lang/es/messages.po create mode 100644 superblock/lang/es/strings.php create mode 100644 superblock/lang/fi-fi/messages.po create mode 100644 superblock/lang/fi-fi/strings.php create mode 100644 superblock/lang/fr/messages.po create mode 100644 superblock/lang/fr/strings.php create mode 100644 superblock/lang/hu/messages.po create mode 100644 superblock/lang/hu/strings.php create mode 100644 superblock/lang/is/strings.php create mode 100644 superblock/lang/it/messages.po create mode 100644 superblock/lang/it/strings.php create mode 100644 superblock/lang/nb-no/strings.php create mode 100644 superblock/lang/nl/messages.po create mode 100644 superblock/lang/nl/strings.php create mode 100644 superblock/lang/pl/messages.po create mode 100644 superblock/lang/pl/strings.php create mode 100644 superblock/lang/pt-br/messages.po create mode 100644 superblock/lang/pt-br/strings.php create mode 100644 superblock/lang/ro/messages.po create mode 100644 superblock/lang/ro/strings.php create mode 100644 superblock/lang/ru/messages.po create mode 100644 superblock/lang/ru/strings.php create mode 100644 superblock/lang/sv/messages.po create mode 100644 superblock/lang/sv/strings.php create mode 100644 superblock/lang/zh-cn/strings.php create mode 100644 superblock/superblock.php create mode 100644 superblock/templates/settings.tpl diff --git a/superblock/lang/C/messages.po b/superblock/lang/C/messages.po new file mode 100644 index 0000000..6c09db6 --- /dev/null +++ b/superblock/lang/C/messages.po @@ -0,0 +1,30 @@ +# ADDON superblock +# Copyright (C) +# This file is distributed under the same license as the Friendica superblock addon package. +# +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:16-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: superblock.php:35 +msgid "Comma separated profile URLs to block" +msgstr "" + +#: superblock.php:40 +msgid "Superblock" +msgstr "" + +#: superblock.php:129 +msgid "Block Completely" +msgstr "" diff --git a/superblock/lang/ar/messages.po b/superblock/lang/ar/messages.po new file mode 100644 index 0000000..cdc8dcc --- /dev/null +++ b/superblock/lang/ar/messages.po @@ -0,0 +1,36 @@ +# ADDON superblock +# Copyright (C) +# This file is distributed under the same license as the Friendica superblock addon package. +# +# +# Translators: +# Farida Khalaf , 2021 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2021-02-20 05:33+0000\n" +"Last-Translator: Farida Khalaf \n" +"Language-Team: Arabic (http://www.transifex.com/Friendica/friendica/language/ar/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ar\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" + +#: superblock.php:38 superblock.php:42 +msgid "Superblock" +msgstr "حظر تام" + +#: superblock.php:45 +msgid "Comma separated profile URLS to block" +msgstr "عناوين URL للملف الشخصي مفصولة بفاصلة للحظر" + +#: superblock.php:49 +msgid "Save Settings" +msgstr "حفظ الإعدادات" + +#: superblock.php:138 +msgid "Block Completely" +msgstr "حظر كامل" diff --git a/superblock/lang/ar/strings.php b/superblock/lang/ar/strings.php new file mode 100644 index 0000000..e960610 --- /dev/null +++ b/superblock/lang/ar/strings.php @@ -0,0 +1,11 @@ +=3 && $n%100<=10) { return 3; } else if ($n%100>=11 && $n%100<=99) { return 4; } else { return 5; } +}} +$a->strings['Superblock'] = 'حظر تام'; +$a->strings['Comma separated profile URLS to block'] = 'عناوين URL للملف الشخصي مفصولة بفاصلة للحظر'; +$a->strings['Save Settings'] = 'حفظ الإعدادات'; +$a->strings['Block Completely'] = 'حظر كامل'; diff --git a/superblock/lang/ca/strings.php b/superblock/lang/ca/strings.php new file mode 100644 index 0000000..5587acd --- /dev/null +++ b/superblock/lang/ca/strings.php @@ -0,0 +1,10 @@ +strings["\"Blockem\" Settings"] = "Configuració de \"Bloqueig\""; +$a->strings["Comma separated profile URLS to block"] = "URLS dels perfils a bloquejar, separats per comes"; +$a->strings["Submit"] = "Enviar"; +$a->strings["BLOCKEM Settings saved."] = "Guardada la configuració de BLOQUEIG."; +$a->strings["Blocked %s - Click to open/close"] = "Bloquejar %s - Clica per obrir/tancar"; +$a->strings["Unblock Author"] = "Desbloquejar Autor"; +$a->strings["Block Author"] = "Bloquejar Autor"; +$a->strings["blockem settings updated"] = "Actualitzar la Configuració de bloqueig"; diff --git a/superblock/lang/cs/messages.po b/superblock/lang/cs/messages.po new file mode 100644 index 0000000..da74f38 --- /dev/null +++ b/superblock/lang/cs/messages.po @@ -0,0 +1,46 @@ +# ADDON superblock +# Copyright (C) +# This file is distributed under the same license as the Friendica superblock addon package. +# +# +# Translators: +# Aditoo, 2018 +# Aditoo, 2018 +# michal_s , 2014 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-08-17 10:25+0200\n" +"PO-Revision-Date: 2018-08-18 12:27+0000\n" +"Last-Translator: Aditoo\n" +"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: cs\n" +"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" + +#: superblock.php:47 superblock.php:51 +msgid "Superblock" +msgstr "Superblock" + +#: superblock.php:54 +msgid "Comma separated profile URLS to block" +msgstr "Čárkou oddělené URL adresy profilů určených k ignorování" + +#: superblock.php:58 +msgid "Save Settings" +msgstr "Uložit nastavení" + +#: superblock.php:71 +msgid "SUPERBLOCK Settings saved." +msgstr "Nastavení SUPERBLOCK uložena" + +#: superblock.php:144 +msgid "Block Completely" +msgstr "Zablokovat úplně" + +#: superblock.php:165 +msgid "superblock settings updated" +msgstr "nastavení superblock aktualizována" diff --git a/superblock/lang/cs/strings.php b/superblock/lang/cs/strings.php new file mode 100644 index 0000000..2d19a3c --- /dev/null +++ b/superblock/lang/cs/strings.php @@ -0,0 +1,13 @@ += 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; } +}} +$a->strings['Superblock'] = 'Superblock'; +$a->strings['Comma separated profile URLS to block'] = 'Čárkou oddělené URL adresy profilů určených k ignorování'; +$a->strings['Save Settings'] = 'Uložit nastavení'; +$a->strings['SUPERBLOCK Settings saved.'] = 'Nastavení SUPERBLOCK uložena'; +$a->strings['Block Completely'] = 'Zablokovat úplně'; +$a->strings['superblock settings updated'] = 'nastavení superblock aktualizována'; diff --git a/superblock/lang/da-dk/messages.po b/superblock/lang/da-dk/messages.po new file mode 100644 index 0000000..ecfa5b6 --- /dev/null +++ b/superblock/lang/da-dk/messages.po @@ -0,0 +1,32 @@ +# ADDON superblock +# Copyright (C) +# This file is distributed under the same license as the Friendica superblock addon package. +# +# +# Translators: +# Anton , 2022 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:16-0500\n" +"PO-Revision-Date: 2014-06-23 12:55+0000\n" +"Last-Translator: Anton , 2022\n" +"Language-Team: Danish (Denmark) (http://www.transifex.com/Friendica/friendica/language/da_DK/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: da_DK\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: superblock.php:35 +msgid "Comma separated profile URLs to block" +msgstr "Kommasepareret liste over profil-URL'er som skal blokeres" + +#: superblock.php:40 +msgid "Superblock" +msgstr "Superblokér" + +#: superblock.php:129 +msgid "Block Completely" +msgstr "Blokér fuldstændigt" diff --git a/superblock/lang/da-dk/strings.php b/superblock/lang/da-dk/strings.php new file mode 100644 index 0000000..6db2e7c --- /dev/null +++ b/superblock/lang/da-dk/strings.php @@ -0,0 +1,10 @@ +strings['Comma separated profile URLs to block'] = 'Kommasepareret liste over profil-URL\'er som skal blokeres'; +$a->strings['Superblock'] = 'Superblokér'; +$a->strings['Block Completely'] = 'Blokér fuldstændigt'; diff --git a/superblock/lang/de/messages.po b/superblock/lang/de/messages.po new file mode 100644 index 0000000..66c2505 --- /dev/null +++ b/superblock/lang/de/messages.po @@ -0,0 +1,35 @@ +# ADDON superblock +# Copyright (C) +# This file is distributed under the same license as the Friendica superblock addon package. +# +# +# Translators: +# Andreas H., 2018 +# Tobias Diekershoff , 2014-2015 +# Tobias Diekershoff , 2017-2018,2022 +# Ulf Rompe , 2019 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:16-0500\n" +"PO-Revision-Date: 2022-01-22 17:42+0000\n" +"Last-Translator: Tobias Diekershoff \n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: superblock.php:35 +msgid "Comma separated profile URLs to block" +msgstr "Profil-URLs, die geblockt werden sollen (durch Kommas getrennt)" + +#: superblock.php:40 +msgid "Superblock" +msgstr "Superblock" + +#: superblock.php:129 +msgid "Block Completely" +msgstr "Vollständig blockieren" diff --git a/superblock/lang/de/strings.php b/superblock/lang/de/strings.php new file mode 100644 index 0000000..13e7b9c --- /dev/null +++ b/superblock/lang/de/strings.php @@ -0,0 +1,10 @@ +strings['Comma separated profile URLs to block'] = 'Profil-URLs, die geblockt werden sollen (durch Kommas getrennt)'; +$a->strings['Superblock'] = 'Superblock'; +$a->strings['Block Completely'] = 'Vollständig blockieren'; diff --git a/superblock/lang/en-gb/messages.po b/superblock/lang/en-gb/messages.po new file mode 100644 index 0000000..473eea8 --- /dev/null +++ b/superblock/lang/en-gb/messages.po @@ -0,0 +1,45 @@ +# ADDON superblock +# Copyright (C) +# This file is distributed under the same license as the Friendica superblock addon package. +# +# +# Translators: +# Andy H3 , 2019 +# Kris, 2018 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-08-17 10:25+0200\n" +"PO-Revision-Date: 2019-06-05 14:43+0000\n" +"Last-Translator: Andy H3 \n" +"Language-Team: English (United Kingdom) (http://www.transifex.com/Friendica/friendica/language/en_GB/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en_GB\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: superblock.php:47 superblock.php:51 +msgid "Superblock" +msgstr "Superblock" + +#: superblock.php:54 +msgid "Comma separated profile URLS to block" +msgstr "Profile URLs to block (separated by commas)" + +#: superblock.php:58 +msgid "Save Settings" +msgstr "Save settings" + +#: superblock.php:71 +msgid "SUPERBLOCK Settings saved." +msgstr "Superblock settings saved." + +#: superblock.php:144 +msgid "Block Completely" +msgstr "Block completely" + +#: superblock.php:165 +msgid "superblock settings updated" +msgstr "Superblock settings updated" diff --git a/superblock/lang/en-gb/strings.php b/superblock/lang/en-gb/strings.php new file mode 100644 index 0000000..2d8d25d --- /dev/null +++ b/superblock/lang/en-gb/strings.php @@ -0,0 +1,13 @@ +strings['Superblock'] = 'Superblock'; +$a->strings['Comma separated profile URLS to block'] = 'Profile URLs to block (separated by commas)'; +$a->strings['Save Settings'] = 'Save settings'; +$a->strings['SUPERBLOCK Settings saved.'] = 'Superblock settings saved.'; +$a->strings['Block Completely'] = 'Block completely'; +$a->strings['superblock settings updated'] = 'Superblock settings updated'; diff --git a/superblock/lang/en-us/messages.po b/superblock/lang/en-us/messages.po new file mode 100644 index 0000000..c184cba --- /dev/null +++ b/superblock/lang/en-us/messages.po @@ -0,0 +1,44 @@ +# ADDON superblock +# Copyright (C) +# This file is distributed under the same license as the Friendica superblock addon package. +# +# +# Translators: +# R C , 2018 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-21 08:45+0200\n" +"PO-Revision-Date: 2018-06-13 02:39+0000\n" +"Last-Translator: R C \n" +"Language-Team: English (United States) (http://www.transifex.com/Friendica/friendica/language/en_US/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en_US\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: superblock.php:53 superblock.php:57 +msgid "\"Superblock\"" +msgstr "" + +#: superblock.php:60 +msgid "Comma separated profile URLS to block" +msgstr "Comma-separated profile URLs to block" + +#: superblock.php:64 +msgid "Save Settings" +msgstr "" + +#: superblock.php:76 +msgid "SUPERBLOCK Settings saved." +msgstr "" + +#: superblock.php:148 +msgid "Block Completely" +msgstr "" + +#: superblock.php:168 +msgid "superblock settings updated" +msgstr "" diff --git a/superblock/lang/en-us/strings.php b/superblock/lang/en-us/strings.php new file mode 100644 index 0000000..a4d22d8 --- /dev/null +++ b/superblock/lang/en-us/strings.php @@ -0,0 +1,8 @@ +strings['Comma separated profile URLS to block'] = 'Comma-separated profile URLs to block'; diff --git a/superblock/lang/eo/strings.php b/superblock/lang/eo/strings.php new file mode 100644 index 0000000..b611650 --- /dev/null +++ b/superblock/lang/eo/strings.php @@ -0,0 +1,10 @@ +strings["\"Blockem\" Settings"] = "\"Blockem\" Agordoj"; +$a->strings["Comma separated profile URLS to block"] = "Blokotaj URL adresoj, disigita per komo"; +$a->strings["Submit"] = "Sendi"; +$a->strings["BLOCKEM Settings saved."] = "Konservis Agordojn de BLOCKEM."; +$a->strings["Blocked %s - Click to open/close"] = "%s blokita - Klaku por malfermi/fermi"; +$a->strings["Unblock Author"] = "Malbloki Aŭtoron"; +$a->strings["Block Author"] = "Bloki Aŭtoron"; +$a->strings["blockem settings updated"] = "Ĝisdatigis la blockem agordojn"; diff --git a/superblock/lang/es/messages.po b/superblock/lang/es/messages.po new file mode 100644 index 0000000..555a945 --- /dev/null +++ b/superblock/lang/es/messages.po @@ -0,0 +1,38 @@ +# ADDON superblock +# Copyright (C) +# This file is distributed under the same license as the Friendica superblock addon package. +# +# +# Translators: +# Albert, 2016-2017 +# juanman , 2017 +# Senex Petrovic , 2021 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2021-04-06 02:09+0000\n" +"Last-Translator: Senex Petrovic \n" +"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: superblock.php:38 superblock.php:42 +msgid "Superblock" +msgstr "Soperbloquéo" + +#: superblock.php:45 +msgid "Comma separated profile URLS to block" +msgstr "Perfil de URLS a bloque separado por comas" + +#: superblock.php:49 +msgid "Save Settings" +msgstr "Guardar configuración" + +#: superblock.php:138 +msgid "Block Completely" +msgstr "Bloquear completamente" diff --git a/superblock/lang/es/strings.php b/superblock/lang/es/strings.php new file mode 100644 index 0000000..63c63e3 --- /dev/null +++ b/superblock/lang/es/strings.php @@ -0,0 +1,11 @@ +strings['Superblock'] = 'Soperbloquéo'; +$a->strings['Comma separated profile URLS to block'] = 'Perfil de URLS a bloque separado por comas'; +$a->strings['Save Settings'] = 'Guardar configuración'; +$a->strings['Block Completely'] = 'Bloquear completamente'; diff --git a/superblock/lang/fi-fi/messages.po b/superblock/lang/fi-fi/messages.po new file mode 100644 index 0000000..6b673e0 --- /dev/null +++ b/superblock/lang/fi-fi/messages.po @@ -0,0 +1,45 @@ +# ADDON superblock +# Copyright (C) +# This file is distributed under the same license as the Friendica superblock addon package. +# +# +# Translators: +# Kris, 2018 +# Kris, 2018 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-21 08:45+0200\n" +"PO-Revision-Date: 2018-04-16 16:00+0000\n" +"Last-Translator: Kris\n" +"Language-Team: Finnish (Finland) (http://www.transifex.com/Friendica/friendica/language/fi_FI/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fi_FI\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: superblock.php:53 superblock.php:57 +msgid "\"Superblock\"" +msgstr "\"Superblock\"" + +#: superblock.php:60 +msgid "Comma separated profile URLS to block" +msgstr "Estettävien profiilien URL-osoitteet pilkulla erotettuina" + +#: superblock.php:64 +msgid "Save Settings" +msgstr "Tallenna asetukset" + +#: superblock.php:76 +msgid "SUPERBLOCK Settings saved." +msgstr "Superblock -asetukset tallennettu." + +#: superblock.php:148 +msgid "Block Completely" +msgstr "Estä kokonaan" + +#: superblock.php:168 +msgid "superblock settings updated" +msgstr "superblock -asetukset päivitetty" diff --git a/superblock/lang/fi-fi/strings.php b/superblock/lang/fi-fi/strings.php new file mode 100644 index 0000000..289f33b --- /dev/null +++ b/superblock/lang/fi-fi/strings.php @@ -0,0 +1,13 @@ +strings['"Superblock"'] = '"Superblock"'; +$a->strings['Comma separated profile URLS to block'] = 'Estettävien profiilien URL-osoitteet pilkulla erotettuina'; +$a->strings['Save Settings'] = 'Tallenna asetukset'; +$a->strings['SUPERBLOCK Settings saved.'] = 'Superblock -asetukset tallennettu.'; +$a->strings['Block Completely'] = 'Estä kokonaan'; +$a->strings['superblock settings updated'] = 'superblock -asetukset päivitetty'; diff --git a/superblock/lang/fr/messages.po b/superblock/lang/fr/messages.po new file mode 100644 index 0000000..0c15b58 --- /dev/null +++ b/superblock/lang/fr/messages.po @@ -0,0 +1,33 @@ +# ADDON superblock +# Copyright (C) +# This file is distributed under the same license as the Friendica superblock addon package. +# +# +# Translators: +# ButterflyOfFire, 2020 +# Hypolite Petovan , 2022 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:16-0500\n" +"PO-Revision-Date: 2014-06-23 12:55+0000\n" +"Last-Translator: Hypolite Petovan , 2022\n" +"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" +"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" + +#: superblock.php:35 +msgid "Comma separated profile URLs to block" +msgstr "Liste d'URLs de profils à bloquer séparées par des virgules" + +#: superblock.php:40 +msgid "Superblock" +msgstr "" + +#: superblock.php:129 +msgid "Block Completely" +msgstr "Bloquer complètement" diff --git a/superblock/lang/fr/strings.php b/superblock/lang/fr/strings.php new file mode 100644 index 0000000..8360d3a --- /dev/null +++ b/superblock/lang/fr/strings.php @@ -0,0 +1,9 @@ +strings['Comma separated profile URLs to block'] = 'Liste d\'URLs de profils à bloquer séparées par des virgules'; +$a->strings['Block Completely'] = 'Bloquer complètement'; diff --git a/superblock/lang/hu/messages.po b/superblock/lang/hu/messages.po new file mode 100644 index 0000000..239bb76 --- /dev/null +++ b/superblock/lang/hu/messages.po @@ -0,0 +1,32 @@ +# ADDON superblock +# Copyright (C) +# This file is distributed under the same license as the Friendica superblock addon package. +# +# +# Translators: +# Balázs Úr, 2020-2021 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:16-0500\n" +"PO-Revision-Date: 2021-12-23 19:29+0000\n" +"Last-Translator: Balázs Úr\n" +"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: hu\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: superblock.php:35 +msgid "Comma separated profile URLs to block" +msgstr "Tiltandó profil URL-ek vesszővel elválasztott listája" + +#: superblock.php:40 +msgid "Superblock" +msgstr "Szuper tiltás" + +#: superblock.php:129 +msgid "Block Completely" +msgstr "Tiltás teljesen" diff --git a/superblock/lang/hu/strings.php b/superblock/lang/hu/strings.php new file mode 100644 index 0000000..19e364f --- /dev/null +++ b/superblock/lang/hu/strings.php @@ -0,0 +1,10 @@ +strings['Comma separated profile URLs to block'] = 'Tiltandó profil URL-ek vesszővel elválasztott listája'; +$a->strings['Superblock'] = 'Szuper tiltás'; +$a->strings['Block Completely'] = 'Tiltás teljesen'; diff --git a/superblock/lang/is/strings.php b/superblock/lang/is/strings.php new file mode 100644 index 0000000..3075c45 --- /dev/null +++ b/superblock/lang/is/strings.php @@ -0,0 +1,10 @@ +strings["\"Blockem\" Settings"] = "\"Blockem\" stillingar"; +$a->strings["Comma separated profile URLS to block"] = "Banna lista af forsíðum (komma á milli)"; +$a->strings["Submit"] = "Senda inn"; +$a->strings["BLOCKEM Settings saved."] = "BLOCKEM stillingar vistaðar."; +$a->strings["Blocked %s - Click to open/close"] = "%s sett í straff - Smella til að taka úr/setja á"; +$a->strings["Unblock Author"] = "Leyfa notanda"; +$a->strings["Block Author"] = "Banna notanda"; +$a->strings["blockem settings updated"] = ""; diff --git a/superblock/lang/it/messages.po b/superblock/lang/it/messages.po new file mode 100644 index 0000000..7ae6de2 --- /dev/null +++ b/superblock/lang/it/messages.po @@ -0,0 +1,44 @@ +# ADDON superblock +# Copyright (C) +# This file is distributed under the same license as the Friendica superblock addon package. +# +# +# Translators: +# fabrixxm , 2014-2015,2017,2019 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-08-17 10:25+0200\n" +"PO-Revision-Date: 2019-03-11 14:21+0000\n" +"Last-Translator: fabrixxm \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: superblock.php:47 superblock.php:51 +msgid "Superblock" +msgstr "Superblock" + +#: superblock.php:54 +msgid "Comma separated profile URLS to block" +msgstr "Lista, separata da virgola, di indirizzi di profili da bloccare" + +#: superblock.php:58 +msgid "Save Settings" +msgstr "Salva Impostazioni" + +#: superblock.php:71 +msgid "SUPERBLOCK Settings saved." +msgstr "Impostazioni \"Superblocco\" salvate." + +#: superblock.php:144 +msgid "Block Completely" +msgstr "Blocca Completamente" + +#: superblock.php:165 +msgid "superblock settings updated" +msgstr "impostazioni \"superblocco\" aggiornate." diff --git a/superblock/lang/it/strings.php b/superblock/lang/it/strings.php new file mode 100644 index 0000000..bd886d7 --- /dev/null +++ b/superblock/lang/it/strings.php @@ -0,0 +1,13 @@ +strings['Superblock'] = 'Superblock'; +$a->strings['Comma separated profile URLS to block'] = 'Lista, separata da virgola, di indirizzi di profili da bloccare'; +$a->strings['Save Settings'] = 'Salva Impostazioni'; +$a->strings['SUPERBLOCK Settings saved.'] = 'Impostazioni "Superblocco" salvate.'; +$a->strings['Block Completely'] = 'Blocca Completamente'; +$a->strings['superblock settings updated'] = 'impostazioni "superblocco" aggiornate.'; diff --git a/superblock/lang/nb-no/strings.php b/superblock/lang/nb-no/strings.php new file mode 100644 index 0000000..0dd6660 --- /dev/null +++ b/superblock/lang/nb-no/strings.php @@ -0,0 +1,10 @@ +strings["\"Blockem\" Settings"] = ""; +$a->strings["Comma separated profile URLS to block"] = ""; +$a->strings["Submit"] = "Lagre"; +$a->strings["BLOCKEM Settings saved."] = ""; +$a->strings["Blocked %s - Click to open/close"] = ""; +$a->strings["Unblock Author"] = ""; +$a->strings["Block Author"] = ""; +$a->strings["blockem settings updated"] = ""; diff --git a/superblock/lang/nl/messages.po b/superblock/lang/nl/messages.po new file mode 100644 index 0000000..4f19d88 --- /dev/null +++ b/superblock/lang/nl/messages.po @@ -0,0 +1,44 @@ +# ADDON superblock +# Copyright (C) +# This file is distributed under the same license as the Friendica superblock addon package. +# +# +# Translators: +# Jeroen De Meerleer , 2018 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-08-17 10:25+0200\n" +"PO-Revision-Date: 2018-08-24 13:51+0000\n" +"Last-Translator: Jeroen De Meerleer \n" +"Language-Team: Dutch (http://www.transifex.com/Friendica/friendica/language/nl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: superblock.php:47 superblock.php:51 +msgid "Superblock" +msgstr "Superblock" + +#: superblock.php:54 +msgid "Comma separated profile URLS to block" +msgstr "" + +#: superblock.php:58 +msgid "Save Settings" +msgstr "Instellingen opslaan" + +#: superblock.php:71 +msgid "SUPERBLOCK Settings saved." +msgstr "SUPERBLOCK instellingen opgeslagen" + +#: superblock.php:144 +msgid "Block Completely" +msgstr "" + +#: superblock.php:165 +msgid "superblock settings updated" +msgstr "Superblock instellingen opgeslagen" diff --git a/superblock/lang/nl/strings.php b/superblock/lang/nl/strings.php new file mode 100644 index 0000000..fa857a9 --- /dev/null +++ b/superblock/lang/nl/strings.php @@ -0,0 +1,11 @@ +strings['Superblock'] = 'Superblock'; +$a->strings['Save Settings'] = 'Instellingen opslaan'; +$a->strings['SUPERBLOCK Settings saved.'] = 'SUPERBLOCK instellingen opgeslagen'; +$a->strings['superblock settings updated'] = 'Superblock instellingen opgeslagen'; diff --git a/superblock/lang/pl/messages.po b/superblock/lang/pl/messages.po new file mode 100644 index 0000000..5c85c98 --- /dev/null +++ b/superblock/lang/pl/messages.po @@ -0,0 +1,33 @@ +# ADDON superblock +# Copyright (C) +# This file is distributed under the same license as the Friendica superblock addon package. +# +# +# Translators: +# Piotr Strębski , 2022 +# Waldemar Stoczkowski, 2018 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:16-0500\n" +"PO-Revision-Date: 2014-06-23 12:55+0000\n" +"Last-Translator: Piotr Strębski , 2022\n" +"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pl\n" +"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" + +#: superblock.php:35 +msgid "Comma separated profile URLs to block" +msgstr "Oddzielone przecinkami adresy URL profilów do zablokowania" + +#: superblock.php:40 +msgid "Superblock" +msgstr "Superblock" + +#: superblock.php:129 +msgid "Block Completely" +msgstr "Całkowicie zablokuj" diff --git a/superblock/lang/pl/strings.php b/superblock/lang/pl/strings.php new file mode 100644 index 0000000..2a463bd --- /dev/null +++ b/superblock/lang/pl/strings.php @@ -0,0 +1,10 @@ +=2 && $n%10<=4) && ($n%100<12 || $n%100>14)) { return 1; } else if ($n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14)) { return 2; } else { return 3; } +}} +$a->strings['Comma separated profile URLs to block'] = 'Oddzielone przecinkami adresy URL profilów do zablokowania'; +$a->strings['Superblock'] = 'Superblock'; +$a->strings['Block Completely'] = 'Całkowicie zablokuj'; diff --git a/superblock/lang/pt-br/messages.po b/superblock/lang/pt-br/messages.po new file mode 100644 index 0000000..578f62b --- /dev/null +++ b/superblock/lang/pt-br/messages.po @@ -0,0 +1,53 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# Beatriz Vital , 2016 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-02-27 05:01-0500\n" +"PO-Revision-Date: 2016-08-16 12:51+0000\n" +"Last-Translator: Beatriz Vital \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/Friendica/friendica/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: blockem.php:51 +msgid "\"Blockem\" Settings" +msgstr "Configurações do \"Blockem\"" + +#: blockem.php:53 +msgid "Comma separated profile URLS to block" +msgstr "URLs de perfis a serem bloqueados, separados por vírgulas" + +#: blockem.php:57 +msgid "Submit" +msgstr "Enviar" + +#: blockem.php:70 +msgid "BLOCKEM Settings saved." +msgstr "As configurações do Blockem foram salvas." + +#: blockem.php:105 +#, php-format +msgid "Blocked %s - Click to open/close" +msgstr "Bloqueou %s - Clique para abrir/fechar" + +#: blockem.php:160 +msgid "Unblock Author" +msgstr "Desbloquear autor" + +#: blockem.php:162 +msgid "Block Author" +msgstr "Bloquear autor" + +#: blockem.php:194 +msgid "blockem settings updated" +msgstr "As configurações do Blockem foram atualizadas." diff --git a/superblock/lang/pt-br/strings.php b/superblock/lang/pt-br/strings.php new file mode 100644 index 0000000..71cfc76 --- /dev/null +++ b/superblock/lang/pt-br/strings.php @@ -0,0 +1,15 @@ + 1); +}} +$a->strings['"Blockem" Settings'] = 'Configurações do "Blockem"'; +$a->strings['Comma separated profile URLS to block'] = 'URLs de perfis a serem bloqueados, separados por vírgulas'; +$a->strings['Submit'] = 'Enviar'; +$a->strings['BLOCKEM Settings saved.'] = 'As configurações do Blockem foram salvas.'; +$a->strings['Blocked %s - Click to open/close'] = 'Bloqueou %s - Clique para abrir/fechar'; +$a->strings['Unblock Author'] = 'Desbloquear autor'; +$a->strings['Block Author'] = 'Bloquear autor'; +$a->strings['blockem settings updated'] = 'As configurações do Blockem foram atualizadas.'; diff --git a/superblock/lang/ro/messages.po b/superblock/lang/ro/messages.po new file mode 100644 index 0000000..1959c7d --- /dev/null +++ b/superblock/lang/ro/messages.po @@ -0,0 +1,43 @@ +# ADDON superblock +# Copyright (C) +# This file is distributed under the same license as the Friendica superblock addon package. +# +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-06-23 14:45+0200\n" +"PO-Revision-Date: 2014-07-08 12:08+0000\n" +"Last-Translator: Arian - Cazare Muncitori \n" +"Language-Team: Romanian (Romania) (http://www.transifex.com/projects/p/friendica/language/ro_RO/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ro_RO\n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" + +#: superblock.php:52 +msgid "\"Superblock\" Settings" +msgstr "Configurări \"Superblock\"" + +#: superblock.php:54 +msgid "Comma separated profile URLS to block" +msgstr "Adresele URL de profil, de blocat, separate prin virgulă" + +#: superblock.php:58 +msgid "Save Settings" +msgstr "Salvare Configurări" + +#: superblock.php:71 +msgid "SUPERBLOCK Settings saved." +msgstr "Configurările SUPERBLOCK au fost salvate." + +#: superblock.php:143 +msgid "Block Completely" +msgstr "Blocare Completă" + +#: superblock.php:163 +msgid "superblock settings updated" +msgstr "Configurările superblock au fost actualizate" diff --git a/superblock/lang/ro/strings.php b/superblock/lang/ro/strings.php new file mode 100644 index 0000000..d6c2223 --- /dev/null +++ b/superblock/lang/ro/strings.php @@ -0,0 +1,13 @@ +19)||(($n%100==0)&&($n!=0)))) { return 2; } else { return 1; } +}} +$a->strings['"Superblock" Settings'] = 'Configurări "Superblock"'; +$a->strings['Comma separated profile URLS to block'] = 'Adresele URL de profil, de blocat, separate prin virgulă'; +$a->strings['Save Settings'] = 'Salvare Configurări'; +$a->strings['SUPERBLOCK Settings saved.'] = 'Configurările SUPERBLOCK au fost salvate.'; +$a->strings['Block Completely'] = 'Blocare Completă'; +$a->strings['superblock settings updated'] = 'Configurările superblock au fost actualizate'; diff --git a/superblock/lang/ru/messages.po b/superblock/lang/ru/messages.po new file mode 100644 index 0000000..c57686b --- /dev/null +++ b/superblock/lang/ru/messages.po @@ -0,0 +1,44 @@ +# ADDON superblock +# Copyright (C) +# This file is distributed under the same license as the Friendica superblock addon package. +# +# +# Translators: +# Alexander An , 2020 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-08-17 10:25+0200\n" +"PO-Revision-Date: 2020-04-23 14:10+0000\n" +"Last-Translator: Alexander An \n" +"Language-Team: Russian (http://www.transifex.com/Friendica/friendica/language/ru/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ru\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" + +#: superblock.php:47 superblock.php:51 +msgid "Superblock" +msgstr "Superblock" + +#: superblock.php:54 +msgid "Comma separated profile URLS to block" +msgstr "Ссылки на блокируемые профили через запятую" + +#: superblock.php:58 +msgid "Save Settings" +msgstr "Сохранить настройки" + +#: superblock.php:71 +msgid "SUPERBLOCK Settings saved." +msgstr "Настройки Superblock сохранены" + +#: superblock.php:144 +msgid "Block Completely" +msgstr "Заблокировать совсем" + +#: superblock.php:165 +msgid "superblock settings updated" +msgstr "настройки superblock обновлены" diff --git a/superblock/lang/ru/strings.php b/superblock/lang/ru/strings.php new file mode 100644 index 0000000..03b9a65 --- /dev/null +++ b/superblock/lang/ru/strings.php @@ -0,0 +1,13 @@ +=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; } +}} +$a->strings['Superblock'] = 'Superblock'; +$a->strings['Comma separated profile URLS to block'] = 'Ссылки на блокируемые профили через запятую'; +$a->strings['Save Settings'] = 'Сохранить настройки'; +$a->strings['SUPERBLOCK Settings saved.'] = 'Настройки Superblock сохранены'; +$a->strings['Block Completely'] = 'Заблокировать совсем'; +$a->strings['superblock settings updated'] = 'настройки superblock обновлены'; diff --git a/superblock/lang/sv/messages.po b/superblock/lang/sv/messages.po new file mode 100644 index 0000000..68e8184 --- /dev/null +++ b/superblock/lang/sv/messages.po @@ -0,0 +1,31 @@ +# ADDON superblock +# Copyright (C) +# This file is distributed under the same license as the Friendica superblock addon package. +# +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:16-0500\n" +"PO-Revision-Date: 2021-12-22 16:24+0000\n" +"Last-Translator: Transifex Bot <>\n" +"Language-Team: Swedish (http://www.transifex.com/Friendica/friendica/language/sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: superblock.php:35 +msgid "Comma separated profile URLs to block" +msgstr "" + +#: superblock.php:40 +msgid "Superblock" +msgstr "" + +#: superblock.php:129 +msgid "Block Completely" +msgstr "" diff --git a/superblock/lang/sv/strings.php b/superblock/lang/sv/strings.php new file mode 100644 index 0000000..72e9772 --- /dev/null +++ b/superblock/lang/sv/strings.php @@ -0,0 +1,7 @@ +strings["\"Blockem\" Settings"] = "「Blockem」配置"; +$a->strings["Comma separated profile URLS to block"] = "逗号分简介URL为栏"; +$a->strings["Submit"] = "提交"; +$a->strings["BLOCKEM Settings saved."] = "「Blockem」配置保存了。"; +$a->strings["Blocked %s - Click to open/close"] = "%s拦了-点击为开关"; +$a->strings["Unblock Author"] = "不拦作家"; +$a->strings["Block Author"] = "拦作家"; +$a->strings["blockem settings updated"] = "blockem设置更新了"; diff --git a/superblock/superblock.php b/superblock/superblock.php new file mode 100644 index 0000000..c1a1411 --- /dev/null +++ b/superblock/superblock.php @@ -0,0 +1,156 @@ + + * + */ + +use Friendica\App; +use Friendica\Core\Hook; +use Friendica\Core\Renderer; +use Friendica\DI; +use Friendica\Util\Strings; + +function superblock_install() +{ + Hook::register('addon_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings'); + Hook::register('addon_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post'); + Hook::register('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start'); + Hook::register('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu'); + Hook::register('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store'); +} + +function superblock_addon_settings(App &$a, array &$data) +{ + if (!DI::userSession()->getLocalUserId()) { + return; + } + + $blocked = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'blocked', ''); + + $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/superblock/'); + $html = Renderer::replaceMacros($t, [ + '$urls' => ['superblock-words', DI::l10n()->t('Comma separated profile URLs to block'), $blocked], + ]); + + $data = [ + 'addon' => 'superblock', + 'title' => DI::l10n()->t('Superblock'), + 'html' => $html, + ]; +} + +function superblock_addon_settings_post(App $a, array &$b) +{ + if (!DI::userSession()->getLocalUserId()) { + return; + } + + if (!empty($_POST['superblock-submit'])) { + DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'blocked',trim($_POST['superblock-words'])); + } +} + +function superblock_enotify_store(App $a, array &$b) +{ + if (empty($b['uid'])) { + return; + } + + $words = DI::pConfig()->get($b['uid'], 'system', 'blocked'); + if ($words) { + $arr = explode(',', $words); + } else { + return; + } + + $found = false; + if (count($arr)) { + foreach ($arr as $word) { + if (!strlen(trim($word))) { + continue; + } + + if (Strings::compareLink($b['url'], $word)) { + $found = true; + break; + } + } + } + + if ($found) { + // Empty out the fields + $b = []; + } +} + + +function superblock_conversation_start(App $a, array &$b) +{ + if (!DI::userSession()->getLocalUserId()) { + return; + } + + $words = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'blocked'); + if ($words) { + $a->data['superblock'] = explode(',', $words); + } + + DI::page()['htmlhead'] .= <<< EOT + +EOT; + +} + +function superblock_item_photo_menu(App $a, array &$b) +{ + if (!DI::userSession()->getLocalUserId() || $b['item']['self']) { + return; + } + + $blocked = false; + $author = $b['item']['author-link']; + if (!empty($a->data['superblock'])) { + foreach ($a->data['superblock'] as $bloke) { + if (Strings::compareLink($bloke, $author)) { + $blocked = true; + break; + } + } + } + + $b['menu'][DI::l10n()->t('Block Completely')] = 'javascript:superblockBlock(\'' . $author . '\'); return false;'; +} + +/** + * This is a statement rather than an actual function definition. The simple + * existence of this method is checked to figure out if the addon offers a + * module. + */ +function superblock_module() {} + +function superblock_init(App $a) +{ + if (!DI::userSession()->getLocalUserId()) { + return; + } + + $words = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'blocked'); + + if (array_key_exists('block', $_GET) && $_GET['block']) { + if (strlen($words)) + $words .= ','; + $words .= trim($_GET['block']); + } + + DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'blocked', $words); + exit(); +} diff --git a/superblock/templates/settings.tpl b/superblock/templates/settings.tpl new file mode 100644 index 0000000..113588e --- /dev/null +++ b/superblock/templates/settings.tpl @@ -0,0 +1 @@ +{{include file="field_textarea.tpl" field=$urls}} From 06fcd69f2edf29834602c14f0c6d566401bcfdc6 Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 14 Dec 2022 20:20:26 +0700 Subject: [PATCH 2/3] new file: windowsphonepush/lang/C/messages.po new file: windowsphonepush/lang/ar/messages.po new file: windowsphonepush/lang/ar/strings.php new file: windowsphonepush/lang/cs/messages.po new file: windowsphonepush/lang/cs/strings.php new file: windowsphonepush/lang/da-dk/messages.po new file: windowsphonepush/lang/da-dk/strings.php new file: windowsphonepush/lang/de/messages.po new file: windowsphonepush/lang/de/strings.php new file: windowsphonepush/lang/es/messages.po new file: windowsphonepush/lang/es/strings.php new file: windowsphonepush/lang/fi-fi/messages.po new file: windowsphonepush/lang/fi-fi/strings.php new file: windowsphonepush/lang/fr/messages.po new file: windowsphonepush/lang/fr/strings.php new file: windowsphonepush/lang/hu/messages.po new file: windowsphonepush/lang/hu/strings.php new file: windowsphonepush/lang/it/messages.po new file: windowsphonepush/lang/it/strings.php new file: windowsphonepush/lang/nl/messages.po new file: windowsphonepush/lang/nl/strings.php new file: windowsphonepush/lang/pl/messages.po new file: windowsphonepush/lang/pl/strings.php new file: windowsphonepush/lang/ro/messages.po new file: windowsphonepush/lang/ro/strings.php new file: windowsphonepush/lang/sv/messages.po new file: windowsphonepush/lang/sv/strings.php new file: windowsphonepush/lang/zh-cn/messages.po new file: windowsphonepush/lang/zh-cn/strings.php new file: windowsphonepush/templates/settings.tpl new file: windowsphonepush/windowsphonepush.php --- windowsphonepush/lang/C/messages.po | 34 ++ windowsphonepush/lang/ar/messages.po | 36 ++ windowsphonepush/lang/ar/strings.php | 11 + windowsphonepush/lang/cs/messages.po | 40 +++ windowsphonepush/lang/cs/strings.php | 12 + windowsphonepush/lang/da-dk/messages.po | 36 ++ windowsphonepush/lang/da-dk/strings.php | 11 + windowsphonepush/lang/de/messages.po | 38 ++ windowsphonepush/lang/de/strings.php | 11 + windowsphonepush/lang/es/messages.po | 37 ++ windowsphonepush/lang/es/strings.php | 11 + windowsphonepush/lang/fi-fi/messages.po | 41 +++ windowsphonepush/lang/fi-fi/strings.php | 12 + windowsphonepush/lang/fr/messages.po | 38 ++ windowsphonepush/lang/fr/strings.php | 11 + windowsphonepush/lang/hu/messages.po | 36 ++ windowsphonepush/lang/hu/strings.php | 11 + windowsphonepush/lang/it/messages.po | 40 +++ windowsphonepush/lang/it/strings.php | 12 + windowsphonepush/lang/nl/messages.po | 40 +++ windowsphonepush/lang/nl/strings.php | 11 + windowsphonepush/lang/pl/messages.po | 37 ++ windowsphonepush/lang/pl/strings.php | 11 + windowsphonepush/lang/ro/messages.po | 40 +++ windowsphonepush/lang/ro/strings.php | 12 + windowsphonepush/lang/sv/messages.po | 35 ++ windowsphonepush/lang/sv/strings.php | 7 + windowsphonepush/lang/zh-cn/messages.po | 40 +++ windowsphonepush/lang/zh-cn/strings.php | 12 + windowsphonepush/templates/settings.tpl | 3 + windowsphonepush/windowsphonepush.php | 438 ++++++++++++++++++++++++ 31 files changed, 1164 insertions(+) create mode 100644 windowsphonepush/lang/C/messages.po create mode 100644 windowsphonepush/lang/ar/messages.po create mode 100644 windowsphonepush/lang/ar/strings.php create mode 100644 windowsphonepush/lang/cs/messages.po create mode 100644 windowsphonepush/lang/cs/strings.php create mode 100644 windowsphonepush/lang/da-dk/messages.po create mode 100644 windowsphonepush/lang/da-dk/strings.php create mode 100644 windowsphonepush/lang/de/messages.po create mode 100644 windowsphonepush/lang/de/strings.php create mode 100644 windowsphonepush/lang/es/messages.po create mode 100644 windowsphonepush/lang/es/strings.php create mode 100644 windowsphonepush/lang/fi-fi/messages.po create mode 100644 windowsphonepush/lang/fi-fi/strings.php create mode 100644 windowsphonepush/lang/fr/messages.po create mode 100644 windowsphonepush/lang/fr/strings.php create mode 100644 windowsphonepush/lang/hu/messages.po create mode 100644 windowsphonepush/lang/hu/strings.php create mode 100644 windowsphonepush/lang/it/messages.po create mode 100644 windowsphonepush/lang/it/strings.php create mode 100644 windowsphonepush/lang/nl/messages.po create mode 100644 windowsphonepush/lang/nl/strings.php create mode 100644 windowsphonepush/lang/pl/messages.po create mode 100644 windowsphonepush/lang/pl/strings.php create mode 100644 windowsphonepush/lang/ro/messages.po create mode 100644 windowsphonepush/lang/ro/strings.php create mode 100644 windowsphonepush/lang/sv/messages.po create mode 100644 windowsphonepush/lang/sv/strings.php create mode 100644 windowsphonepush/lang/zh-cn/messages.po create mode 100644 windowsphonepush/lang/zh-cn/strings.php create mode 100644 windowsphonepush/templates/settings.tpl create mode 100644 windowsphonepush/windowsphonepush.php diff --git a/windowsphonepush/lang/C/messages.po b/windowsphonepush/lang/C/messages.po new file mode 100644 index 0000000..819735c --- /dev/null +++ b/windowsphonepush/lang/C/messages.po @@ -0,0 +1,34 @@ +# ADDON windowsphonepush +# Copyright (C) +# This file is distributed under the same license as the Friendica windowsphonepush addon package. +# +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:16-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: windowsphonepush.php:102 +msgid "Enable WindowsPhonePush Addon" +msgstr "" + +#: windowsphonepush.php:103 +msgid "Push text of new item" +msgstr "" + +#: windowsphonepush.php:104 +msgid "Device URL" +msgstr "" + +#: windowsphonepush.php:109 +msgid "WindowsPhonePush Settings" +msgstr "" diff --git a/windowsphonepush/lang/ar/messages.po b/windowsphonepush/lang/ar/messages.po new file mode 100644 index 0000000..021675c --- /dev/null +++ b/windowsphonepush/lang/ar/messages.po @@ -0,0 +1,36 @@ +# ADDON windowsphonepush +# Copyright (C) +# This file is distributed under the same license as the Friendica windowsphonepush addon package. +# +# +# Translators: +# Farida Khalaf , 2021 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-07-25 13:16+0000\n" +"PO-Revision-Date: 2021-02-22 02:58+0000\n" +"Last-Translator: Farida Khalaf \n" +"Language-Team: Arabic (http://www.transifex.com/Friendica/friendica/language/ar/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ar\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" + +#: windowsphonepush.php:108 +msgid "WindowsPhonePush Settings" +msgstr "إعدادات دفع ويندوزفون" + +#: windowsphonepush.php:111 +msgid "Enable WindowsPhonePush Addon" +msgstr "تمكين ملحق دفع ويندوزفون" + +#: windowsphonepush.php:116 +msgid "Push text of new item" +msgstr "دفع نص عنصر جديد" + +#: windowsphonepush.php:121 +msgid "Save Settings" +msgstr "حفظ الإعدادات" diff --git a/windowsphonepush/lang/ar/strings.php b/windowsphonepush/lang/ar/strings.php new file mode 100644 index 0000000..450e53c --- /dev/null +++ b/windowsphonepush/lang/ar/strings.php @@ -0,0 +1,11 @@ +=3 && $n%100<=10) { return 3; } else if ($n%100>=11 && $n%100<=99) { return 4; } else { return 5; } +}} +$a->strings['WindowsPhonePush Settings'] = 'إعدادات دفع ويندوزفون'; +$a->strings['Enable WindowsPhonePush Addon'] = 'تمكين ملحق دفع ويندوزفون'; +$a->strings['Push text of new item'] = 'دفع نص عنصر جديد'; +$a->strings['Save Settings'] = 'حفظ الإعدادات'; diff --git a/windowsphonepush/lang/cs/messages.po b/windowsphonepush/lang/cs/messages.po new file mode 100644 index 0000000..b1299ec --- /dev/null +++ b/windowsphonepush/lang/cs/messages.po @@ -0,0 +1,40 @@ +# ADDON windowsphonepush +# Copyright (C) +# This file is distributed under the same license as the Friendica windowsphonepush addon package. +# +# +# Translators: +# Lorem Ipsum , 2018 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-26 15:02+0100\n" +"PO-Revision-Date: 2018-06-09 12:01+0000\n" +"Last-Translator: Lorem Ipsum \n" +"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: cs\n" +"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" + +#: windowsphonepush.php:85 +msgid "WindowsPhonePush settings updated." +msgstr "Nastavení WindowsPhonePush aktualizována" + +#: windowsphonepush.php:114 +msgid "WindowsPhonePush Settings" +msgstr "Nastavení WindowsPhonePush" + +#: windowsphonepush.php:117 +msgid "Enable WindowsPhonePush Addon" +msgstr "Povolit doplněk WindowsPhonePush" + +#: windowsphonepush.php:122 +msgid "Push text of new item" +msgstr "Načíst text nové položky" + +#: windowsphonepush.php:127 +msgid "Save Settings" +msgstr "Uložit nastavení" diff --git a/windowsphonepush/lang/cs/strings.php b/windowsphonepush/lang/cs/strings.php new file mode 100644 index 0000000..a2336b3 --- /dev/null +++ b/windowsphonepush/lang/cs/strings.php @@ -0,0 +1,12 @@ += 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; } +}} +$a->strings['WindowsPhonePush settings updated.'] = 'Nastavení WindowsPhonePush aktualizována'; +$a->strings['WindowsPhonePush Settings'] = 'Nastavení WindowsPhonePush'; +$a->strings['Enable WindowsPhonePush Addon'] = 'Povolit doplněk WindowsPhonePush'; +$a->strings['Push text of new item'] = 'Načíst text nové položky'; +$a->strings['Save Settings'] = 'Uložit nastavení'; diff --git a/windowsphonepush/lang/da-dk/messages.po b/windowsphonepush/lang/da-dk/messages.po new file mode 100644 index 0000000..327d198 --- /dev/null +++ b/windowsphonepush/lang/da-dk/messages.po @@ -0,0 +1,36 @@ +# ADDON windowsphonepush +# Copyright (C) +# This file is distributed under the same license as the Friendica windowsphonepush addon package. +# +# +# Translators: +# Anton , 2022 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:16-0500\n" +"PO-Revision-Date: 2014-10-31 13:43+0000\n" +"Last-Translator: Anton , 2022\n" +"Language-Team: Danish (Denmark) (http://www.transifex.com/Friendica/friendica/language/da_DK/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: da_DK\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: windowsphonepush.php:102 +msgid "Enable WindowsPhonePush Addon" +msgstr "Aktiver WindowsPhonePush-tilføjelsen" + +#: windowsphonepush.php:103 +msgid "Push text of new item" +msgstr "Send tekst fra nyt element" + +#: windowsphonepush.php:104 +msgid "Device URL" +msgstr "Enheds-URL" + +#: windowsphonepush.php:109 +msgid "WindowsPhonePush Settings" +msgstr "WindowsPhonePush Indstillinger" diff --git a/windowsphonepush/lang/da-dk/strings.php b/windowsphonepush/lang/da-dk/strings.php new file mode 100644 index 0000000..d42dbbc --- /dev/null +++ b/windowsphonepush/lang/da-dk/strings.php @@ -0,0 +1,11 @@ +strings['Enable WindowsPhonePush Addon'] = 'Aktiver WindowsPhonePush-tilføjelsen'; +$a->strings['Push text of new item'] = 'Send tekst fra nyt element'; +$a->strings['Device URL'] = 'Enheds-URL'; +$a->strings['WindowsPhonePush Settings'] = 'WindowsPhonePush Indstillinger'; diff --git a/windowsphonepush/lang/de/messages.po b/windowsphonepush/lang/de/messages.po new file mode 100644 index 0000000..d85e699 --- /dev/null +++ b/windowsphonepush/lang/de/messages.po @@ -0,0 +1,38 @@ +# ADDON windowsphonepush +# Copyright (C) +# This file is distributed under the same license as the Friendica windowsphonepush addon package. +# +# +# Translators: +# Andreas H., 2014 +# Tobias Diekershoff , 2018,2022 +# Ulf Rompe , 2019 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:16-0500\n" +"PO-Revision-Date: 2022-01-22 17:44+0000\n" +"Last-Translator: Tobias Diekershoff \n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: windowsphonepush.php:102 +msgid "Enable WindowsPhonePush Addon" +msgstr "Aktiviere WindowsPhonePush-Addon" + +#: windowsphonepush.php:103 +msgid "Push text of new item" +msgstr "Text senden" + +#: windowsphonepush.php:104 +msgid "Device URL" +msgstr "Geräte URL" + +#: windowsphonepush.php:109 +msgid "WindowsPhonePush Settings" +msgstr "WindowsPhonePush-Einstellungen" diff --git a/windowsphonepush/lang/de/strings.php b/windowsphonepush/lang/de/strings.php new file mode 100644 index 0000000..1c73805 --- /dev/null +++ b/windowsphonepush/lang/de/strings.php @@ -0,0 +1,11 @@ +strings['Enable WindowsPhonePush Addon'] = 'Aktiviere WindowsPhonePush-Addon'; +$a->strings['Push text of new item'] = 'Text senden'; +$a->strings['Device URL'] = 'Geräte URL'; +$a->strings['WindowsPhonePush Settings'] = 'WindowsPhonePush-Einstellungen'; diff --git a/windowsphonepush/lang/es/messages.po b/windowsphonepush/lang/es/messages.po new file mode 100644 index 0000000..d26af61 --- /dev/null +++ b/windowsphonepush/lang/es/messages.po @@ -0,0 +1,37 @@ +# ADDON windowsphonepush +# Copyright (C) +# This file is distributed under the same license as the Friendica windowsphonepush addon package. +# +# +# Translators: +# Albert, 2016 +# Senex Petrovic , 2021 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-02-01 18:16+0100\n" +"PO-Revision-Date: 2021-04-06 02:17+0000\n" +"Last-Translator: Senex Petrovic \n" +"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: windowsphonepush.php:108 +msgid "WindowsPhonePush Settings" +msgstr "Ajustes de WindowsPhonePush" + +#: windowsphonepush.php:111 +msgid "Enable WindowsPhonePush Addon" +msgstr "Habilitar el complemento WindowsPhonePush" + +#: windowsphonepush.php:116 +msgid "Push text of new item" +msgstr "Empujar texto de nuevo objeto" + +#: windowsphonepush.php:121 +msgid "Save Settings" +msgstr "Guardar Ajustes" diff --git a/windowsphonepush/lang/es/strings.php b/windowsphonepush/lang/es/strings.php new file mode 100644 index 0000000..e9b5a6d --- /dev/null +++ b/windowsphonepush/lang/es/strings.php @@ -0,0 +1,11 @@ +strings['WindowsPhonePush Settings'] = 'Ajustes de WindowsPhonePush'; +$a->strings['Enable WindowsPhonePush Addon'] = 'Habilitar el complemento WindowsPhonePush'; +$a->strings['Push text of new item'] = 'Empujar texto de nuevo objeto'; +$a->strings['Save Settings'] = 'Guardar Ajustes'; diff --git a/windowsphonepush/lang/fi-fi/messages.po b/windowsphonepush/lang/fi-fi/messages.po new file mode 100644 index 0000000..4906a46 --- /dev/null +++ b/windowsphonepush/lang/fi-fi/messages.po @@ -0,0 +1,41 @@ +# ADDON windowsphonepush +# Copyright (C) +# This file is distributed under the same license as the Friendica windowsphonepush addon package. +# +# +# Translators: +# Kris, 2018 +# Kris, 2018 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-26 15:02+0100\n" +"PO-Revision-Date: 2018-05-12 13:13+0000\n" +"Last-Translator: Kris\n" +"Language-Team: Finnish (Finland) (http://www.transifex.com/Friendica/friendica/language/fi_FI/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fi_FI\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: windowsphonepush.php:85 +msgid "WindowsPhonePush settings updated." +msgstr "WindowsPhonePush -asetuket päivitetty." + +#: windowsphonepush.php:114 +msgid "WindowsPhonePush Settings" +msgstr "WindowsPhonePush -asetukset" + +#: windowsphonepush.php:117 +msgid "Enable WindowsPhonePush Addon" +msgstr "Ota WindowsPhonePush -lisäosa käyttöön" + +#: windowsphonepush.php:122 +msgid "Push text of new item" +msgstr "Uuden kohteen Push -teksti" + +#: windowsphonepush.php:127 +msgid "Save Settings" +msgstr "Tallenna asetukset" diff --git a/windowsphonepush/lang/fi-fi/strings.php b/windowsphonepush/lang/fi-fi/strings.php new file mode 100644 index 0000000..87b72a3 --- /dev/null +++ b/windowsphonepush/lang/fi-fi/strings.php @@ -0,0 +1,12 @@ +strings['WindowsPhonePush settings updated.'] = 'WindowsPhonePush -asetuket päivitetty.'; +$a->strings['WindowsPhonePush Settings'] = 'WindowsPhonePush -asetukset'; +$a->strings['Enable WindowsPhonePush Addon'] = 'Ota WindowsPhonePush -lisäosa käyttöön'; +$a->strings['Push text of new item'] = 'Uuden kohteen Push -teksti'; +$a->strings['Save Settings'] = 'Tallenna asetukset'; diff --git a/windowsphonepush/lang/fr/messages.po b/windowsphonepush/lang/fr/messages.po new file mode 100644 index 0000000..d0fd4a4 --- /dev/null +++ b/windowsphonepush/lang/fr/messages.po @@ -0,0 +1,38 @@ +# ADDON windowsphonepush +# Copyright (C) +# This file is distributed under the same license as the Friendica windowsphonepush addon package. +# +# +# Translators: +# Hypolite Petovan , 2022 +# Marie Olive , 2018 +# Tubuntu, 2014 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:16-0500\n" +"PO-Revision-Date: 2014-10-31 13:43+0000\n" +"Last-Translator: Hypolite Petovan , 2022\n" +"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" +"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" + +#: windowsphonepush.php:102 +msgid "Enable WindowsPhonePush Addon" +msgstr "Activer l'extension WindowsPhonePush" + +#: windowsphonepush.php:103 +msgid "Push text of new item" +msgstr "Pousse le texte du nouvel élément" + +#: windowsphonepush.php:104 +msgid "Device URL" +msgstr "URL de périphérique" + +#: windowsphonepush.php:109 +msgid "WindowsPhonePush Settings" +msgstr "Paramètres WindowsPhonePush" diff --git a/windowsphonepush/lang/fr/strings.php b/windowsphonepush/lang/fr/strings.php new file mode 100644 index 0000000..5176426 --- /dev/null +++ b/windowsphonepush/lang/fr/strings.php @@ -0,0 +1,11 @@ +strings['Enable WindowsPhonePush Addon'] = 'Activer l\'extension WindowsPhonePush'; +$a->strings['Push text of new item'] = 'Pousse le texte du nouvel élément'; +$a->strings['Device URL'] = 'URL de périphérique'; +$a->strings['WindowsPhonePush Settings'] = 'Paramètres WindowsPhonePush'; diff --git a/windowsphonepush/lang/hu/messages.po b/windowsphonepush/lang/hu/messages.po new file mode 100644 index 0000000..701b0af --- /dev/null +++ b/windowsphonepush/lang/hu/messages.po @@ -0,0 +1,36 @@ +# ADDON windowsphonepush +# Copyright (C) +# This file is distributed under the same license as the Friendica windowsphonepush addon package. +# +# +# Translators: +# Balázs Úr, 2020-2021 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:16-0500\n" +"PO-Revision-Date: 2021-12-23 19:35+0000\n" +"Last-Translator: Balázs Úr\n" +"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: hu\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: windowsphonepush.php:102 +msgid "Enable WindowsPhonePush Addon" +msgstr "A WindowsPhonePush kiegészítő engedélyezése" + +#: windowsphonepush.php:103 +msgid "Push text of new item" +msgstr "Új elem szövegének felküldése" + +#: windowsphonepush.php:104 +msgid "Device URL" +msgstr "Eszköz URL" + +#: windowsphonepush.php:109 +msgid "WindowsPhonePush Settings" +msgstr "WindowsPhonePush beállításai" diff --git a/windowsphonepush/lang/hu/strings.php b/windowsphonepush/lang/hu/strings.php new file mode 100644 index 0000000..ff883ee --- /dev/null +++ b/windowsphonepush/lang/hu/strings.php @@ -0,0 +1,11 @@ +strings['Enable WindowsPhonePush Addon'] = 'A WindowsPhonePush kiegészítő engedélyezése'; +$a->strings['Push text of new item'] = 'Új elem szövegének felküldése'; +$a->strings['Device URL'] = 'Eszköz URL'; +$a->strings['WindowsPhonePush Settings'] = 'WindowsPhonePush beállításai'; diff --git a/windowsphonepush/lang/it/messages.po b/windowsphonepush/lang/it/messages.po new file mode 100644 index 0000000..39e2927 --- /dev/null +++ b/windowsphonepush/lang/it/messages.po @@ -0,0 +1,40 @@ +# ADDON windowsphonepush +# Copyright (C) +# This file is distributed under the same license as the Friendica windowsphonepush addon package. +# +# +# Translators: +# fabrixxm , 2014,2018 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-26 15:02+0100\n" +"PO-Revision-Date: 2018-03-19 13:26+0000\n" +"Last-Translator: fabrixxm \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: windowsphonepush.php:85 +msgid "WindowsPhonePush settings updated." +msgstr "Impostazioni WindowsPhonePush aggiornate." + +#: windowsphonepush.php:114 +msgid "WindowsPhonePush Settings" +msgstr "Impostazioni WindowsPhonePush" + +#: windowsphonepush.php:117 +msgid "Enable WindowsPhonePush Addon" +msgstr "Abilita componente aggiuntivo WindowsPhonePush" + +#: windowsphonepush.php:122 +msgid "Push text of new item" +msgstr "Notifica il testo dei nuovi elementi" + +#: windowsphonepush.php:127 +msgid "Save Settings" +msgstr "Salva Impostazioni" diff --git a/windowsphonepush/lang/it/strings.php b/windowsphonepush/lang/it/strings.php new file mode 100644 index 0000000..f9caa5e --- /dev/null +++ b/windowsphonepush/lang/it/strings.php @@ -0,0 +1,12 @@ +strings['WindowsPhonePush settings updated.'] = 'Impostazioni WindowsPhonePush aggiornate.'; +$a->strings['WindowsPhonePush Settings'] = 'Impostazioni WindowsPhonePush'; +$a->strings['Enable WindowsPhonePush Addon'] = 'Abilita componente aggiuntivo WindowsPhonePush'; +$a->strings['Push text of new item'] = 'Notifica il testo dei nuovi elementi'; +$a->strings['Save Settings'] = 'Salva Impostazioni'; diff --git a/windowsphonepush/lang/nl/messages.po b/windowsphonepush/lang/nl/messages.po new file mode 100644 index 0000000..e5f9ad9 --- /dev/null +++ b/windowsphonepush/lang/nl/messages.po @@ -0,0 +1,40 @@ +# ADDON windowsphonepush +# Copyright (C) +# This file is distributed under the same license as the Friendica windowsphonepush addon package. +# +# +# Translators: +# Jeroen De Meerleer , 2018 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-26 15:02+0100\n" +"PO-Revision-Date: 2018-08-24 13:48+0000\n" +"Last-Translator: Jeroen De Meerleer \n" +"Language-Team: Dutch (http://www.transifex.com/Friendica/friendica/language/nl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: windowsphonepush.php:85 +msgid "WindowsPhonePush settings updated." +msgstr "WindowsPhonePush instellingen opgeslagen" + +#: windowsphonepush.php:114 +msgid "WindowsPhonePush Settings" +msgstr "WindowsPhonePush instellingen" + +#: windowsphonepush.php:117 +msgid "Enable WindowsPhonePush Addon" +msgstr "WindowsPhonePush Addon inschakelen" + +#: windowsphonepush.php:122 +msgid "Push text of new item" +msgstr "" + +#: windowsphonepush.php:127 +msgid "Save Settings" +msgstr "Instellingen opslaan" diff --git a/windowsphonepush/lang/nl/strings.php b/windowsphonepush/lang/nl/strings.php new file mode 100644 index 0000000..4344328 --- /dev/null +++ b/windowsphonepush/lang/nl/strings.php @@ -0,0 +1,11 @@ +strings['WindowsPhonePush settings updated.'] = 'WindowsPhonePush instellingen opgeslagen'; +$a->strings['WindowsPhonePush Settings'] = 'WindowsPhonePush instellingen'; +$a->strings['Enable WindowsPhonePush Addon'] = 'WindowsPhonePush Addon inschakelen'; +$a->strings['Save Settings'] = 'Instellingen opslaan'; diff --git a/windowsphonepush/lang/pl/messages.po b/windowsphonepush/lang/pl/messages.po new file mode 100644 index 0000000..207d80e --- /dev/null +++ b/windowsphonepush/lang/pl/messages.po @@ -0,0 +1,37 @@ +# ADDON windowsphonepush +# Copyright (C) +# This file is distributed under the same license as the Friendica windowsphonepush addon package. +# +# +# Translators: +# Piotr Strębski , 2022 +# Waldemar Stoczkowski, 2018 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:16-0500\n" +"PO-Revision-Date: 2014-10-31 13:43+0000\n" +"Last-Translator: Piotr Strębski , 2022\n" +"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pl\n" +"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" + +#: windowsphonepush.php:102 +msgid "Enable WindowsPhonePush Addon" +msgstr "Włącz dodatek WindowsPhonePush" + +#: windowsphonepush.php:103 +msgid "Push text of new item" +msgstr "Naciśnij tekst nowego elementu" + +#: windowsphonepush.php:104 +msgid "Device URL" +msgstr "URL urządzenia" + +#: windowsphonepush.php:109 +msgid "WindowsPhonePush Settings" +msgstr "Ustawienia WindowsPhonePush" diff --git a/windowsphonepush/lang/pl/strings.php b/windowsphonepush/lang/pl/strings.php new file mode 100644 index 0000000..e504e6d --- /dev/null +++ b/windowsphonepush/lang/pl/strings.php @@ -0,0 +1,11 @@ +=2 && $n%10<=4) && ($n%100<12 || $n%100>14)) { return 1; } else if ($n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14)) { return 2; } else { return 3; } +}} +$a->strings['Enable WindowsPhonePush Addon'] = 'Włącz dodatek WindowsPhonePush'; +$a->strings['Push text of new item'] = 'Naciśnij tekst nowego elementu'; +$a->strings['Device URL'] = 'URL urządzenia'; +$a->strings['WindowsPhonePush Settings'] = 'Ustawienia WindowsPhonePush'; diff --git a/windowsphonepush/lang/ro/messages.po b/windowsphonepush/lang/ro/messages.po new file mode 100644 index 0000000..cbef36d --- /dev/null +++ b/windowsphonepush/lang/ro/messages.po @@ -0,0 +1,40 @@ +# ADDON windowsphonepush +# Copyright (C) +# This file is distributed under the same license as the Friendica windowsphonepush addon package. +# +# +# Translators: +# Doru DEACONU , 2014 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-26 15:02+0100\n" +"PO-Revision-Date: 2014-11-27 14:31+0000\n" +"Last-Translator: Doru DEACONU \n" +"Language-Team: Romanian (Romania) (http://www.transifex.com/projects/p/friendica/language/ro_RO/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ro_RO\n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" + +#: windowsphonepush.php:85 +msgid "WindowsPhonePush settings updated." +msgstr "Configurări WindowsPhonePush actualizate." + +#: windowsphonepush.php:114 +msgid "WindowsPhonePush Settings" +msgstr "Configurare WindowsPhonePush" + +#: windowsphonepush.php:117 +msgid "Enable WindowsPhonePush Addon" +msgstr "Activare Addon WindowsPhonePush" + +#: windowsphonepush.php:122 +msgid "Push text of new item" +msgstr "Tastează textul noului element" + +#: windowsphonepush.php:127 +msgid "Save Settings" +msgstr "Salvare Configurări" diff --git a/windowsphonepush/lang/ro/strings.php b/windowsphonepush/lang/ro/strings.php new file mode 100644 index 0000000..db6d17f --- /dev/null +++ b/windowsphonepush/lang/ro/strings.php @@ -0,0 +1,12 @@ +19)||(($n%100==0)&&($n!=0)))) { return 2; } else { return 1; } +}} +$a->strings['WindowsPhonePush settings updated.'] = 'Configurări WindowsPhonePush actualizate.'; +$a->strings['WindowsPhonePush Settings'] = 'Configurare WindowsPhonePush'; +$a->strings['Enable WindowsPhonePush Addon'] = 'Activare Addon WindowsPhonePush'; +$a->strings['Push text of new item'] = 'Tastează textul noului element'; +$a->strings['Save Settings'] = 'Salvare Configurări'; diff --git a/windowsphonepush/lang/sv/messages.po b/windowsphonepush/lang/sv/messages.po new file mode 100644 index 0000000..d8da9c5 --- /dev/null +++ b/windowsphonepush/lang/sv/messages.po @@ -0,0 +1,35 @@ +# ADDON windowsphonepush +# Copyright (C) +# This file is distributed under the same license as the Friendica windowsphonepush addon package. +# +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:16-0500\n" +"PO-Revision-Date: 2021-12-22 16:18+0000\n" +"Last-Translator: Transifex Bot <>\n" +"Language-Team: Swedish (http://www.transifex.com/Friendica/friendica/language/sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: windowsphonepush.php:102 +msgid "Enable WindowsPhonePush Addon" +msgstr "" + +#: windowsphonepush.php:103 +msgid "Push text of new item" +msgstr "" + +#: windowsphonepush.php:104 +msgid "Device URL" +msgstr "" + +#: windowsphonepush.php:109 +msgid "WindowsPhonePush Settings" +msgstr "" diff --git a/windowsphonepush/lang/sv/strings.php b/windowsphonepush/lang/sv/strings.php new file mode 100644 index 0000000..72e9772 --- /dev/null +++ b/windowsphonepush/lang/sv/strings.php @@ -0,0 +1,7 @@ +, 2018 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-26 15:02+0100\n" +"PO-Revision-Date: 2018-06-16 09:28+0000\n" +"Last-Translator: 朱陈锬 \n" +"Language-Team: Chinese (China) (http://www.transifex.com/Friendica/friendica/language/zh_CN/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: zh_CN\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: windowsphonepush.php:85 +msgid "WindowsPhonePush settings updated." +msgstr "WindowsPhonePush 设置已更新。" + +#: windowsphonepush.php:114 +msgid "WindowsPhonePush Settings" +msgstr "WindowsPhonePush 设置" + +#: windowsphonepush.php:117 +msgid "Enable WindowsPhonePush Addon" +msgstr "启用 WindowsPhonePush 插件" + +#: windowsphonepush.php:122 +msgid "Push text of new item" +msgstr "推送新项目的文本" + +#: windowsphonepush.php:127 +msgid "Save Settings" +msgstr "保存设置" diff --git a/windowsphonepush/lang/zh-cn/strings.php b/windowsphonepush/lang/zh-cn/strings.php new file mode 100644 index 0000000..08bf5b0 --- /dev/null +++ b/windowsphonepush/lang/zh-cn/strings.php @@ -0,0 +1,12 @@ +strings['WindowsPhonePush settings updated.'] = 'WindowsPhonePush 设置已更新。'; +$a->strings['WindowsPhonePush Settings'] = 'WindowsPhonePush 设置'; +$a->strings['Enable WindowsPhonePush Addon'] = '启用 WindowsPhonePush 插件'; +$a->strings['Push text of new item'] = '推送新项目的文本'; +$a->strings['Save Settings'] = '保存设置'; diff --git a/windowsphonepush/templates/settings.tpl b/windowsphonepush/templates/settings.tpl new file mode 100644 index 0000000..9198225 --- /dev/null +++ b/windowsphonepush/templates/settings.tpl @@ -0,0 +1,3 @@ +{{include file="field_checkbox.tpl" field=$enabled}} +{{include file="field_checkbox.tpl" field=$senditemtext}} +{{include file="field_input.tpl" field=$device_url}} diff --git a/windowsphonepush/windowsphonepush.php b/windowsphonepush/windowsphonepush.php new file mode 100644 index 0000000..0a43f69 --- /dev/null +++ b/windowsphonepush/windowsphonepush.php @@ -0,0 +1,438 @@ + + * Status: Unsupported + * + * + * Pre-requisite: Windows Phone mobile device (at least WP 7.0) + * Friendica mobile app on Windows Phone + * + * When addon is installed, the system calls the addon + * name_install() function, located in 'addon/name/name.php', + * where 'name' is the name of the addon. + * If the addon is removed from the configuration list, the + * system will call the name_uninstall() function. + * + * Version history: + * 1.1 : addon crashed on php versions >= 5.4 as of removed deprecated call-time + * pass-by-reference used in function calls within function windowsphonepush_content + * 2.0 : adaption for supporting emphasizing new entries in app (count on tile cannot be read out, + * so we need to retrieve counter through show_settings secondly). Provide new function for + * calling from app to set the counter back after start (if user starts again before cronjob + * sets the counter back + * count only unseen elements which are not type=activity (likes and dislikes not seen as new elements) + */ + +use Friendica\App; +use Friendica\Content\Text\BBCode; +use Friendica\Content\Text\HTML; +use Friendica\Core\Hook; +use Friendica\Core\Logger; +use Friendica\Core\Renderer; +use Friendica\Database\DBA; +use Friendica\DI; +use Friendica\Model\Item; +use Friendica\Model\Post; +use Friendica\Model\User; +use Friendica\Network\HTTPException\UnauthorizedException; + +function windowsphonepush_install() +{ + /* Our addon will attach in three places. + * The first is within cron - so the push notifications will be + * sent every 10 minutes (or whatever is set in crontab). + */ + Hook::register('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron'); + + /* Then we'll attach into the addon settings page, and also the + * settings post hook so that we can create and update + * user preferences. User shall be able to activate the addon and + * define whether he allows pushing first characters of item text + */ + Hook::register('addon_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings'); + Hook::register('addon_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post'); + + Logger::notice("installed windowsphonepush"); +} + +/* declare the windowsphonepush function so that /windowsphonepush url requests will land here */ +/** + * This is a statement rather than an actual function definition. The simple + * existence of this method is checked to figure out if the addon offers a + * module. + */ +function windowsphonepush_module() {} + +/* Callback from the settings post function. + * $post contains the $_POST array. + * We will make sure we've got a valid user account + * and if so set our configuration setting for this person. + */ +function windowsphonepush_settings_post(App $a, array $post) +{ + if (!DI::userSession()->getLocalUserId() || empty($post['windowsphonepush-submit'])) { + return; + } + $enable = intval($post['windowsphonepush']); + DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'windowsphonepush', 'enable', $enable); + + if ($enable) { + DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'windowsphonepush', 'counterunseen', 0); + } + + DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'windowsphonepush', 'senditemtext', intval($post['windowsphonepush-senditemtext'])); +} + +/* Called from the Addon Setting form. + * Add our own settings info to the page. + */ +function windowsphonepush_settings(App &$a, array &$data) +{ + if (!DI::userSession()->getLocalUserId()) { + return; + } + + $enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'windowsphonepush', 'enable'); + $senditemtext = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'windowsphonepush', 'senditemtext'); + $device_url = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'windowsphonepush', 'device_url'); + + $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/windowsphonepush/'); + $html = Renderer::replaceMacros($t, [ + '$enabled' => ['windowsphonepush', DI::l10n()->t('Enable WindowsPhonePush Addon'), $enabled], + '$senditemtext' => ['windowsphonepush-senditemtext', DI::l10n()->t('Push text of new item'), $senditemtext], + '$device_url' => ['', DI::l10n()->t('Device URL'), $device_url, '', false, ' readonly'], + ]); + + $data = [ + 'addon' => 'windowsphonepush', + 'title' => DI::l10n()->t('WindowsPhonePush Settings'), + 'html' => $html, + ]; +} + +/* Cron function used to regularly check all users on the server with active windowsphonepushaddon and send + * notifications to the Microsoft servers and consequently to the Windows Phone device + */ +function windowsphonepush_cron() +{ + // retrieve all UID's for which the addon windowsphonepush is enabled and loop through every user + $pconfigs = DBA::selectToArray('pconfig', ['uid'], ['cat' => 'windowsphonepush', 'k' => 'enable', 'v' => true]); + foreach ($pconfigs as $rr) { + // load stored information for the user-id of the current loop + $device_url = DI::pConfig()->get($rr['uid'], 'windowsphonepush', 'device_url'); + $lastpushid = DI::pConfig()->get($rr['uid'], 'windowsphonepush', 'lastpushid'); + + // pushing only possible if device_url (the URI on Microsoft server) is available or not "NA" (which will be sent + // by app if user has switched the server setting in app - sending blank not possible as this would return an update error) + if (( $device_url == "" ) || ( $device_url == "NA" )) { + // no Device-URL for the user availabe, but addon is enabled --> write info to Logger + Logger::notice("WARN: windowsphonepush is enable for user " . $rr['uid'] . ", but no Device-URL is specified for the user."); + } else { + // retrieve the number of unseen items and the id of the latest one (if there are more than + // one new entries since last poller run, only the latest one will be pushed) + $count = DBA::fetchFirst("SELECT count(`id`) AS count, max(`id`) AS max FROM `post-view` WHERE `unseen` AND `type` != ? AND `uid` = ?", 'activity', $rr['uid']); + + // send number of unseen items to the device (the number will be displayed on Start screen until + // App will be started by user) - this update will be sent every 10 minutes to update the number to 0 if + // user has loaded the timeline through app or website + $res_tile = send_tile_update($device_url, "", $count['count'], ""); + switch (trim($res_tile)) { + case "Received": + // ok, count has been pushed, let's save it in personal settings + DI::pConfig()->set($rr['uid'], 'windowsphonepush', 'counterunseen', $count['count']); + break; + case "QueueFull": + // maximum of 30 messages reached, server rejects any further push notification until device reconnects + Logger::notice("INFO: Device-URL '" . $device_url . "' returns a QueueFull."); + break; + case "Suppressed": + // notification received and dropped as something in app was not enabled + Logger::notice("WARN. Device-URL '" . $device_url . "' returns a Suppressed. Unexpected error in Mobile App?"); + break; + case "Dropped": + // mostly combines with Expired, in that case Device-URL will be deleted from pconfig (function send_push) + break; + default: + // error, mostly called by "" which means that the url (not "" which has been checked) + // didn't not received Microsoft Notification Server -> wrong url + Logger::notice("ERROR: specified Device-URL '" . $device_url . "' didn't produced any response."); + } + + // additionally user receives the text of the newest item (function checks against last successfully pushed item) + if (intval($count['max']) > intval($lastpushid)) { + // user can define if he wants to see the text of the item in the push notification + // this has been implemented as the device_url is not a https uri (not so secure) + $senditemtext = DI::pConfig()->get($rr['uid'], 'windowsphonepush', 'senditemtext'); + if ($senditemtext == 1) { + // load item with the max id + $item = Post::selectFirst(['author-name', 'body', 'uri-id'], ['id' => $count['max']]); + + // as user allows to send the item, we want to show the sender of the item in the toast + // toasts are limited to one line, therefore place is limited - author shall be in + // max. 15 chars (incl. dots); author is displayed in bold font + $author = $item['author-name']; + $author = ((strlen($author) > 12) ? substr($author, 0, 12) . "..." : $author); + + // normally we show the body of the item, however if it is an url or an image we cannot + // show this in the toast (only test), therefore changing to an alternate text + // Otherwise BBcode-Tags will be eliminated and plain text cutted to 140 chars (incl. dots) + // BTW: information only possible in English + $body = $item['body']; + if (substr($body, 0, 4) == "[url") { + $body = "URL/Image ..."; + } else { + $body = BBCode::convertForUriId($item['uri-id'], $body, BBCode::MASTODON_API); + $body = HTML::toPlaintext($body, 0); + $body = ((strlen($body) > 137) ? substr($body, 0, 137) . "..." : $body); + } + } else { + // if user wishes higher privacy, we only display "Friendica - New timeline entry arrived" + $author = "Friendica"; + $body = "New timeline entry arrived ..."; + } + // only if toast push notification returns the Notification status "Received" we will update th settings with the + // new indicator max-id is checked against (QueueFull, Suppressed, N/A, Dropped shall qualify to resend + // the push notification some minutes later (BTW: if resulting in Expired for subscription status the + // device_url will be deleted (no further try on this url, see send_push) + // further log information done on count pushing with send_tile (see above) + $res_toast = send_toast($device_url, $author, $body); + if (trim($res_toast) === 'Received') { + DI::pConfig()->set($rr['uid'], 'windowsphonepush', 'lastpushid', $count['max']); + } + } + } + } +} + +/* Tile push notification change the number in the icon of the App in Start Screen of + * a Windows Phone Device, Image could be changed, not used for App "Friendica Mobile" + */ +function send_tile_update($device_url, $image_url, $count, $title, $priority = 1) +{ + $msg = "" . + "" . + "" . + "" . $image_url . "" . + "" . $count . "" . + "" . $title . "" . + " " . + ""; + + $result = send_push($device_url, [ + 'X-WindowsPhone-Target: token', + 'X-NotificationClass: ' . $priority, + ], $msg); + return $result; +} + +/* Toast push notification send information to the top of the display + * if the user is not currently using the Friendica Mobile App, however + * there is only one line for displaying the information + */ +function send_toast($device_url, $title, $message, $priority = 2) +{ + $msg = "" . + "" . + "" . + "" . $title . "" . + "" . $message . "" . + "" . + "" . + ""; + + $result = send_push($device_url, [ + 'X-WindowsPhone-Target: toast', + 'X-NotificationClass: ' . $priority, + ], $msg); + return $result; +} + +// General function to send the push notification via cURL +function send_push($device_url, $headers, $msg) +{ + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $device_url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_HEADER, true); + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers + [ + 'Content-Type: text/xml', + 'charset=utf-8', + 'Accept: application/*', + ] + ); + curl_setopt($ch, CURLOPT_POSTFIELDS, $msg); + + $output = curl_exec($ch); + curl_close($ch); + + // if we received "Expired" from Microsoft server we will delete the obsolete device-URL + // and log this fact + $subscriptionStatus = get_header_value($output, 'X-SubscriptionStatus'); + if ($subscriptionStatus == "Expired") { + DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'windowsphonepush', 'device_url', ""); + Logger::notice("ERROR: the stored Device-URL " . $device_url . "returned an 'Expired' error, it has been deleted now."); + } + + // the notification status shall be returned to windowsphonepush_cron (will + // update settings if 'Received' otherwise keep old value in settings (on QueuedFull. Suppressed, N/A, Dropped) + $notificationStatus = get_header_value($output, 'X-NotificationStatus'); + return $notificationStatus; +} + +// helper function to receive statuses from webresponse of Microsoft server +function get_header_value($content, $header) +{ + return preg_match_all("/$header: (.*)/i", $content, $match) ? $match[1][0] : ""; +} + +/* reading information from url and deciding which function to start + * show_settings = delivering settings to check + * update_settings = set the device_url + * update_counterunseen = set counter for unseen elements to zero + */ +function windowsphonepush_content(App $a) +{ + // Login with the specified Network credentials (like in api.php) + windowsphonepush_login($a); + + $path = DI::args()->getArgv()[0]; + $path2 = DI::args()->getArgv()[1]; + if ($path == "windowsphonepush") { + switch ($path2) { + case "show_settings": + windowsphonepush_showsettings($a); + exit(); + break; + case "update_settings": + $ret = windowsphonepush_updatesettings($a); + header("Content-Type: application/json; charset=utf-8"); + echo json_encode(['status' => $ret]); + exit(); + break; + case "update_counterunseen": + $ret = windowsphonepush_updatecounterunseen(); + header("Content-Type: application/json; charset=utf-8"); + echo json_encode(['status' => $ret]); + exit(); + break; + default: + echo "Fehler"; + } + } +} + +// return settings for windowsphonepush addon to be able to check them in WP app +function windowsphonepush_showsettings() +{ + if (!DI::userSession()->getLocalUserId()) { + return; + } + + $enable = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'windowsphonepush', 'enable'); + $device_url = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'windowsphonepush', 'device_url'); + $senditemtext = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'windowsphonepush', 'senditemtext'); + $lastpushid = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'windowsphonepush', 'lastpushid'); + $counterunseen = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'windowsphonepush', 'counterunseen'); + $addonversion = "2.0"; + + if (!$device_url) { + $device_url = ""; + } + + if (!$lastpushid) { + $lastpushid = 0; + } + + header("Content-Type: application/json"); + echo json_encode(['uid' => DI::userSession()->getLocalUserId(), + 'enable' => $enable, + 'device_url' => $device_url, + 'senditemtext' => $senditemtext, + 'lastpushid' => $lastpushid, + 'counterunseen' => $counterunseen, + 'addonversion' => $addonversion]); +} + +/* update_settings is used to transfer the device_url from WP device to the Friendica server + * return the status of the operation to the server + */ +function windowsphonepush_updatesettings() +{ + if (!DI::userSession()->getLocalUserId()) { + return "Not Authenticated"; + } + + // no updating if user hasn't enabled the addon + $enable = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'windowsphonepush', 'enable'); + if (!$enable) { + return "Plug-in not enabled"; + } + + // check if sent url is empty - don't save and send return code to app + $device_url = $_POST['deviceurl']; + if ($device_url == "") { + Logger::notice("ERROR: no valid Device-URL specified - client transferred '" . $device_url . "'"); + return "No valid Device-URL specified"; + } + + // check if sent url is already stored in database for another user, we assume that there was a change of + // the user on the Windows Phone device and that device url is no longer true for the other user, so we + // et the device_url for the OTHER user blank (should normally not occur as App should include User/server + // in url request to Microsoft Push Notification server) + $pconfigs = DBA::selectToArray('pconfig', ['uid'], ["`uid` != ? AND `cat` = ? AND `k` = ? AND `v` = ?", DI::userSession()->getLocalUserId(), 'windowsphonepush', 'device_url', $device_url]); + foreach ($pconfigs as $rr) { + DI::pConfig()->set($rr['uid'], 'windowsphonepush', 'device_url', ''); + Logger::notice("WARN: the sent URL was already registered with user '" . $rr['uid'] . "'. Deleted for this user as we expect to be correct now for user '" . DI::userSession()->getLocalUserId() . "'."); + } + + DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'windowsphonepush', 'device_url', $device_url); + // output the successfull update of the device URL to the logger for error analysis if necessary + Logger::notice("INFO: Device-URL for user '" . DI::userSession()->getLocalUserId() . "' has been updated with '" . $device_url . "'"); + return "Device-URL updated successfully!"; +} + +// update_counterunseen is used to reset the counter to zero from Windows Phone app +function windowsphonepush_updatecounterunseen() +{ + if (!DI::userSession()->getLocalUserId()) { + return "Not Authenticated"; + } + + // no updating if user hasn't enabled the addon + $enable = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'windowsphonepush', 'enable'); + if (!$enable) { + return "Plug-in not enabled"; + } + + DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'windowsphonepush', 'counterunseen', 0); + return "Counter set to zero"; +} + +/* helper function to login to the server with the specified Network credentials + * (mainly copied from api.php) + */ +function windowsphonepush_login(App $a) +{ + if (!isset($_SERVER['PHP_AUTH_USER'])) { + Logger::info('API_login: ' . print_r($_SERVER, true)); + header('WWW-Authenticate: Basic realm="Friendica"'); + throw new UnauthorizedException('This api requires login'); + } + + try { + $user_id = User::getIdFromPasswordAuthentication($_SERVER['PHP_AUTH_USER'], trim($_SERVER['PHP_AUTH_PW'])); + $record = DBA::selectFirst('user', [], ['uid' => $user_id]); + DI::auth()->setForUser($a, $record); + DI::session()->set('allow_api', true); + Hook::callAll('logged_in', $record); + } catch (Exception $ex) { + Logger::info('API_login failure: ' . print_r($_SERVER, true)); + header('WWW-Authenticate: Basic realm="Friendica"'); + throw new UnauthorizedException('This api requires login'); + } +} From 5459f281d8130b855c4984048b58047aa4d72bb5 Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 14 Dec 2022 20:34:23 +0700 Subject: [PATCH 3/3] new file: namethingy/namethingy.php --- namethingy/namethingy.php | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 namethingy/namethingy.php diff --git a/namethingy/namethingy.php b/namethingy/namethingy.php new file mode 100644 index 0000000..8e5b3ce --- /dev/null +++ b/namethingy/namethingy.php @@ -0,0 +1,42 @@ + + * Status: Unsupported + */ + +use Friendica\App; +use Friendica\Core\Hook; +use Friendica\DI; + +function namethingy_install() +{ + Hook::register('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu'); +} + +function namethingy_app_menu(App $a, array &$b) +{ + $b['app_menu'][] = ''; +} + + +/** + * This is a statement rather than an actual function definition. The simple + * existence of this method is checked to figure out if the addon offers a + * module. + */ +function namethingy_module() {} + +function namethingy_content(App $a) +{ + $baseurl = DI::baseUrl()->get() . '/addon/namethingy'; + + $o .= <<< EOT +