From 4f545974daef0264f1c8f2b92134bcb859de36ca Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 1 Nov 2019 21:24:47 -0400 Subject: [PATCH 01/40] Move Object\Image static methods to Util\Images --- twitter/twitter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/twitter/twitter.php b/twitter/twitter.php index 4510caef..6cc11f9b 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -84,10 +84,10 @@ use Friendica\Model\Group; use Friendica\Model\Item; use Friendica\Model\ItemContent; use Friendica\Model\User; -use Friendica\Object\Image; use Friendica\Protocol\Activity; use Friendica\Util\ConfigFileLoader; use Friendica\Util\DateTimeFormat; +use Friendica\Util\Images; use Friendica\Util\Network; use Friendica\Util\Strings; @@ -1010,7 +1010,7 @@ function twitter_fix_avatar($avatar) { $new_avatar = str_replace("_normal.", ".", $avatar); - $info = Image::getInfoFromURL($new_avatar); + $info = Images::getInfoFromURLCached($new_avatar); if (!$info) { $new_avatar = $avatar; } -- 2.43.5 From d6734f0fd34eb1107a8fcc771cfcc28e169cba9c Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 08:03:13 +0100 Subject: [PATCH 02/40] blackout addon added CA translation THX Joan Bar --- blackout/lang/ca/messages.po | 66 ++++++++++++++++++++++++++++++++++++ blackout/lang/ca/strings.php | 20 +++++++++-- 2 files changed, 83 insertions(+), 3 deletions(-) create mode 100644 blackout/lang/ca/messages.po diff --git a/blackout/lang/ca/messages.po b/blackout/lang/ca/messages.po new file mode 100644 index 00000000..2f270d91 --- /dev/null +++ b/blackout/lang/ca/messages.po @@ -0,0 +1,66 @@ +# ADDON blackout +# Copyright (C) +# This file is distributed under the same license as the Friendica blackout addon package. +# +# +# Translators: +# Joan Bar , 2019 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-03-12 09:26+0100\n" +"PO-Revision-Date: 2019-10-13 22:17+0000\n" +"Last-Translator: Joan Bar \n" +"Language-Team: Catalan (http://www.transifex.com/Friendica/friendica/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: blackout.php:101 +msgid "" +"The end-date is prior to the start-date of the blackout, you should fix this" +msgstr "La data de finalització és anterior a la data d'inici de l'apagada, hauríeu d'arreglar-ho" + +#: blackout.php:103 +#, php-format +msgid "" +"Please double check that the current settings for the blackout. Begin will " +"be %s and it will end %s." +msgstr "Verifiqueu si la configuració actual per a l'apagat. Començarà serà %s i s’acabarà %s." + +#: blackout.php:106 +msgid "Save Settings" +msgstr "Desa la configuració" + +#: blackout.php:107 +msgid "Redirect URL" +msgstr "Redirigir URL" + +#: blackout.php:107 +msgid "all your visitors from the web will be redirected to this URL" +msgstr "tots els visitants del web seran redirigits a aquest tema URL" + +#: blackout.php:108 +msgid "Begin of the Blackout" +msgstr "Inici de l’apagada" + +#: blackout.php:108 +msgid "" +"Format is YYYY-MM-DD hh:mm; YYYY year, MM month, " +"DD day, hh hour and mm minute." +msgstr "El format és YYYY-MM-DD hh:mm; YYYY year, MM mes. DD day, hhhora i mm minut." + +#: blackout.php:109 +msgid "End of the Blackout" +msgstr "Fi de l’apagada" + +#: blackout.php:111 +msgid "" +"Note: The redirect will be active from the moment you press" +" the submit button. Users currently logged in will not be " +"thrown out but can't login again after logging out should the blackout is " +"still in place." +msgstr "Nota: La redirecció estarà activa des del moment en què premeu el botó d'enviament. Els usuaris actualment connectats ho faran no es llençarà però no es pot tornar a iniciar la sessió un cop s'hagi desactivat l'apagada." diff --git a/blackout/lang/ca/strings.php b/blackout/lang/ca/strings.php index 87481b12..20c8c1da 100644 --- a/blackout/lang/ca/strings.php +++ b/blackout/lang/ca/strings.php @@ -1,3 +1,17 @@ -strings["Submit"] = "Enviar"; +strings["The end-date is prior to the start-date of the blackout, you should fix this"] = "La data de finalització és anterior a la data d'inici de l'apagada, hauríeu d'arreglar-ho"; +$a->strings["Please double check that the current settings for the blackout. Begin will be %s and it will end %s."] = "Verifiqueu si la configuració actual per a l'apagat. Començarà serà %s i s’acabarà %s."; +$a->strings["Save Settings"] = "Desa la configuració"; +$a->strings["Redirect URL"] = "Redirigir URL"; +$a->strings["all your visitors from the web will be redirected to this URL"] = "tots els visitants del web seran redirigits a aquest tema URL"; +$a->strings["Begin of the Blackout"] = "Inici de l’apagada"; +$a->strings["Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute."] = "El format és YYYY-MM-DD hh:mm; YYYY year, MM mes. DD day, hhhora i mm minut."; +$a->strings["End of the Blackout"] = "Fi de l’apagada"; +$a->strings["Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can't login again after logging out should the blackout is still in place."] = "Nota: La redirecció estarà activa des del moment en què premeu el botó d'enviament. Els usuaris actualment connectats ho faran no es llençarà però no es pot tornar a iniciar la sessió un cop s'hagi desactivat l'apagada."; -- 2.43.5 From b1c22cdf74e7f8b4efcdd45df6a1b2a4924711a7 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 08:10:55 +0100 Subject: [PATCH 03/40] advancedcontentfilter addon added CA translation THX Joan Bar --- advancedcontentfilter/lang/ca/messages.po | 177 ++++++++++++++++++++++ advancedcontentfilter/lang/ca/strings.php | 41 +++++ 2 files changed, 218 insertions(+) create mode 100644 advancedcontentfilter/lang/ca/messages.po create mode 100644 advancedcontentfilter/lang/ca/strings.php diff --git a/advancedcontentfilter/lang/ca/messages.po b/advancedcontentfilter/lang/ca/messages.po new file mode 100644 index 00000000..913e9ecc --- /dev/null +++ b/advancedcontentfilter/lang/ca/messages.po @@ -0,0 +1,177 @@ +# ADDON advancedcontentfilter +# Copyright (C) +# This file is distributed under the same license as the Friendica advancedcontentfilter addon package. +# +# +# Translators: +# Joan Bar , 2019 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-04-17 04:04+0200\n" +"PO-Revision-Date: 2018-05-24 06:41+0000\n" +"Last-Translator: Joan Bar , 2019\n" +"Language-Team: Catalan (https://www.transifex.com/Friendica/teams/12172/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: advancedcontentfilter.php:134 +#, php-format +msgid "Filtered by rule: %s" +msgstr "Filtrat per regla: %s" + +#: advancedcontentfilter.php:147 advancedcontentfilter.php:204 +msgid "Advanced Content Filter" +msgstr "Contingut avançat Filtre" + +#: advancedcontentfilter.php:203 +msgid "Back to Addon Settings" +msgstr "Torna Addon Configuració" + +#: advancedcontentfilter.php:205 +msgid "Add a Rule" +msgstr "Afegiu una regla" + +#: advancedcontentfilter.php:206 +msgid "Help" +msgstr "Ajuda" + +#: advancedcontentfilter.php:207 +msgid "" +"Add and manage your personal content filter rules in this screen. Rules have" +" a name and an arbitrary expression that will be matched against post data. " +"For a complete reference of the available operations and variables, check " +"the help page." +msgstr "" +"Afegiu i gestioneu les vostres regles de filtre de contingut personal en " +"aquesta pantalla. Les regles tenen un nom i una expressió arbitrària que es " +"combinen amb les dades de la publicació. Per obtenir una referència completa" +" de les variables i operacions disponibles, comproveu el botó pàgina d’ajuda." + +#: advancedcontentfilter.php:208 +msgid "Your rules" +msgstr "Les seves normes" + +#: advancedcontentfilter.php:209 +msgid "" +"You have no rules yet! Start adding one by clicking on the button above next" +" to the title." +msgstr "" +"Encara no teniu normes. Comenceu a afegir-ne un fent clic al botó situat al " +"costat del títol." + +#: advancedcontentfilter.php:210 +msgid "Disabled" +msgstr "Desactivat" + +#: advancedcontentfilter.php:211 +msgid "Enabled" +msgstr "Permetre" + +#: advancedcontentfilter.php:212 +msgid "Disable this rule" +msgstr "Desactiva aquesta regla" + +#: advancedcontentfilter.php:213 +msgid "Enable this rule" +msgstr "Activa aquesta regla" + +#: advancedcontentfilter.php:214 +msgid "Edit this rule" +msgstr "Edita aquesta regla" + +#: advancedcontentfilter.php:215 +msgid "Edit the rule" +msgstr "Edita la regla" + +#: advancedcontentfilter.php:216 +msgid "Save this rule" +msgstr "Deseu aquesta regla" + +#: advancedcontentfilter.php:217 +msgid "Delete this rule" +msgstr "Suprimeix aquesta regla" + +#: advancedcontentfilter.php:218 +msgid "Rule" +msgstr "Regla" + +#: advancedcontentfilter.php:219 +msgid "Close" +msgstr "Tancar" + +#: advancedcontentfilter.php:220 +msgid "Add new rule" +msgstr "Add nova regla" + +#: advancedcontentfilter.php:221 +msgid "Rule Name" +msgstr "Nom de la regla" + +#: advancedcontentfilter.php:222 +msgid "Rule Expression" +msgstr "Expressió de regla" + +#: advancedcontentfilter.php:223 +msgid "" +"

Examples:

  • author_link == "
    +"'https://friendica.mrpetovan.com/profile/hypolite'
  • tags
" +msgstr "" +"

Exemples:

  • author_link == "
    +"'https://friendica.mrpetovan.com/profile/hypolite'
  • tags
" + +#: advancedcontentfilter.php:224 +msgid "Cancel" +msgstr "cancel·lar" + +#: advancedcontentfilter.php:290 advancedcontentfilter.php:301 +#: advancedcontentfilter.php:312 advancedcontentfilter.php:346 +#: advancedcontentfilter.php:375 advancedcontentfilter.php:396 +msgid "You must be logged in to use this method" +msgstr "Per utilitzar aquest mètode, heu d’iniciar sessió" + +#: advancedcontentfilter.php:316 advancedcontentfilter.php:350 +#: advancedcontentfilter.php:379 +msgid "Invalid form security token, please refresh the page." +msgstr "" +"El testimoni de seguretat del formulari no és vàlid. Actualitza la pàgina" + +#: advancedcontentfilter.php:328 +msgid "The rule name and expression are required." +msgstr "El nom i l’expressió de la regla són obligatoris" + +#: advancedcontentfilter.php:340 +msgid "Rule successfully added" +msgstr "La regla s'ha afegit correctament" + +#: advancedcontentfilter.php:354 advancedcontentfilter.php:383 +msgid "Rule doesn't exist or doesn't belong to you." +msgstr "La regla no existeix o no us pertany." + +#: advancedcontentfilter.php:369 +msgid "Rule successfully updated" +msgstr "La regla s'ha actualitzat correctament" + +#: advancedcontentfilter.php:390 +msgid "Rule successfully deleted" +msgstr "S'ha suprimit la regla correctament" + +#: advancedcontentfilter.php:400 +msgid "Missing argument: guid." +msgstr "Falta un argument: guia" + +#: advancedcontentfilter.php:406 +#, php-format +msgid "Unknown post with guid: %s" +msgstr "Publicació desconeguda amb guia: %s" + +#: src/middlewares.php:28 +msgid "Method not found" +msgstr "Mètode no trobat" diff --git a/advancedcontentfilter/lang/ca/strings.php b/advancedcontentfilter/lang/ca/strings.php new file mode 100644 index 00000000..9afcfdb2 --- /dev/null +++ b/advancedcontentfilter/lang/ca/strings.php @@ -0,0 +1,41 @@ +strings["Filtered by rule: %s"] = "Filtrat per regla: %s"; +$a->strings["Advanced Content Filter"] = "Contingut avançat Filtre"; +$a->strings["Back to Addon Settings"] = "Torna Addon Configuració"; +$a->strings["Add a Rule"] = "Afegiu una regla"; +$a->strings["Help"] = "Ajuda"; +$a->strings["Add and manage your personal content filter rules in this screen. Rules have a name and an arbitrary expression that will be matched against post data. For a complete reference of the available operations and variables, check the help page."] = "Afegiu i gestioneu les vostres regles de filtre de contingut personal en aquesta pantalla. Les regles tenen un nom i una expressió arbitrària que es combinen amb les dades de la publicació. Per obtenir una referència completa de les variables i operacions disponibles, comproveu el botó pàgina d’ajuda."; +$a->strings["Your rules"] = "Les seves normes"; +$a->strings["You have no rules yet! Start adding one by clicking on the button above next to the title."] = "Encara no teniu normes. Comenceu a afegir-ne un fent clic al botó situat al costat del títol."; +$a->strings["Disabled"] = "Desactivat"; +$a->strings["Enabled"] = "Permetre"; +$a->strings["Disable this rule"] = "Desactiva aquesta regla"; +$a->strings["Enable this rule"] = "Activa aquesta regla"; +$a->strings["Edit this rule"] = "Edita aquesta regla"; +$a->strings["Edit the rule"] = "Edita la regla"; +$a->strings["Save this rule"] = "Deseu aquesta regla"; +$a->strings["Delete this rule"] = "Suprimeix aquesta regla"; +$a->strings["Rule"] = "Regla"; +$a->strings["Close"] = "Tancar"; +$a->strings["Add new rule"] = "Add nova regla"; +$a->strings["Rule Name"] = "Nom de la regla"; +$a->strings["Rule Expression"] = "Expressió de regla"; +$a->strings["

Examples:

  • author_link == 'https://friendica.mrpetovan.com/profile/hypolite'
  • tags
"] = "

Exemples:

  • author_link == 'https://friendica.mrpetovan.com/profile/hypolite'
  • tags
"; +$a->strings["Cancel"] = "cancel·lar"; +$a->strings["You must be logged in to use this method"] = "Per utilitzar aquest mètode, heu d’iniciar sessió"; +$a->strings["Invalid form security token, please refresh the page."] = "El testimoni de seguretat del formulari no és vàlid. Actualitza la pàgina"; +$a->strings["The rule name and expression are required."] = "El nom i l’expressió de la regla són obligatoris"; +$a->strings["Rule successfully added"] = "La regla s'ha afegit correctament"; +$a->strings["Rule doesn't exist or doesn't belong to you."] = "La regla no existeix o no us pertany."; +$a->strings["Rule successfully updated"] = "La regla s'ha actualitzat correctament"; +$a->strings["Rule successfully deleted"] = "S'ha suprimit la regla correctament"; +$a->strings["Missing argument: guid."] = "Falta un argument: guia"; +$a->strings["Unknown post with guid: %s"] = "Publicació desconeguda amb guia: %s"; +$a->strings["Method not found"] = "Mètode no trobat"; -- 2.43.5 From 9481be42701dce9857f94e7c47b4ee317d8b52bf Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 08:12:57 +0100 Subject: [PATCH 04/40] blogger addon updated CA translation THX Joan Bar --- blogger/lang/ca/messages.po | 8 ++++---- blogger/lang/ca/strings.php | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/blogger/lang/ca/messages.po b/blogger/lang/ca/messages.po index 3f2a8791..fa2be53c 100644 --- a/blogger/lang/ca/messages.po +++ b/blogger/lang/ca/messages.po @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-06-22 13:18+0200\n" -"PO-Revision-Date: 2019-10-14 00:46+0000\n" +"PO-Revision-Date: 2019-10-14 11:51+0000\n" "Last-Translator: Joan Bar \n" "Language-Team: Catalan (http://www.transifex.com/Friendica/friendica/language/ca/)\n" "MIME-Version: 1.0\n" @@ -21,7 +21,7 @@ msgstr "" #: blogger.php:42 msgid "Post to blogger" -msgstr "" +msgstr "Publicar a blogger" #: blogger.php:74 blogger.php:78 msgid "Blogger Export" @@ -29,7 +29,7 @@ msgstr "Exportació de Blogger" #: blogger.php:82 msgid "Enable Blogger Post Addon" -msgstr "" +msgstr "Habilita Addon Post de Blogger" #: blogger.php:87 msgid "Blogger username" @@ -37,7 +37,7 @@ msgstr "Nom d'usuari de Blogger" #: blogger.php:92 msgid "Blogger password" -msgstr "" +msgstr "Contrasenya de Blogger" #: blogger.php:97 msgid "Blogger API URL" diff --git a/blogger/lang/ca/strings.php b/blogger/lang/ca/strings.php index 3d48f296..afac5d7f 100644 --- a/blogger/lang/ca/strings.php +++ b/blogger/lang/ca/strings.php @@ -6,11 +6,11 @@ function string_plural_select_ca($n){ return ($n != 1);; }} ; -$a->strings["Post to blogger"] = ""; +$a->strings["Post to blogger"] = "Publicar a blogger"; $a->strings["Blogger Export"] = "Exportació de Blogger"; -$a->strings["Enable Blogger Post Addon"] = ""; +$a->strings["Enable Blogger Post Addon"] = "Habilita Addon Post de Blogger"; $a->strings["Blogger username"] = "Nom d'usuari de Blogger"; -$a->strings["Blogger password"] = ""; +$a->strings["Blogger password"] = "Contrasenya de Blogger"; $a->strings["Blogger API URL"] = "URL de l'API de Blogger"; $a->strings["Post to Blogger by default"] = "Publica a Blogger de manera predeterminada"; $a->strings["Save Settings"] = "Desa la configuració"; -- 2.43.5 From d74c5ff0f91a63c014173dca147f07cc4d5c0240 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 08:14:58 +0100 Subject: [PATCH 05/40] buffer addon updated CA translation THX Joan Bar --- buffer/lang/ca/messages.po | 28 ++++++++++++++-------------- buffer/lang/ca/strings.php | 26 +++++++++++++------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/buffer/lang/ca/messages.po b/buffer/lang/ca/messages.po index f064df8b..4a3490fc 100644 --- a/buffer/lang/ca/messages.po +++ b/buffer/lang/ca/messages.po @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-06-22 13:18+0200\n" -"PO-Revision-Date: 2019-10-14 00:41+0000\n" +"PO-Revision-Date: 2019-10-14 18:57+0000\n" "Last-Translator: Joan Bar \n" "Language-Team: Catalan (http://www.transifex.com/Friendica/friendica/language/ca/)\n" "MIME-Version: 1.0\n" @@ -21,35 +21,35 @@ msgstr "" #: buffer.php:31 msgid "Permission denied." -msgstr "" +msgstr "Permís denegat." #: buffer.php:57 buffer.php:185 msgid "Save Settings" -msgstr "" +msgstr "Desa la configuració" #: buffer.php:59 msgid "Client ID" -msgstr "" +msgstr "Identificador de client" #: buffer.php:60 msgid "Client Secret" -msgstr "" +msgstr "Secret del client" #: buffer.php:67 msgid "Error when registering buffer connection:" -msgstr "" +msgstr "Error al registrar la connexió del buffer:" #: buffer.php:86 msgid "You are now authenticated to buffer. " -msgstr "" +msgstr "Ara esteu autenticats com a buffer." #: buffer.php:87 msgid "return to the connector page" -msgstr "" +msgstr "Torna a la pàgina del connector" #: buffer.php:103 msgid "Post to Buffer" -msgstr "" +msgstr "Publica a Buffer" #: buffer.php:128 buffer.php:132 msgid "Buffer Export" @@ -57,20 +57,20 @@ msgstr "Exportació de buffer" #: buffer.php:142 msgid "Authenticate your Buffer connection" -msgstr "" +msgstr "Autentiqueu la vostra connexió buffer" #: buffer.php:146 msgid "Enable Buffer Post Addon" -msgstr "" +msgstr "Activa l’addició de missatges de buffer" #: buffer.php:151 msgid "Post to Buffer by default" -msgstr "" +msgstr "Publica a Buffer de manera predeterminada" #: buffer.php:156 msgid "Check to delete this preset" -msgstr "" +msgstr "Comproveu suprimir aquesta configuració" #: buffer.php:165 msgid "Posts are going to all accounts that are enabled by default:" -msgstr "" +msgstr "Les publicacions aniran a tots els comptes que estan habilitats de manera predeterminada:" diff --git a/buffer/lang/ca/strings.php b/buffer/lang/ca/strings.php index 2f8a897e..d0cdce88 100644 --- a/buffer/lang/ca/strings.php +++ b/buffer/lang/ca/strings.php @@ -6,17 +6,17 @@ function string_plural_select_ca($n){ return ($n != 1);; }} ; -$a->strings["Permission denied."] = ""; -$a->strings["Save Settings"] = ""; -$a->strings["Client ID"] = ""; -$a->strings["Client Secret"] = ""; -$a->strings["Error when registering buffer connection:"] = ""; -$a->strings["You are now authenticated to buffer. "] = ""; -$a->strings["return to the connector page"] = ""; -$a->strings["Post to Buffer"] = ""; +$a->strings["Permission denied."] = "Permís denegat."; +$a->strings["Save Settings"] = "Desa la configuració"; +$a->strings["Client ID"] = "Identificador de client"; +$a->strings["Client Secret"] = "Secret del client"; +$a->strings["Error when registering buffer connection:"] = "Error al registrar la connexió del buffer:"; +$a->strings["You are now authenticated to buffer. "] = "Ara esteu autenticats com a buffer."; +$a->strings["return to the connector page"] = "Torna a la pàgina del connector"; +$a->strings["Post to Buffer"] = "Publica a Buffer"; $a->strings["Buffer Export"] = "Exportació de buffer"; -$a->strings["Authenticate your Buffer connection"] = ""; -$a->strings["Enable Buffer Post Addon"] = ""; -$a->strings["Post to Buffer by default"] = ""; -$a->strings["Check to delete this preset"] = ""; -$a->strings["Posts are going to all accounts that are enabled by default:"] = ""; +$a->strings["Authenticate your Buffer connection"] = "Autentiqueu la vostra connexió buffer"; +$a->strings["Enable Buffer Post Addon"] = "Activa l’addició de missatges de buffer"; +$a->strings["Post to Buffer by default"] = "Publica a Buffer de manera predeterminada"; +$a->strings["Check to delete this preset"] = "Comproveu suprimir aquesta configuració"; +$a->strings["Posts are going to all accounts that are enabled by default:"] = "Les publicacions aniran a tots els comptes que estan habilitats de manera predeterminada:"; -- 2.43.5 From a294b8129311b1eef6fd975b202f29e8f4bae3fb Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 08:22:55 +0100 Subject: [PATCH 06/40] blockbot addon added CA translation THX Joan Bar --- blockbot/lang/ca/messages.po | 42 ++++++++++++++++++++++++++++++++++++ blockbot/lang/ca/strings.php | 13 +++++++++++ 2 files changed, 55 insertions(+) create mode 100644 blockbot/lang/ca/messages.po create mode 100644 blockbot/lang/ca/strings.php diff --git a/blockbot/lang/ca/messages.po b/blockbot/lang/ca/messages.po new file mode 100644 index 00000000..521f1d44 --- /dev/null +++ b/blockbot/lang/ca/messages.po @@ -0,0 +1,42 @@ +# ADDON blockbot +# Copyright (C) +# This file is distributed under the same license as the Friendica blockbot addon package. +# +# +# Translators: +# Joan Bar , 2019 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-08-07 09:03+0200\n" +"PO-Revision-Date: 2019-08-07 07:43+0000\n" +"Last-Translator: Joan Bar , 2019\n" +"Language-Team: Catalan (https://www.transifex.com/Friendica/teams/12172/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: blockbot.php:35 +msgid "Save Settings" +msgstr "Desa la configuració" + +#: blockbot.php:36 +msgid "Allow \"good\" crawlers" +msgstr "Permeti rastrejadors \"bons\"" + +#: blockbot.php:37 +msgid "Block GabSocial" +msgstr "Bloquejar GabSocial" + +#: blockbot.php:38 +msgid "Training mode" +msgstr "Modalitat d'entrenament" + +#: blockbot.php:46 +msgid "Settings updated." +msgstr "La configuració s'ha actualitzat." diff --git a/blockbot/lang/ca/strings.php b/blockbot/lang/ca/strings.php new file mode 100644 index 00000000..3f95ee05 --- /dev/null +++ b/blockbot/lang/ca/strings.php @@ -0,0 +1,13 @@ +strings["Save Settings"] = "Desa la configuració"; +$a->strings["Allow \"good\" crawlers"] = "Permeti rastrejadors \"bons\""; +$a->strings["Block GabSocial"] = "Bloquejar GabSocial"; +$a->strings["Training mode"] = "Modalitat d'entrenament"; +$a->strings["Settings updated."] = "La configuració s'ha actualitzat."; -- 2.43.5 From 71ad9386e17d2f92c1a7f46de68038c485e928e4 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 08:24:43 +0100 Subject: [PATCH 07/40] blockem addon updated CA translation THX Joan Bar --- blockem/lang/ca/messages.po | 59 +++++++++++++++++++++++++++++++++++++ blockem/lang/ca/strings.php | 27 ++++++++++------- 2 files changed, 76 insertions(+), 10 deletions(-) create mode 100644 blockem/lang/ca/messages.po diff --git a/blockem/lang/ca/messages.po b/blockem/lang/ca/messages.po new file mode 100644 index 00000000..6d4c3468 --- /dev/null +++ b/blockem/lang/ca/messages.po @@ -0,0 +1,59 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# Joan Bar , 2019 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-08-17 10:23+0200\n" +"PO-Revision-Date: 2019-10-14 11:50+0000\n" +"Last-Translator: Joan Bar \n" +"Language-Team: Catalan (http://www.transifex.com/Friendica/friendica/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: blockem.php:54 blockem.php:58 +msgid "Blockem" +msgstr "Blockem" + +#: blockem.php:62 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "Amaga el contingut de l'usuari mitjançant la publicació col·lapsada. També substitueix el seu avatar per una imatge genèrica" + +#: blockem.php:63 +msgid "Comma separated profile URLS:" +msgstr "URL de perfil separats per comes:" + +#: blockem.php:67 +msgid "Save Settings" +msgstr "Desa la configuració" + +#: blockem.php:81 +msgid "BLOCKEM Settings saved." +msgstr "S'ha desat la configuració de BLOCKEM." + +#: blockem.php:143 +#, php-format +msgid "Filtered user: %s" +msgstr "Usuari filtrat:%s" + +#: blockem.php:202 +msgid "Unblock Author" +msgstr "Desbloca l'autor" + +#: blockem.php:204 +msgid "Block Author" +msgstr "Autor de bloc" + +#: blockem.php:244 +msgid "blockem settings updated" +msgstr "S'ha actualitzat la configuració de blockem" diff --git a/blockem/lang/ca/strings.php b/blockem/lang/ca/strings.php index 5587acd2..057a6019 100644 --- a/blockem/lang/ca/strings.php +++ b/blockem/lang/ca/strings.php @@ -1,10 +1,17 @@ -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"; +strings["Blockem"] = "Blockem"; +$a->strings["Hides user's content by collapsing posts. Also replaces their avatar with generic image."] = "Amaga el contingut de l'usuari mitjançant la publicació col·lapsada. També substitueix el seu avatar per una imatge genèrica"; +$a->strings["Comma separated profile URLS:"] = "URL de perfil separats per comes:"; +$a->strings["Save Settings"] = "Desa la configuració"; +$a->strings["BLOCKEM Settings saved."] = "S'ha desat la configuració de BLOCKEM."; +$a->strings["Filtered user: %s"] = "Usuari filtrat:%s"; +$a->strings["Unblock Author"] = "Desbloca l'autor"; +$a->strings["Block Author"] = "Autor de bloc"; +$a->strings["blockem settings updated"] = "S'ha actualitzat la configuració de blockem"; -- 2.43.5 From 35b3a31ad65b7ec6f7ab5eaad1976ecee58605a1 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 08:26:23 +0100 Subject: [PATCH 08/40] buglink addon updated CA translation THX Joan Bar --- buglink/lang/ca/messages.po | 24 ++++++++++++++++++++++++ buglink/lang/ca/strings.php | 12 +++++++++--- 2 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 buglink/lang/ca/messages.po diff --git a/buglink/lang/ca/messages.po b/buglink/lang/ca/messages.po new file mode 100644 index 00000000..ccefc48b --- /dev/null +++ b/buglink/lang/ca/messages.po @@ -0,0 +1,24 @@ +# ADDON buglink +# Copyright (C) +# This file is distributed under the same license as the Friendica buglink addon package. +# +# +# Translators: +# Joan Bar , 2019 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-06-22 13:18+0200\n" +"PO-Revision-Date: 2019-10-14 18:57+0000\n" +"Last-Translator: Joan Bar \n" +"Language-Team: Catalan (http://www.transifex.com/Friendica/friendica/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: buglink.php:15 +msgid "Report Bug" +msgstr "Informar d’error" diff --git a/buglink/lang/ca/strings.php b/buglink/lang/ca/strings.php index 01fc9adb..a818f5df 100644 --- a/buglink/lang/ca/strings.php +++ b/buglink/lang/ca/strings.php @@ -1,3 +1,9 @@ -strings["Report Bug"] = "Informar de problema"; +strings["Report Bug"] = "Informar d’error"; -- 2.43.5 From 1526e8768d17af5bd5ecae4209956638c4a28d9a Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 08:28:14 +0100 Subject: [PATCH 09/40] catavatar addon added CA translation THX Joan Bar --- catavatar/lang/ca/messages.po | 54 +++++++++++++++++++++++++++++++++++ catavatar/lang/ca/strings.php | 16 +++++++++++ 2 files changed, 70 insertions(+) create mode 100644 catavatar/lang/ca/messages.po create mode 100644 catavatar/lang/ca/strings.php diff --git a/catavatar/lang/ca/messages.po b/catavatar/lang/ca/messages.po new file mode 100644 index 00000000..7a6b6122 --- /dev/null +++ b/catavatar/lang/ca/messages.po @@ -0,0 +1,54 @@ +# ADDON catavatar +# Copyright (C) +# This file is distributed under the same license as the Friendica catavatar addon package. +# +# +# Translators: +# Joan Bar , 2019 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-04-13 09:35+0000\n" +"PO-Revision-Date: 2018-04-07 05:23+0000\n" +"Last-Translator: Joan Bar , 2019\n" +"Language-Team: Catalan (https://www.transifex.com/Friendica/teams/12172/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: catavatar.php:60 +msgid "Use Cat as Avatar" +msgstr "Utilitzeu Gat com a Avatar" + +#: catavatar.php:61 +msgid "More Random Cat!" +msgstr "Més Random Cat!" + +#: catavatar.php:62 +msgid "Reset to email Cat" +msgstr "Restableix el correu electrònic Cat" + +#: catavatar.php:64 +msgid "Cat Avatar Settings" +msgstr "Configuració Avatar de cat" + +#: catavatar.php:100 +msgid "The cat hadn't found itself." +msgstr "El gat no s'havia trobat." + +#: catavatar.php:109 +msgid "There was an error, the cat ran away." +msgstr "Hi va haver un error, el gat va fugir." + +#: catavatar.php:115 +msgid "Profile Photos" +msgstr "Fotos de perfil" + +#: catavatar.php:130 +msgid "Meow!" +msgstr "Meu!" diff --git a/catavatar/lang/ca/strings.php b/catavatar/lang/ca/strings.php new file mode 100644 index 00000000..cb62f492 --- /dev/null +++ b/catavatar/lang/ca/strings.php @@ -0,0 +1,16 @@ +strings["Use Cat as Avatar"] = "Utilitzeu Gat com a Avatar"; +$a->strings["More Random Cat!"] = "Més Random Cat!"; +$a->strings["Reset to email Cat"] = "Restableix el correu electrònic Cat"; +$a->strings["Cat Avatar Settings"] = "Configuració Avatar de cat"; +$a->strings["The cat hadn't found itself."] = "El gat no s'havia trobat."; +$a->strings["There was an error, the cat ran away."] = "Hi va haver un error, el gat va fugir."; +$a->strings["Profile Photos"] = "Fotos de perfil"; +$a->strings["Meow!"] = "Meu!"; -- 2.43.5 From 9561b4092600f57c2b5a4048815f42d19ed1a704 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 08:30:50 +0100 Subject: [PATCH 10/40] gravatar addon updated CA translation THX Joan Bar --- gravatar/lang/ca/messages.po | 75 ++++++++++++++++++++++++++++++++++++ gravatar/lang/ca/strings.php | 36 +++++++++-------- 2 files changed, 96 insertions(+), 15 deletions(-) create mode 100644 gravatar/lang/ca/messages.po diff --git a/gravatar/lang/ca/messages.po b/gravatar/lang/ca/messages.po new file mode 100644 index 00000000..1b86ea16 --- /dev/null +++ b/gravatar/lang/ca/messages.po @@ -0,0 +1,75 @@ +# ADDON gravatar +# Copyright (C) +# This file is distributed under the same license as the Friendica gravatar addon package. +# +# +# Translators: +# Joan Bar , 2019 +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: 2019-10-18 18:47+0000\n" +"Last-Translator: Joan Bar \n" +"Language-Team: Catalan (http://www.transifex.com/Friendica/friendica/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: gravatar.php:71 +msgid "generic profile image" +msgstr "imatge de perfil genèrica" + +#: gravatar.php:72 +msgid "random geometric pattern" +msgstr "patró geomètric aleatori" + +#: gravatar.php:73 +msgid "monster face" +msgstr "cara de monstre" + +#: gravatar.php:74 +msgid "computer generated face" +msgstr "cara generada per ordinador" + +#: gravatar.php:75 +msgid "retro arcade style face" +msgstr "cara d’estil d’arcades retro" + +#: gravatar.php:89 +msgid "Information" +msgstr "Informació" + +#: gravatar.php:89 +msgid "" +"Libravatar addon is installed, too. Please disable Libravatar addon or this " +"Gravatar addon.
The Libravatar addon will fall back to Gravatar if " +"nothing was found at Libravatar." +msgstr "També hi ha instal·lat l’addon Libravatar. Inhabiliteu l'addon Libravatar o aquest addon Gravatar.
Si no es va trobar res a Libravatar, l'afegit de Libravatar tornarà a aparèixer a Gravatar." + +#: gravatar.php:95 +msgid "Submit" +msgstr "Presentar" + +#: gravatar.php:96 +msgid "Default avatar image" +msgstr "Imatge predeterminada d’avatar" + +#: gravatar.php:96 +msgid "Select default avatar image if none was found at Gravatar. See README" +msgstr "Seleccioneu la imatge d'avatar per defecte si no s'ha trobat cap a Gravatar. Vegeu LLEGIR" + +#: gravatar.php:97 +msgid "Rating of images" +msgstr "Valoració d'imatges" + +#: gravatar.php:97 +msgid "Select the appropriate avatar rating for your site. See README" +msgstr "Seleccioneu la qualificació d'avatar adequada per al vostre lloc. Vegeu LLEGIR" + +#: gravatar.php:111 +msgid "Gravatar settings updated." +msgstr "S'han actualitzat els paràmetres de Gravatar." diff --git a/gravatar/lang/ca/strings.php b/gravatar/lang/ca/strings.php index 44a7ff8c..2c950e4c 100644 --- a/gravatar/lang/ca/strings.php +++ b/gravatar/lang/ca/strings.php @@ -1,15 +1,21 @@ -strings["generic profile image"] = "imatge de perfil genérica"; -$a->strings["random geometric pattern"] = "Patró geometric aleatori"; -$a->strings["monster face"] = "Cara monstruosa"; -$a->strings["computer generated face"] = "Cara monstruosa generada per ordinador"; -$a->strings["retro arcade style face"] = "Cara d'estil arcade retro"; -$a->strings["Information"] = "informació"; -$a->strings["Libravatar addon is installed, too. Please disable Libravatar addon or this Gravatar addon.
The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar."] = ""; -$a->strings["Submit"] = "Enviar"; -$a->strings["Default avatar image"] = "Imatge d'avatar per defecte"; -$a->strings["Select default avatar image if none was found at Gravatar. See README"] = "Se selecciona la imatge d'avatar per defecte si no es troba cap en Gravatar. Veure el README"; -$a->strings["Rating of images"] = "Classificació de les imatges"; -$a->strings["Select the appropriate avatar rating for your site. See README"] = "Selecciona la classe d'avatar apropiat pel teu lloc. Veure el README"; -$a->strings["Gravatar settings updated."] = "Ajustos de Gravatar actualitzats."; +strings["generic profile image"] = "imatge de perfil genèrica"; +$a->strings["random geometric pattern"] = "patró geomètric aleatori"; +$a->strings["monster face"] = "cara de monstre"; +$a->strings["computer generated face"] = "cara generada per ordinador"; +$a->strings["retro arcade style face"] = "cara d’estil d’arcades retro"; +$a->strings["Information"] = "Informació"; +$a->strings["Libravatar addon is installed, too. Please disable Libravatar addon or this Gravatar addon.
The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar."] = "També hi ha instal·lat l’addon Libravatar. Inhabiliteu l'addon Libravatar o aquest addon Gravatar.
Si no es va trobar res a Libravatar, l'afegit de Libravatar tornarà a aparèixer a Gravatar."; +$a->strings["Submit"] = "Presentar"; +$a->strings["Default avatar image"] = "Imatge predeterminada d’avatar"; +$a->strings["Select default avatar image if none was found at Gravatar. See README"] = "Seleccioneu la imatge d'avatar per defecte si no s'ha trobat cap a Gravatar. Vegeu LLEGIR"; +$a->strings["Rating of images"] = "Valoració d'imatges"; +$a->strings["Select the appropriate avatar rating for your site. See README"] = "Seleccioneu la qualificació d'avatar adequada per al vostre lloc. Vegeu LLEGIR"; +$a->strings["Gravatar settings updated."] = "S'han actualitzat els paràmetres de Gravatar."; -- 2.43.5 From fac60aad39f184abc9c47f52c8fb5411e9e73749 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 08:45:33 +0100 Subject: [PATCH 11/40] cookienotive addon added CA translation THX Joan Bar --- cookienotice/lang/ca/messages.po | 81 ++++++++++++++++++++++++++++++++ cookienotice/lang/ca/strings.php | 19 ++++++++ 2 files changed, 100 insertions(+) create mode 100644 cookienotice/lang/ca/messages.po create mode 100644 cookienotice/lang/ca/strings.php diff --git a/cookienotice/lang/ca/messages.po b/cookienotice/lang/ca/messages.po new file mode 100644 index 00000000..37483426 --- /dev/null +++ b/cookienotice/lang/ca/messages.po @@ -0,0 +1,81 @@ +# ADDON cookienotice +# Copyright (C) +# This file is distributed under the same license as the Friendica cookienotice addon package. +# +# +# Translators: +# Joan Bar , 2019 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-01-30 10:48+0100\n" +"PO-Revision-Date: 2019-01-23 16:01+0000\n" +"Last-Translator: Joan Bar , 2019\n" +"Language-Team: Catalan (https://www.transifex.com/Friendica/teams/12172/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cookienotice.php:63 +msgid "" +"This website uses cookies. If you continue browsing this website, you agree " +"to the usage of cookies." +msgstr "" +"Aquest lloc web utilitza cookies. Si continueu navegant per aquest lloc web," +" esteu d’acord amb l’ús de cookies." + +#: cookienotice.php:64 cookienotice.php:133 +msgid "OK" +msgstr "D'acord" + +#: cookienotice.php:68 +msgid "\"cookienotice\" Settings" +msgstr "Configuració 'cookienotice'" + +#: cookienotice.php:69 +msgid "" +"Configure your cookie usage notice. It should just be a notice, " +"saying that the website uses cookies. It is shown as long as a user didnt " +"confirm clicking the OK button." +msgstr "" +"Configureu l’avís d’ús de cookies. Només hauria de ser un avís, dient" +" que el lloc web utilitza cookies. Es mostra sempre que un usuari no " +"confirmi el seu clic al botó D'acord" + +#: cookienotice.php:70 +msgid "Cookie Usage Notice" +msgstr "Avís d’ús de cookies" + +#: cookienotice.php:70 +msgid "The cookie usage notice" +msgstr "L’avís d’ús de cookies" + +#: cookienotice.php:71 +msgid "OK Button Text" +msgstr "Text del botó d’acord" + +#: cookienotice.php:71 +msgid "The OK Button text" +msgstr "Text del botó D'acord" + +#: cookienotice.php:72 +msgid "Save Settings" +msgstr "Desa la configuració" + +#: cookienotice.php:97 +msgid "cookienotice Settings saved." +msgstr "Cookienotice S'ha desat la configuració." + +#: cookienotice.php:132 +msgid "" +"This website uses cookies to recognize revisiting and logged in users. You " +"accept the usage of these cookies by continue browsing this website." +msgstr "" +"Aquest lloc web utilitza cookies per reconèixer la revisió i la sessió " +"d’usuaris. Accepteu l’ús d’aquestes cookies continuant navegant per aquest " +"lloc web." diff --git a/cookienotice/lang/ca/strings.php b/cookienotice/lang/ca/strings.php new file mode 100644 index 00000000..fd662e21 --- /dev/null +++ b/cookienotice/lang/ca/strings.php @@ -0,0 +1,19 @@ +strings["This website uses cookies. If you continue browsing this website, you agree to the usage of cookies."] = "Aquest lloc web utilitza cookies. Si continueu navegant per aquest lloc web, esteu d’acord amb l’ús de cookies."; +$a->strings["OK"] = "D'acord"; +$a->strings["\"cookienotice\" Settings"] = "Configuració 'cookienotice'"; +$a->strings["Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button."] = "Configureu l’avís d’ús de cookies. Només hauria de ser un avís, dient que el lloc web utilitza cookies. Es mostra sempre que un usuari no confirmi el seu clic al botó D'acord"; +$a->strings["Cookie Usage Notice"] = "Avís d’ús de cookies"; +$a->strings["The cookie usage notice"] = "L’avís d’ús de cookies"; +$a->strings["OK Button Text"] = "Text del botó d’acord"; +$a->strings["The OK Button text"] = "Text del botó D'acord"; +$a->strings["Save Settings"] = "Desa la configuració"; +$a->strings["cookienotice Settings saved."] = "Cookienotice S'ha desat la configuració."; +$a->strings["This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website."] = "Aquest lloc web utilitza cookies per reconèixer la revisió i la sessió d’usuaris. Accepteu l’ús d’aquestes cookies continuant navegant per aquest lloc web."; -- 2.43.5 From cc7ea016abae5f3655a695e62b2b81686915d2bc Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 08:47:02 +0100 Subject: [PATCH 12/40] curweather addon updates CA translation THX Joan Bar --- curweather/lang/ca/messages.po | 132 +++++++++++++++++++++++++++++++++ curweather/lang/ca/strings.php | 38 +++++++++- 2 files changed, 167 insertions(+), 3 deletions(-) create mode 100644 curweather/lang/ca/messages.po diff --git a/curweather/lang/ca/messages.po b/curweather/lang/ca/messages.po new file mode 100644 index 00000000..3e7d2dbf --- /dev/null +++ b/curweather/lang/ca/messages.po @@ -0,0 +1,132 @@ +# ADDON curweather +# Copyright (C) +# This file is distributed under the same license as the Friendica curweather addon package. +# +# +# Translators: +# Joan Bar , 2019 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-09-25 17:17+0200\n" +"PO-Revision-Date: 2019-10-18 18:31+0000\n" +"Last-Translator: Joan Bar \n" +"Language-Team: Catalan (http://www.transifex.com/Friendica/friendica/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: curweather.php:31 +msgid "Error fetching weather data.\\nError was: " +msgstr "S'ha produït un error en recuperar les dades meteorològiques. \\\\ NEror ha estat:" + +#: curweather.php:111 curweather.php:172 +msgid "Current Weather" +msgstr "Temps actual" + +#: curweather.php:118 +msgid "Relative Humidity" +msgstr "Humitat relativa" + +#: curweather.php:119 +msgid "Pressure" +msgstr "pressió" + +#: curweather.php:120 +msgid "Wind" +msgstr "vent" + +#: curweather.php:121 +msgid "Last Updated" +msgstr "Última actualització" + +#: curweather.php:122 +msgid "Data by" +msgstr "Dades de" + +#: curweather.php:123 +msgid "Show on map" +msgstr "Mostra al mapa" + +#: curweather.php:128 +msgid "There was a problem accessing the weather data. But have a look" +msgstr "S'ha produït un problema en accedir a les dades meteorològiques. Però mireu-ho" + +#: curweather.php:130 +msgid "at OpenWeatherMap" +msgstr "a OpenWeatherMap" + +#: curweather.php:146 +msgid "Current Weather settings updated." +msgstr "S'ha actualitzat la configuració meteorològica actual." + +#: curweather.php:161 +msgid "No APPID found, please contact your admin to obtain one." +msgstr "No s'ha trobat cap APPID. Poseu-vos en contacte amb l'administrador per obtenir-ne una." + +#: curweather.php:171 curweather.php:200 +msgid "Save Settings" +msgstr "Desa la configuració" + +#: curweather.php:172 +msgid "Settings" +msgstr "Configuració" + +#: curweather.php:174 +msgid "Enter either the name of your location or the zip code." +msgstr "Introduïu el nom de la vostra ubicació o el codi postal." + +#: curweather.php:175 +msgid "Your Location" +msgstr "La teva localització" + +#: curweather.php:175 +msgid "" +"Identifier of your location (name or zip code), e.g. Berlin,DE or " +"14476,DE." +msgstr "Identificador de la vostra ubicació (nom o codi postal), e.g. Berlin,DE or 14476,DE." + +#: curweather.php:176 +msgid "Units" +msgstr "unitat" + +#: curweather.php:176 +msgid "select if the temperature should be displayed in °C or °F" +msgstr "seleccioneu si la temperatura ha de mostrar-se en ° C o ° F" + +#: curweather.php:177 +msgid "Show weather data" +msgstr "Mostra dades meteorològiques" + +#: curweather.php:190 +msgid "Curweather settings saved." +msgstr "S'han desat els paràmetres de Curweather." + +#: curweather.php:201 +msgid "Caching Interval" +msgstr "Interval de cau" + +#: curweather.php:201 +msgid "" +"For how long should the weather data be cached? Choose according your " +"OpenWeatherMap account type." +msgstr "Per quant temps s’han de mantenir en memòria cau les dades meteorològiques? Trieu segons el vostre tipus de compte OpenWeatherMap." + +#: curweather.php:201 +msgid "no cache" +msgstr "no cau" + +#: curweather.php:201 +msgid "minutes" +msgstr "minuts" + +#: curweather.php:202 +msgid "Your APPID" +msgstr "La vostra APPID" + +#: curweather.php:202 +msgid "Your API key provided by OpenWeatherMap" +msgstr "La vostra clau d’API proporcionada per OpenWeatherMap" diff --git a/curweather/lang/ca/strings.php b/curweather/lang/ca/strings.php index 87481b12..4fed6616 100644 --- a/curweather/lang/ca/strings.php +++ b/curweather/lang/ca/strings.php @@ -1,3 +1,35 @@ -strings["Submit"] = "Enviar"; +strings["Error fetching weather data.\\nError was: "] = "S'ha produït un error en recuperar les dades meteorològiques. \\\\ NEror ha estat:"; +$a->strings["Current Weather"] = "Temps actual"; +$a->strings["Relative Humidity"] = "Humitat relativa"; +$a->strings["Pressure"] = "pressió"; +$a->strings["Wind"] = "vent"; +$a->strings["Last Updated"] = "Última actualització"; +$a->strings["Data by"] = "Dades de"; +$a->strings["Show on map"] = "Mostra al mapa"; +$a->strings["There was a problem accessing the weather data. But have a look"] = "S'ha produït un problema en accedir a les dades meteorològiques. Però mireu-ho"; +$a->strings["at OpenWeatherMap"] = "a OpenWeatherMap"; +$a->strings["Current Weather settings updated."] = "S'ha actualitzat la configuració meteorològica actual."; +$a->strings["No APPID found, please contact your admin to obtain one."] = "No s'ha trobat cap APPID. Poseu-vos en contacte amb l'administrador per obtenir-ne una."; +$a->strings["Save Settings"] = "Desa la configuració"; +$a->strings["Settings"] = "Configuració"; +$a->strings["Enter either the name of your location or the zip code."] = "Introduïu el nom de la vostra ubicació o el codi postal."; +$a->strings["Your Location"] = "La teva localització"; +$a->strings["Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE."] = "Identificador de la vostra ubicació (nom o codi postal), e.g. Berlin,DE or 14476,DE."; +$a->strings["Units"] = "unitat"; +$a->strings["select if the temperature should be displayed in °C or °F"] = "seleccioneu si la temperatura ha de mostrar-se en ° C o ° F"; +$a->strings["Show weather data"] = "Mostra dades meteorològiques"; +$a->strings["Curweather settings saved."] = "S'han desat els paràmetres de Curweather."; +$a->strings["Caching Interval"] = "Interval de cau"; +$a->strings["For how long should the weather data be cached? Choose according your OpenWeatherMap account type."] = "Per quant temps s’han de mantenir en memòria cau les dades meteorològiques? Trieu segons el vostre tipus de compte OpenWeatherMap."; +$a->strings["no cache"] = "no cau"; +$a->strings["minutes"] = "minuts"; +$a->strings["Your APPID"] = "La vostra APPID"; +$a->strings["Your API key provided by OpenWeatherMap"] = "La vostra clau d’API proporcionada per OpenWeatherMap"; -- 2.43.5 From 0a31d821515244ed55e63debcddeb84cfb7db8c1 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 08:48:46 +0100 Subject: [PATCH 13/40] diaspora addon added CA translation THX Joan Bar --- diaspora/lang/ca/messages.po | 62 ++++++++++++++++++++++++++++++++++++ diaspora/lang/ca/strings.php | 18 +++++++++++ 2 files changed, 80 insertions(+) create mode 100644 diaspora/lang/ca/messages.po create mode 100644 diaspora/lang/ca/strings.php diff --git a/diaspora/lang/ca/messages.po b/diaspora/lang/ca/messages.po new file mode 100644 index 00000000..236bf0b6 --- /dev/null +++ b/diaspora/lang/ca/messages.po @@ -0,0 +1,62 @@ +# ADDON diaspora +# Copyright (C) +# This file is distributed under the same license as the Friendica diaspora addon package. +# +# +# Translators: +# Joan Bar , 2019 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-06-22 13:18+0200\n" +"PO-Revision-Date: 2019-10-18 18:35+0000\n" +"Last-Translator: Joan Bar \n" +"Language-Team: Catalan (http://www.transifex.com/Friendica/friendica/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: diaspora.php:37 +msgid "Post to Diaspora" +msgstr "Publicar a diàspora" + +#: diaspora.php:142 +msgid "" +"Can't login to your Diaspora account. Please check username and password and" +" ensure you used the complete address (including http...)" +msgstr "No es pot iniciar la sessió al vostre compte de Diaspora. Comproveu nom d'usuari i contrasenya i assegureu-vos que heu utilitzat l'adreça completa (inclosa http ...)" + +#: diaspora.php:149 diaspora.php:153 +msgid "Diaspora Export" +msgstr "Exportació de diàspora" + +#: diaspora.php:163 +msgid "Enable Diaspora Post Addon" +msgstr "Habilita Addon Post de Diaspora" + +#: diaspora.php:168 +msgid "Diaspora username" +msgstr "Nom d'usuari de diàspora" + +#: diaspora.php:173 +msgid "Diaspora password" +msgstr "Contrasenya de diàspora" + +#: diaspora.php:178 +msgid "Diaspora site URL" +msgstr "URL del lloc de diàspora" + +#: diaspora.php:183 +msgid "Post to Diaspora by default" +msgstr "Publica a Diaspora de manera predeterminada" + +#: diaspora.php:189 +msgid "Save Settings" +msgstr "Desa la configuració" + +#: diaspora.php:324 +msgid "Diaspora post failed. Queued for retry." +msgstr "La publicació de la diàspora ha fallat Feu cua per tornar a provar." diff --git a/diaspora/lang/ca/strings.php b/diaspora/lang/ca/strings.php new file mode 100644 index 00000000..ce48df19 --- /dev/null +++ b/diaspora/lang/ca/strings.php @@ -0,0 +1,18 @@ +strings["Post to Diaspora"] = "Publicar a diàspora"; +$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "No es pot iniciar la sessió al vostre compte de Diaspora. Comproveu nom d'usuari i contrasenya i assegureu-vos que heu utilitzat l'adreça completa (inclosa http ...)"; +$a->strings["Diaspora Export"] = "Exportació de diàspora"; +$a->strings["Enable Diaspora Post Addon"] = "Habilita Addon Post de Diaspora"; +$a->strings["Diaspora username"] = "Nom d'usuari de diàspora"; +$a->strings["Diaspora password"] = "Contrasenya de diàspora"; +$a->strings["Diaspora site URL"] = "URL del lloc de diàspora"; +$a->strings["Post to Diaspora by default"] = "Publica a Diaspora de manera predeterminada"; +$a->strings["Save Settings"] = "Desa la configuració"; +$a->strings["Diaspora post failed. Queued for retry."] = "La publicació de la diàspora ha fallat Feu cua per tornar a provar."; -- 2.43.5 From 8fcd3e03da7c92636e883d19cf439b6683458134 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 08:49:54 +0100 Subject: [PATCH 14/40] gnot addon updated CA translation THX Joan Bar --- gnot/lang/ca/messages.po | 48 ++++++++++++++++++++++++++++++++++++++++ gnot/lang/ca/strings.php | 22 +++++++++++------- 2 files changed, 62 insertions(+), 8 deletions(-) create mode 100644 gnot/lang/ca/messages.po diff --git a/gnot/lang/ca/messages.po b/gnot/lang/ca/messages.po new file mode 100644 index 00000000..be2b159e --- /dev/null +++ b/gnot/lang/ca/messages.po @@ -0,0 +1,48 @@ +# ADDON gnot +# Copyright (C) +# This file is distributed under the same license as the Friendica gnot addon package. +# +# +# Translators: +# Joan Bar , 2019 +# Rafael Garau, 2018 +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: 2019-10-18 18:46+0000\n" +"Last-Translator: Joan Bar \n" +"Language-Team: Catalan (http://www.transifex.com/Friendica/friendica/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: gnot.php:48 +msgid "Gnot settings updated." +msgstr "S'ha actualitzat la configuració de Gnot." + +#: gnot.php:79 +msgid "Gnot Settings" +msgstr "Configuració de gnot" + +#: gnot.php:81 +msgid "" +"Allows threading of email comment notifications on Gmail and anonymising the" +" subject line." +msgstr "Permet llançar les notificacions de comentaris de correu electrònic a Gmail i anonimitzar la línia de l’assumpte." + +#: gnot.php:82 +msgid "Enable this addon?" +msgstr "Activar aquest addon?" + +#: gnot.php:88 +msgid "Submit" +msgstr "Envia" + +#: gnot.php:97 +#, php-format +msgid "[Friendica:Notify] Comment to conversation #%d" +msgstr "[Friendica:Notify] comenta la conversa #%d" diff --git a/gnot/lang/ca/strings.php b/gnot/lang/ca/strings.php index e65ec936..4a4187cf 100644 --- a/gnot/lang/ca/strings.php +++ b/gnot/lang/ca/strings.php @@ -1,8 +1,14 @@ -strings["Gnot settings updated."] = "Configuració de Gnot actualitzada"; -$a->strings["Gnot Settings"] = "Configuració de Gnot"; -$a->strings["Allows threading of email comment notifications on Gmail and anonymising the subject line."] = "Permet crear fils de les notificacions de comentaris de correu electrònic a Gmail i anonimat de la línia d'assumpte."; -$a->strings["Enable this addon?"] = "Activar aquest addon/aplicació?"; -$a->strings["Submit"] = "Enviar"; -$a->strings["[Friendica:Notify] Comment to conversation #%d"] = "[Friendica: Notifica] Conversació comentada #%d"; +strings["Gnot settings updated."] = "S'ha actualitzat la configuració de Gnot."; +$a->strings["Gnot Settings"] = "Configuració de gnot"; +$a->strings["Allows threading of email comment notifications on Gmail and anonymising the subject line."] = "Permet llançar les notificacions de comentaris de correu electrònic a Gmail i anonimitzar la línia de l’assumpte."; +$a->strings["Enable this addon?"] = "Activar aquest addon?"; +$a->strings["Submit"] = "Envia"; +$a->strings["[Friendica:Notify] Comment to conversation #%d"] = "[Friendica:Notify] comenta la conversa #%d"; -- 2.43.5 From d70054d40cef37b7631fbdc9ee94870cac18dca9 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 08:51:05 +0100 Subject: [PATCH 15/40] fromapp addon updated CA translation THX Joan Bar --- fromapp/lang/ca/messages.po | 43 +++++++++++++++++++++++++++++++++++++ fromapp/lang/ca/strings.php | 20 +++++++++++------ 2 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 fromapp/lang/ca/messages.po diff --git a/fromapp/lang/ca/messages.po b/fromapp/lang/ca/messages.po new file mode 100644 index 00000000..5cd22868 --- /dev/null +++ b/fromapp/lang/ca/messages.po @@ -0,0 +1,43 @@ +# ADDON fromapp +# Copyright (C) +# This file is distributed under the same license as the Friendica fromapp addon package. +# +# +# Translators: +# Joan Bar , 2019 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-02-19 16:42+0100\n" +"PO-Revision-Date: 2019-10-18 18:50+0000\n" +"Last-Translator: Joan Bar \n" +"Language-Team: Catalan (http://www.transifex.com/Friendica/friendica/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: fromapp.php:40 +msgid "Fromapp settings updated." +msgstr "S'ha actualitzat la configuració de Fromapp" + +#: fromapp.php:65 fromapp.php:69 +msgid "FromApp Settings" +msgstr "Configuració de FromApp" + +#: fromapp.php:72 +msgid "" +"The application name you would like to show your posts originating from. " +"Separate different app names with a comma. A random one will then be " +"selected for every posting." +msgstr "El nom de l'aplicació que voleu mostrar de les vostres publicacions originàries. Separeu diferents noms d'aplicacions amb una coma. A continuació, se seleccionarà un aleatori per a cada publicació." + +#: fromapp.php:76 +msgid "Use this application name even if another application was used." +msgstr "Utilitzeu aquest nom d’aplicació encara que s’hagi utilitzat una altra aplicació." + +#: fromapp.php:83 +msgid "Save Settings" +msgstr "Desa la Configuració" diff --git a/fromapp/lang/ca/strings.php b/fromapp/lang/ca/strings.php index ffa2b4d0..c24ff44d 100644 --- a/fromapp/lang/ca/strings.php +++ b/fromapp/lang/ca/strings.php @@ -1,7 +1,13 @@ -strings["Fromapp settings updated."] = ""; -$a->strings["FromApp Settings"] = ""; -$a->strings["The application name you would like to show your posts originating from."] = ""; -$a->strings["Use this application name even if another application was used."] = ""; -$a->strings["Submit"] = "Enviar"; +strings["Fromapp settings updated."] = "S'ha actualitzat la configuració de Fromapp"; +$a->strings["FromApp Settings"] = "Configuració de FromApp"; +$a->strings["The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting."] = "El nom de l'aplicació que voleu mostrar de les vostres publicacions originàries. Separeu diferents noms d'aplicacions amb una coma. A continuació, se seleccionarà un aleatori per a cada publicació."; +$a->strings["Use this application name even if another application was used."] = "Utilitzeu aquest nom d’aplicació encara que s’hagi utilitzat una altra aplicació."; +$a->strings["Save Settings"] = "Desa la Configuració"; -- 2.43.5 From 6e2f4ed949a7f2da448bc413c445ceeb086de6b8 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 09:33:35 +0100 Subject: [PATCH 16/40] ijpost addon updated CA translation THX Joan Bar --- ijpost/lang/ca/messages.po | 48 ++++++++++++++++++++++++++++++++++++++ ijpost/lang/ca/strings.php | 24 ++++++++++++------- 2 files changed, 63 insertions(+), 9 deletions(-) create mode 100644 ijpost/lang/ca/messages.po diff --git a/ijpost/lang/ca/messages.po b/ijpost/lang/ca/messages.po new file mode 100644 index 00000000..8bea3f16 --- /dev/null +++ b/ijpost/lang/ca/messages.po @@ -0,0 +1,48 @@ +# ADDON ijpost +# Copyright (C) +# This file is distributed under the same license as the Friendica ijpost addon package. +# +# +# Translators: +# Joan Bar , 2019 +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: 2019-10-18 18:53+0000\n" +"Last-Translator: Joan Bar \n" +"Language-Team: Catalan (http://www.transifex.com/Friendica/friendica/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ijpost.php:39 +msgid "Post to Insanejournal" +msgstr "Enviar a Insanejournal" + +#: ijpost.php:70 +msgid "InsaneJournal Post Settings" +msgstr "Configuració de la publicació de InsaneJournal" + +#: ijpost.php:72 +msgid "Enable InsaneJournal Post Addon" +msgstr "Activa la secció Addon InsaneJournal" + +#: ijpost.php:77 +msgid "InsaneJournal username" +msgstr "Nom d'usuari de InsaneJournal" + +#: ijpost.php:82 +msgid "InsaneJournal password" +msgstr "Contrasenya de InsaneJournal" + +#: ijpost.php:87 +msgid "Post to InsaneJournal by default" +msgstr "Publica-ho de manera predeterminada a InsaneJournal" + +#: ijpost.php:93 +msgid "Submit" +msgstr "sotmetre's" diff --git a/ijpost/lang/ca/strings.php b/ijpost/lang/ca/strings.php index a1f796d6..c0f8d9c0 100644 --- a/ijpost/lang/ca/strings.php +++ b/ijpost/lang/ca/strings.php @@ -1,9 +1,15 @@ -strings["Post to Insanejournal"] = "Enviament a Insanejournal"; -$a->strings["InsaneJournal Post Settings"] = "Ajustos d'Enviament a Insanejournal"; -$a->strings["Enable InsaneJournal Post Addon"] = "Habilita el Addon d'Enviaments a Insanejournal"; -$a->strings["InsaneJournal username"] = "Nom d'usuari de Insanejournal"; -$a->strings["InsaneJournal password"] = "Contrasenya de Insanejournal"; -$a->strings["Post to InsaneJournal by default"] = "Enviar per defecte a Insanejournal"; -$a->strings["Submit"] = "Enviar"; +strings["Post to Insanejournal"] = "Enviar a Insanejournal"; +$a->strings["InsaneJournal Post Settings"] = "Configuració de la publicació de InsaneJournal"; +$a->strings["Enable InsaneJournal Post Addon"] = "Activa la secció Addon InsaneJournal"; +$a->strings["InsaneJournal username"] = "Nom d'usuari de InsaneJournal"; +$a->strings["InsaneJournal password"] = "Contrasenya de InsaneJournal"; +$a->strings["Post to InsaneJournal by default"] = "Publica-ho de manera predeterminada a InsaneJournal"; +$a->strings["Submit"] = "sotmetre's"; -- 2.43.5 From 061a3bbd4f586ad254e941d29adb8433faef3022 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 09:35:02 +0100 Subject: [PATCH 17/40] forumdirectory addon updated CA translation THX Joan Bar --- forumdirectory/lang/ca/messages.po | 80 ++++++++++++++++++++++++++++++ forumdirectory/lang/ca/strings.php | 40 ++++++++------- 2 files changed, 103 insertions(+), 17 deletions(-) create mode 100644 forumdirectory/lang/ca/messages.po diff --git a/forumdirectory/lang/ca/messages.po b/forumdirectory/lang/ca/messages.po new file mode 100644 index 00000000..0aa19b1c --- /dev/null +++ b/forumdirectory/lang/ca/messages.po @@ -0,0 +1,80 @@ +# ADDON forumdirectory +# Copyright (C) +# This file is distributed under the same license as the Friendica forumdirectory addon package. +# +# +# Translators: +# Joan Bar , 2019 +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: 2019-10-18 18:57+0000\n" +"Last-Translator: Joan Bar \n" +"Language-Team: Catalan (http://www.transifex.com/Friendica/friendica/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: forumdirectory.php:22 +msgid "Forum Directory" +msgstr "Directori de fòrums" + +#: forumdirectory.php:53 +msgid "Public access denied." +msgstr "L'accés al públic s'ha denegat." + +#: forumdirectory.php:71 +msgid "Global Directory" +msgstr "Directori global" + +#: forumdirectory.php:79 +msgid "Find on this site" +msgstr "Cerqueu en aquest lloc" + +#: forumdirectory.php:81 +msgid "Finding: " +msgstr "Trobament:" + +#: forumdirectory.php:82 +msgid "Site Directory" +msgstr "Directori de llocs" + +#: forumdirectory.php:83 +msgid "Find" +msgstr "trobar" + +#: forumdirectory.php:133 +msgid "Age: " +msgstr "Edat:" + +#: forumdirectory.php:136 +msgid "Gender: " +msgstr "Gènere:" + +#: forumdirectory.php:156 +msgid "Location:" +msgstr "Ubicació:" + +#: forumdirectory.php:158 +msgid "Gender:" +msgstr "Gènere:" + +#: forumdirectory.php:160 +msgid "Status:" +msgstr "Estat:" + +#: forumdirectory.php:162 +msgid "Homepage:" +msgstr "Pàgina inicial:" + +#: forumdirectory.php:164 +msgid "About:" +msgstr "Sobre:" + +#: forumdirectory.php:201 +msgid "No entries (some entries may be hidden)." +msgstr "No hi ha entrades (algunes entrades poden estar ocultes)." diff --git a/forumdirectory/lang/ca/strings.php b/forumdirectory/lang/ca/strings.php index 63bfcb61..b8ba9d62 100644 --- a/forumdirectory/lang/ca/strings.php +++ b/forumdirectory/lang/ca/strings.php @@ -1,17 +1,23 @@ -strings["Forum Directory"] = ""; -$a->strings["Public access denied."] = "Accés públic denegat."; -$a->strings["Global Directory"] = "Directori Global"; -$a->strings["Find on this site"] = "Trobat en aquest lloc"; -$a->strings["Finding: "] = "Cercant:"; -$a->strings["Site Directory"] = "Directori Local"; -$a->strings["Find"] = "Cercar"; -$a->strings["Age: "] = "Edat:"; -$a->strings["Gender: "] = "Gènere:"; -$a->strings["Location:"] = "Ubicació:"; -$a->strings["Gender:"] = "Gènere:"; -$a->strings["Status:"] = "Estatus:"; -$a->strings["Homepage:"] = "Pàgina web:"; -$a->strings["About:"] = "Acerca de:"; -$a->strings["No entries (some entries may be hidden)."] = "No hi ha entrades (algunes de les entrades poden estar amagades)."; +strings["Forum Directory"] = "Directori de fòrums"; +$a->strings["Public access denied."] = "L'accés al públic s'ha denegat."; +$a->strings["Global Directory"] = "Directori global"; +$a->strings["Find on this site"] = "Cerqueu en aquest lloc"; +$a->strings["Finding: "] = "Trobament:"; +$a->strings["Site Directory"] = "Directori de llocs"; +$a->strings["Find"] = "trobar"; +$a->strings["Age: "] = "Edat:"; +$a->strings["Gender: "] = "Gènere:"; +$a->strings["Location:"] = "Ubicació:"; +$a->strings["Gender:"] = "Gènere:"; +$a->strings["Status:"] = "Estat:"; +$a->strings["Homepage:"] = "Pàgina inicial:"; +$a->strings["About:"] = "Sobre:"; +$a->strings["No entries (some entries may be hidden)."] = "No hi ha entrades (algunes entrades poden estar ocultes)."; -- 2.43.5 From 807ad657bfacf0ec1f9027e4e4b04750ae86808e Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 09:38:09 +0100 Subject: [PATCH 18/40] dwpost addon updated CA translation THX Joan Bar --- dwpost/lang/ca/messages.po | 48 ++++++++++++++++++++++++++++++++++++++ dwpost/lang/ca/strings.php | 24 ++++++++++++------- 2 files changed, 63 insertions(+), 9 deletions(-) create mode 100644 dwpost/lang/ca/messages.po diff --git a/dwpost/lang/ca/messages.po b/dwpost/lang/ca/messages.po new file mode 100644 index 00000000..e1fbf94d --- /dev/null +++ b/dwpost/lang/ca/messages.po @@ -0,0 +1,48 @@ +# ADDON dwpost +# Copyright (C) +# This file is distributed under the same license as the Friendica dwpost addon package. +# +# +# Translators: +# Joan Bar , 2019 +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: 2019-10-18 20:49+0000\n" +"Last-Translator: Joan Bar \n" +"Language-Team: Catalan (http://www.transifex.com/Friendica/friendica/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: dwpost.php:39 +msgid "Post to Dreamwidth" +msgstr "Publica a Dreamwidth" + +#: dwpost.php:70 +msgid "Dreamwidth Post Settings" +msgstr "Configuració de la publicació de Dreamwidth" + +#: dwpost.php:72 +msgid "Enable dreamwidth Post Addon" +msgstr "Habilita Addon Post Post" + +#: dwpost.php:77 +msgid "dreamwidth username" +msgstr "nom d'usuari de dreamwidth" + +#: dwpost.php:82 +msgid "dreamwidth password" +msgstr "contrasenya de dreamwidth" + +#: dwpost.php:87 +msgid "Post to dreamwidth by default" +msgstr "Publica l'amplada de somni de manera predeterminada" + +#: dwpost.php:93 +msgid "Submit" +msgstr "sotmetre's" diff --git a/dwpost/lang/ca/strings.php b/dwpost/lang/ca/strings.php index 3b7df6d0..cd5c1e1a 100644 --- a/dwpost/lang/ca/strings.php +++ b/dwpost/lang/ca/strings.php @@ -1,9 +1,15 @@ -strings["Post to Dreamwidth"] = "Missatge a Dreamwidth"; -$a->strings["Dreamwidth Post Settings"] = "Configuració d'enviaments a Dreamwidth"; -$a->strings["Enable dreamwidth Post Addon"] = "Habilitat el addon d'enviaments a Dreamwidth"; -$a->strings["dreamwidth username"] = "Nom d'usuari a Dreamwidth"; -$a->strings["dreamwidth password"] = "Contrasenya a Dreamwidth"; -$a->strings["Post to dreamwidth by default"] = "Enviar per defecte a Dreamwidth"; -$a->strings["Submit"] = "Enviar"; +strings["Post to Dreamwidth"] = "Publica a Dreamwidth"; +$a->strings["Dreamwidth Post Settings"] = "Configuració de la publicació de Dreamwidth"; +$a->strings["Enable dreamwidth Post Addon"] = "Habilita Addon Post Post"; +$a->strings["dreamwidth username"] = "nom d'usuari de dreamwidth"; +$a->strings["dreamwidth password"] = "contrasenya de dreamwidth"; +$a->strings["Post to dreamwidth by default"] = "Publica l'amplada de somni de manera predeterminada"; +$a->strings["Submit"] = "sotmetre's"; -- 2.43.5 From 6944b54ff7275c3b82e9ffc5d967e8b655564b25 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 09:39:30 +0100 Subject: [PATCH 19/40] impressum addon updated CA translation THX Joan Bar --- impressum/lang/ca/messages.po | 89 +++++++++++++++++++++++++++++++++++ impressum/lang/ca/strings.php | 42 ++++++++++------- 2 files changed, 113 insertions(+), 18 deletions(-) create mode 100644 impressum/lang/ca/messages.po diff --git a/impressum/lang/ca/messages.po b/impressum/lang/ca/messages.po new file mode 100644 index 00000000..025a03e3 --- /dev/null +++ b/impressum/lang/ca/messages.po @@ -0,0 +1,89 @@ +# ADDON impressum +# Copyright (C) +# This file is distributed under the same license as the Friendica impressum addon package. +# +# +# Translators: +# Joan Bar , 2019 +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: 2019-10-18 20:58+0000\n" +"Last-Translator: Joan Bar \n" +"Language-Team: Catalan (http://www.transifex.com/Friendica/friendica/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: impressum.php:37 +msgid "Impressum" +msgstr "empremta" + +#: impressum.php:50 impressum.php:52 impressum.php:84 +msgid "Site Owner" +msgstr "Propietari del lloc" + +#: impressum.php:50 impressum.php:88 +msgid "Email Address" +msgstr "Correu electrònic" + +#: impressum.php:55 impressum.php:86 +msgid "Postal Address" +msgstr "Adreça postal" + +#: impressum.php:61 +msgid "" +"The impressum addon needs to be configured!
Please add at least the " +"owner variable to your config file. For other variables please " +"refer to the README file of the addon." +msgstr "Cal configurar l’addon impressum
Afegiu com a mínim la secció owner variable del fitxer de configuració. Per a altres variables, consulteu el fitxer README de l’adjunció." + +#: impressum.php:78 +msgid "Settings updated." +msgstr "La configuració s'ha actualitzat." + +#: impressum.php:83 +msgid "Submit" +msgstr "sotmetre's" + +#: impressum.php:84 +msgid "The page operators name." +msgstr "El nom dels operadors de pàgina." + +#: impressum.php:85 +msgid "Site Owners Profile" +msgstr "Perfil dels propietaris del lloc" + +#: impressum.php:85 +msgid "Profile address of the operator." +msgstr "Adreça del perfil de l'operador." + +#: impressum.php:86 +msgid "How to contact the operator via snail mail. You can use BBCode here." +msgstr "Com contactar amb l'operador mitjançant correu cargol. Podeu utilitzar BBCode aquí." + +#: impressum.php:87 +msgid "Notes" +msgstr "nota" + +#: impressum.php:87 +msgid "" +"Additional notes that are displayed beneath the contact information. You can" +" use BBCode here." +msgstr "Notes addicionals que es mostren a sota de la informació de contacte. Podeu utilitzar BBCode aquí." + +#: impressum.php:88 +msgid "How to contact the operator via email. (will be displayed obfuscated)" +msgstr "Com contactar amb l'operador per correu electrònic. (es mostrarà ofuscat)" + +#: impressum.php:89 +msgid "Footer note" +msgstr "Nota de peu de pàgina" + +#: impressum.php:89 +msgid "Text for the footer. You can use BBCode here." +msgstr "Text for the footer. You can use BBCode here." diff --git a/impressum/lang/ca/strings.php b/impressum/lang/ca/strings.php index 4de1f0c3..2f2e59e2 100644 --- a/impressum/lang/ca/strings.php +++ b/impressum/lang/ca/strings.php @@ -1,18 +1,24 @@ -strings["Impressum"] = "Impressum"; -$a->strings["Site Owner"] = "Propietari del lloc"; -$a->strings["Email Address"] = "Adreça de correu"; -$a->strings["Postal Address"] = "Adreça postal"; -$a->strings["The impressum addon needs to be configured!
Please add at least the owner variable to your config file. For other variables please refer to the README file of the addon."] = "El complement impressum s'ha de configurar!
Si us plau afegiu almenys la variable propietari al fitxer de configuració. Per a les altres variables, consulteu el fitxer README del complement."; -$a->strings["Settings updated."] = "Ajustos actualitzats."; -$a->strings["Submit"] = "Enviar"; -$a->strings["The page operators name."] = "Nom de la pàgina del gestor."; -$a->strings["Site Owners Profile"] = "Perfil del Propietari del Lloc"; -$a->strings["Profile address of the operator."] = "Adreça del perfil del gestor."; -$a->strings["How to contact the operator via snail mail. You can use BBCode here."] = "Com posar-se en contacte amb l'operador a través de correu postal. Vostè pot utilitzar BBCode aquí."; -$a->strings["Notes"] = "Notes"; -$a->strings["Additional notes that are displayed beneath the contact information. You can use BBCode here."] = "Notes addicionals que es mostren sota de la informació de contacte. Vostè pot usar BBCode aquí."; -$a->strings["How to contact the operator via email. (will be displayed obfuscated)"] = "Com contactar amb el gestor via correu electronic. ( es visualitzara ofuscat)"; -$a->strings["Footer note"] = "Nota a peu de pàgina"; -$a->strings["Text for the footer. You can use BBCode here."] = "Text pel peu de pàgina. Pots emprar BBCode aquí."; +strings["Impressum"] = "empremta"; +$a->strings["Site Owner"] = "Propietari del lloc"; +$a->strings["Email Address"] = "Correu electrònic"; +$a->strings["Postal Address"] = "Adreça postal"; +$a->strings["The impressum addon needs to be configured!
Please add at least the owner variable to your config file. For other variables please refer to the README file of the addon."] = "Cal configurar l’addon impressum
Afegiu com a mínim la secció owner variable del fitxer de configuració. Per a altres variables, consulteu el fitxer README de l’adjunció."; +$a->strings["Settings updated."] = "La configuració s'ha actualitzat."; +$a->strings["Submit"] = "sotmetre's"; +$a->strings["The page operators name."] = "El nom dels operadors de pàgina."; +$a->strings["Site Owners Profile"] = "Perfil dels propietaris del lloc"; +$a->strings["Profile address of the operator."] = "Adreça del perfil de l'operador."; +$a->strings["How to contact the operator via snail mail. You can use BBCode here."] = "Com contactar amb l'operador mitjançant correu cargol. Podeu utilitzar BBCode aquí."; +$a->strings["Notes"] = "nota"; +$a->strings["Additional notes that are displayed beneath the contact information. You can use BBCode here."] = "Notes addicionals que es mostren a sota de la informació de contacte. Podeu utilitzar BBCode aquí."; +$a->strings["How to contact the operator via email. (will be displayed obfuscated)"] = "Com contactar amb l'operador per correu electrònic. (es mostrarà ofuscat)"; +$a->strings["Footer note"] = "Nota de peu de pàgina"; +$a->strings["Text for the footer. You can use BBCode here."] = "Text for the footer. You can use BBCode here."; -- 2.43.5 From 7a587d96288787a4a2b5545506709eff6a5e15f0 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 Nov 2019 09:41:19 +0100 Subject: [PATCH 20/40] infiniteprbabilitydrive addon updated CA translation THX Joan Bar --- .../lang/ca/messages.po | 24 +++++++++++++++++++ .../lang/ca/strings.php | 12 +++++++--- 2 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 infiniteimprobabilitydrive/lang/ca/messages.po diff --git a/infiniteimprobabilitydrive/lang/ca/messages.po b/infiniteimprobabilitydrive/lang/ca/messages.po new file mode 100644 index 00000000..3489cd47 --- /dev/null +++ b/infiniteimprobabilitydrive/lang/ca/messages.po @@ -0,0 +1,24 @@ +# ADDON infiniteimprobabilitydrive +# Copyright (C) +# This file is distributed under the same license as the Friendica infiniteimprobabilitydrive addon package. +# +# +# Translators: +# Joan Bar , 2019 +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: 2019-10-18 21:00+0000\n" +"Last-Translator: Joan Bar \n" +"Language-Team: Catalan (http://www.transifex.com/Friendica/friendica/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: infiniteimprobabilitydrive.php:19 +msgid "Infinite Improbability Drive" +msgstr "Unitat de millora de la infinitat" diff --git a/infiniteimprobabilitydrive/lang/ca/strings.php b/infiniteimprobabilitydrive/lang/ca/strings.php index cd57a87e..9020ca59 100644 --- a/infiniteimprobabilitydrive/lang/ca/strings.php +++ b/infiniteimprobabilitydrive/lang/ca/strings.php @@ -1,3 +1,9 @@ -strings["Infinite Improbability Drive"] = "Infinite Improbability Drive"; +strings["Infinite Improbability Drive"] = "Unitat de millora de la infinitat"; -- 2.43.5 From da663db1cb1d9ab0c0eb06ec8e5408033265c942 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 23 Nov 2019 23:43:59 +0000 Subject: [PATCH 21/40] Discourse addon created --- discourse/README | 97 +++++++++++++++++ discourse/discourse.php | 224 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 321 insertions(+) create mode 100644 discourse/README create mode 100644 discourse/discourse.php diff --git a/discourse/README b/discourse/README new file mode 100644 index 00000000..e4a8b9d3 --- /dev/null +++ b/discourse/README @@ -0,0 +1,97 @@ +NSFW + +"Not safe for work" + +Scans the message content for the string 'nsfw' +(case insensitive) and if found replaces the content +with a "click to open/close" link, default is closed. + +If you click on the 'Not safe for work' addon under +/settings/addon a text field appears, where you can +extend the list of search terms. The terms must be +seperated by commas. + +It is also possible to enter profile URLs as values. +This is quite useful for the case, that you perhaps +don't want to see postings by person_A, but person_B +is one of your contacts and person_B used to reshare +postings by person_A. + +You can also make use of regular expressions. +They also have to be seperated by commas and the +regex itself has to be enclosed with slashes: + + ... nsfw, //, politics,... + +--------------- +A few examples: +--------------- + +1) +Let's say you don't want to see postings which contain +the term 'fake news' + +The term could appear in several ways: + +fakenews, fake news, fake_news, fake-news, f@ke news, +f4ke news, f4k3 n3ws, and so on and so on and so on. + +You could write every possible version of it as single +item into your NSFW-filter list, but this can also be +done with a single regex, which matches all of them: + + /f[@4a]k[3e][-_ ]n[3e]w[sz]/ + + +2) +Another use case could be, that you are simply not +interested in postings about christmas. + + /christmas(?:[-_ ]?(?:tree|time|eve|pudding))?/ + + +ATTENTION: + +It is absolutely important, that you use grouping +parentheses instead of capturing parentheses!! + +Grouping parentheses are: + + (?: ) + +If you use capturing parentheses, which are + + ( ) + +it will produce errors and the regex won't work and +at least your targets will not get collapsed. + + + +3) +Another possibility is the usage of a so called +'lookbehind' construct. I'll give an example followed +by a descripton: + + /(? + * + */ +//use DOMDocument; +//use DOMXPath; +use Friendica\App; +use Friendica\Core\Hook; +use Friendica\Core\L10n; +use Friendica\Core\Logger; +use Friendica\Core\PConfig; +use Friendica\Util\XML; +use Friendica\Content\Text\Markdown; +use Friendica\Util\Network; +Use Friendica\Util\DateTimeFormat; + +function discourse_install() +{ + Hook::register('email_getmessage', __FILE__, 'discourse_email_getmessage'); + Hook::register('email_getmessage_end', __FILE__, 'discourse_email_getmessage_end'); + Hook::register('addon_settings', __FILE__, 'discourse_addon_settings'); + Hook::register('addon_settings_post', __FILE__, 'discourse_addon_settings_post'); +} + +function discourse_uninstall() +{ + Hook::unregister('email_getmessage', __FILE__, 'discourse_email_getmessage'); + Hook::unregister('email_getmessage_end', __FILE__, 'discourse_email_getmessage_end'); + Hook::unregister('addon_settings', __FILE__, 'discourse_addon_settings'); + Hook::unregister('addon_settings_post', __FILE__, 'discourse_addon_settings_post'); +} + +function discourse_addon_settings(App $a, &$s) +{ +} + +function discourse_addon_settings_post(App $a) +{ +} + +function discourse_email_getmessage(App $a, &$message) +{ +// Logger::info('Got raw message', $message); + // Remove the title on comments, they don't serve any purpose there + if ($message['item']['parent-uri'] != $message['item']['uri']) { + unset($message['item']['title']); + } + + if (preg_match('=topic/(.*)/(.*)@(.*)=', $message['item']['uri'], $matches)) { + Logger::info('Got post data', ['topic' => $matches[1], 'post' => $matches[2], 'host' => $matches[3]]); + if (discourse_fetch_post_from_api($message, $matches[2], $matches[3])) { + return; + } + } + + // Search in the text part for the link to the discourse entry and the text body + // The text body is used as alternative, if the fetched HTML isn't working + if (!empty($message['text'])) { + discourse_get_text($message); + } + + if (!empty($message['item']['plink'])) { + if (preg_match('=(http.*)/t/.*/(.*\d)/(.*\d)=', $message['item']['plink'], $matches)) { + if (discourse_fetch_topic_from_api($message, $matches[1], $matches[1], $matches[1])) { + return; + } + } + } + + // Search in the HTML part for the discourse entry and the author profile + if (!empty($message['html'])) { + discourse_get_html($message); + } +} + +function discourse_fetch_topic_from_api(&$message, $host, $topic, $pid) +{ + $url = $host . '/t/' . $topic . '/posts.json?posts_ids[]=' . $pid; + $curlResult = Network::curl($url); + if (!$curlResult->isSuccess()) { + return false; + } + $raw = $curlResult->getBody(); + $data = json_decode($raw, true); + $posts = $data['post_stream']['posts']; + foreach($posts as $post) { + if ($post['post_number'] != $pid) { + continue; + } + Logger::info('Got post data from topic', $post); + discourse_process_post($message, $post); + return true; + } + return false; +} + +function discourse_fetch_post_from_api(&$message, $post, $host) +{ + $url = "https://" . $host . '/posts/' . $post . '.json'; + $curlResult = Network::curl($url); + if (!$curlResult->isSuccess()) { + return false; + } + + $raw = $curlResult->getBody(); + $data = json_decode($raw, true); + if (empty($data)) { + return false; + } + + discourse_process_post($message, $data); + + Logger::info('Got API data', $message); + return true; +} + +function discourse_process_post(&$message, $post) +{ + if ($post['post_number'] == 1) { + // Thread information + } + + $nick = $post['username']; + $name = $post['name']; + // User information + + $message['html'] = $post['cooked']; + $message['text'] = $post['raw']; + $message['item']['created'] = DateTimeFormat::utc($post['created_at']); +} + +function discourse_get_html(&$message) +{ + $doc = new DOMDocument(); + $doc2 = new DOMDocument(); + $doc->preserveWhiteSpace = false; + + $html = mb_convert_encoding($message['html'], 'HTML-ENTITIES', "UTF-8"); + @$doc->loadHTML($html, LIBXML_HTML_NODEFDTD); + + $xpath = new DomXPath($doc); + + // Fetch the first 'div' before the 'hr' -hopefully this fits for all systems + $result = $xpath->query("//hr//preceding::div[1]"); + $div = $doc2->importNode($result->item(0), true); + $doc2->appendChild($div); + $message['html'] = $doc2->saveHTML(); + Logger::info('Found html body', ['html' => $message['html']]); + + $profile = discourse_get_profile($xpath); + if (!empty($profile)) { + Logger::info('Found profile', $profile); +/* + $message['item']['author-avatar'] = $contact['avatar']; + $message['item']['author-link'] = $profile['link']; + $message['item']['author-name'] = $profile['name']; +*/ + } +} + +function discourse_get_text(&$message) +{ + $text = $message['text']; + $text = str_replace("\r", '', $text); + $pos = strpos($text, "\n---\n"); + if ($pos > 0) { + $message['text'] = trim(substr($text, 0, $pos)); + Logger::info('Found text body', ['text' => $message['text']]); + + $message['text'] = Markdown::toBBCode($message['text']); + + $text = substr($text, $pos); + if (preg_match('=\((http.*?)\)=', $text, $link)) { + $message['item']['plink'] = $link[1]; + Logger::info('Found plink', ['plink' => $message['item']['plink']]); + } + } else { + Logger::info('No separator found', ['text' => $text]); + } +} + +function discourse_get_profile($xpath) +{ + $profile = []; + $list = $xpath->query("//td//following::img"); + foreach ($list as $node) { + $attr = []; + foreach ($node->attributes as $attribute) { + $attr[$attribute->name] = $attribute->value; + } + + if (!empty($attr['src']) && !empty($attr['title']) + && !empty($attr['width']) && !empty($attr['height']) + && ($attr['width'] == $attr['height'])) { + $profile = ['avatar' => $attr['src'], 'name' => $attr['title']]; + break; + } + } + + $list = $xpath->query("//td//following::a"); + foreach ($list as $node) { + if (!empty(trim($node->textContent)) && $node->attributes->length) { + $attr = []; + foreach ($node->attributes as $attribute) { + $attr[$attribute->name] = $attribute->value; + } + if (!empty($attr['href']) && (strpos($attr['href'], '/' . $profile['name']))) { + $profile['link'] = $attr['href']; + break; + } + } + } + return $profile; +} + +function discourse_email_getmessage_end(App $a, &$message) +{ +// Logger::info('Got converted message', $message); +} -- 2.43.5 From b308f3bc0528b49a8ce0ccc9be21e047e6dff87d Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 24 Nov 2019 14:20:57 -0500 Subject: [PATCH 22/40] [avancedcontentfilter] Fix typo in exception name --- advancedcontentfilter/advancedcontentfilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advancedcontentfilter/advancedcontentfilter.php b/advancedcontentfilter/advancedcontentfilter.php index dbbfb2e2..1b54df49 100644 --- a/advancedcontentfilter/advancedcontentfilter.php +++ b/advancedcontentfilter/advancedcontentfilter.php @@ -339,7 +339,7 @@ function advancedcontentfilter_post_rules(ServerRequestInterface $request) $fields['created'] = DateTimeFormat::utcNow(); if (!DBA::insert('advancedcontentfilter_rules', $fields)) { - throw new HTTPException\ServiceUnavaiableException(DBA::errorMessage()); + throw new HTTPException\ServiceUnavailableException(DBA::errorMessage()); } $rule = DBA::selectFirst('advancedcontentfilter_rules', [], ['id' => DBA::lastInsertId()]); -- 2.43.5 From 0465de62dc695b7d6ed153a590f6b0960b1cf599 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 25 Nov 2019 11:14:22 +0000 Subject: [PATCH 23/40] Discourse contacts are generated, URI and Parent-URI are regenerated --- discourse/discourse.php | 174 +++++++++++++++++++++++++++++----------- 1 file changed, 129 insertions(+), 45 deletions(-) diff --git a/discourse/discourse.php b/discourse/discourse.php index 1df248a5..6a203950 100644 --- a/discourse/discourse.php +++ b/discourse/discourse.php @@ -14,9 +14,13 @@ use Friendica\Core\Hook; use Friendica\Core\L10n; use Friendica\Core\Logger; use Friendica\Core\PConfig; +use Friendica\Core\Protocol; +use Friendica\Database\DBA; +use Friendica\Model\Contact; use Friendica\Util\XML; use Friendica\Content\Text\Markdown; use Friendica\Util\Network; +use Friendica\Util\Strings; Use Friendica\Util\DateTimeFormat; function discourse_install() @@ -46,62 +50,81 @@ function discourse_addon_settings_post(App $a) function discourse_email_getmessage(App $a, &$message) { // Logger::info('Got raw message', $message); - // Remove the title on comments, they don't serve any purpose there - if ($message['item']['parent-uri'] != $message['item']['uri']) { - unset($message['item']['title']); - } - if (preg_match('=topic/(.*)/(.*)@(.*)=', $message['item']['uri'], $matches)) { +/* if (preg_match('=topic/(.*)/(.*)@(.*)=', $message['item']['uri'], $matches)) { Logger::info('Got post data', ['topic' => $matches[1], 'post' => $matches[2], 'host' => $matches[3]]); if (discourse_fetch_post_from_api($message, $matches[2], $matches[3])) { return; } } - +*/ // Search in the text part for the link to the discourse entry and the text body // The text body is used as alternative, if the fetched HTML isn't working if (!empty($message['text'])) { - discourse_get_text($message); + $message = discourse_get_text($message); } if (!empty($message['item']['plink'])) { if (preg_match('=(http.*)/t/.*/(.*\d)/(.*\d)=', $message['item']['plink'], $matches)) { - if (discourse_fetch_topic_from_api($message, $matches[1], $matches[1], $matches[1])) { + if (discourse_fetch_topic_from_api($message, $matches[1], $matches[2], $matches[3])) { return; } } } - + Logger::info('Stop'); +die('Test'); // Search in the HTML part for the discourse entry and the author profile if (!empty($message['html'])) { - discourse_get_html($message); + $message = discourse_get_html($message); + } + + // Remove the title on comments, they don't serve any purpose there + if ($message['item']['parent-uri'] != $message['item']['uri']) { + unset($message['item']['title']); } } -function discourse_fetch_topic_from_api(&$message, $host, $topic, $pid) +function discourse_fetch_post($host, $topic, $pid) { - $url = $host . '/t/' . $topic . '/posts.json?posts_ids[]=' . $pid; + $url = $host . '/t/' . $topic . '/' . $pid . '.json'; $curlResult = Network::curl($url); if (!$curlResult->isSuccess()) { + Logger::info('No success', ['url' => $url]); return false; } + $raw = $curlResult->getBody(); $data = json_decode($raw, true); $posts = $data['post_stream']['posts']; foreach($posts as $post) { if ($post['post_number'] != $pid) { + // Test + discourse_get_user($post, $host); continue; } Logger::info('Got post data from topic', $post); - discourse_process_post($message, $post); - return true; + return $post; } + + Logger::info('Post not found', ['host' => $host, 'topic' => $topic, 'pid' => $pid]); return false; } +function discourse_fetch_topic_from_api(&$message, $host, $topic, $pid) +{ + $post = discourse_fetch_post($host, $topic, $pid); + if (empty($post)) { + return false; + } + + $message = discourse_process_post($message, $post, $host); + return true; +} + function discourse_fetch_post_from_api(&$message, $post, $host) { - $url = "https://" . $host . '/posts/' . $post . '.json'; + $hostaddr = 'https://' . $host; + $url = $hostaddr . '/posts/' . $post . '.json'; $curlResult = Network::curl($url); if (!$curlResult->isSuccess()) { return false; @@ -113,28 +136,84 @@ function discourse_fetch_post_from_api(&$message, $post, $host) return false; } - discourse_process_post($message, $data); + $message = discourse_process_post($message, $data, $hostaddr); Logger::info('Got API data', $message); return true; } -function discourse_process_post(&$message, $post) +function discourse_get_user($post, $hostaddr) { - if ($post['post_number'] == 1) { - // Thread information + $host = parse_url($hostaddr, PHP_URL_HOST); + + $contact = []; + // display_username + // user_id + $contact['uid'] = 0; + $contact['network'] = Protocol::DISCOURSE; + $contact['name'] = $contact['nick'] = $post['username']; + if (!empty($post['name'])) { + $contact['name'] = $post['name']; } - $nick = $post['username']; - $name = $post['name']; - // User information + $contact['about'] = $post['user_title']; - $message['html'] = $post['cooked']; - $message['text'] = $post['raw']; - $message['item']['created'] = DateTimeFormat::utc($post['created_at']); + if (parse_url($post['avatar_template'], PHP_URL_SCHEME)) { + $contact['photo'] = str_replace('{size}', '300', $post['avatar_template']); + } else { + $contact['photo'] = $hostaddr . str_replace('{size}', '300', $post['avatar_template']); + } + + $contact['addr'] = $contact['nick'] . '@' . $host; + $contact['contact-type'] = Contact::TYPE_PERSON; + $contact['url'] = $hostaddr . '/u/' . $contact['nick']; + $contact['nurl'] = Strings::normaliseLink($contact['url']); + $contact['baseurl'] = $hostaddr; + Logger::info('Contact', $contact); + $contact['id'] = Contact::getIdForURL($contact['url'], 0, true, $contact); + if (!empty($contact['id'])) { + $avatar = $contact['photo']; + unset($contact['photo']); + DBA::update('contact', $contact, ['id' => $contact['id']]); + Contact::updateAvatar($avatar, 0, $contact['id']); + $contact['photo'] = $avatar; + } + + return $contact; } -function discourse_get_html(&$message) +function discourse_process_post($message, $post, $hostaddr) +{ + $host = parse_url($hostaddr, PHP_URL_HOST); + + $message['html'] = $post['cooked']; + + $contact = discourse_get_user($post, $hostaddr); + $message['item']['author-id'] = $contact['id']; + $message['item']['author-link'] = $contact['url']; + $message['item']['author-name'] = $contact['name']; + $message['item']['author-avatar'] = $contact['photo']; + $message['item']['created'] = DateTimeFormat::utc($post['created_at']); + $message['item']['plink'] = $hostaddr . '/t/' . $post['topic_slug'] . '/' . $post['topic_id'] . '/' . $post['post_number']; + + if ($post['post_number'] == 1) { + $message['item']['parent-uri'] = $message['item']['uri'] = 'topic/' . $post['topic_id'] . '@' . $host; + // To-Do: Thread information + } else { + $message['item']['uri'] = 'topic/' . $post['topic_id'] . '/' . $post['id'] . '@' . $host; + unset($message['item']['title']); + if (empty($post['reply_to_post_number']) || $post['reply_to_post_number'] == 1) { + $message['item']['parent-uri'] = 'topic/' . $post['topic_id'] . '@' . $host; + } else { + $reply = discourse_fetch_post($hostaddr, $post['topic_id'], $post['reply_to_post_number']); + $message['item']['parent-uri'] = 'topic/' . $post['topic_id'] . '/' . $reply['id'] . '@' . $host; + } + } + + return $message; +} + +function discourse_get_html($message) { $doc = new DOMDocument(); $doc2 = new DOMDocument(); @@ -155,33 +234,38 @@ function discourse_get_html(&$message) $profile = discourse_get_profile($xpath); if (!empty($profile)) { Logger::info('Found profile', $profile); -/* - $message['item']['author-avatar'] = $contact['avatar']; - $message['item']['author-link'] = $profile['link']; + $message['item']['author-id'] = Contact::getIdForURL($profile['url'], 0, true, $profile); + $message['item']['author-link'] = $profile['url']; $message['item']['author-name'] = $profile['name']; -*/ + $message['item']['author-avatar'] = $profile['photo']; } + + return $message; } -function discourse_get_text(&$message) +function discourse_get_text($message) { $text = $message['text']; $text = str_replace("\r", '', $text); $pos = strpos($text, "\n---\n"); - if ($pos > 0) { - $message['text'] = trim(substr($text, 0, $pos)); - Logger::info('Found text body', ['text' => $message['text']]); - - $message['text'] = Markdown::toBBCode($message['text']); - - $text = substr($text, $pos); - if (preg_match('=\((http.*?)\)=', $text, $link)) { - $message['item']['plink'] = $link[1]; - Logger::info('Found plink', ['plink' => $message['item']['plink']]); - } - } else { + if ($pos == 0) { Logger::info('No separator found', ['text' => $text]); + return $message; } + + $message['text'] = trim(substr($text, 0, $pos)); + + Logger::info('Found text body', ['text' => $message['text']]); + + $message['text'] = Markdown::toBBCode($message['text']); + + $text = substr($text, $pos); + Logger::info('Found footer', ['text' => $text]); + if (preg_match('=\((http.*/t/.*/.*\d/.*\d)\)=', $text, $link)) { + $message['item']['plink'] = $link[1]; + Logger::info('Found plink', ['plink' => $message['item']['plink']]); + } + return $message; } function discourse_get_profile($xpath) @@ -197,7 +281,7 @@ function discourse_get_profile($xpath) if (!empty($attr['src']) && !empty($attr['title']) && !empty($attr['width']) && !empty($attr['height']) && ($attr['width'] == $attr['height'])) { - $profile = ['avatar' => $attr['src'], 'name' => $attr['title']]; + $profile = ['photo' => $attr['src'], 'name' => $attr['title']]; break; } } @@ -210,7 +294,7 @@ function discourse_get_profile($xpath) $attr[$attribute->name] = $attribute->value; } if (!empty($attr['href']) && (strpos($attr['href'], '/' . $profile['name']))) { - $profile['link'] = $attr['href']; + $profile['url'] = $attr['href']; break; } } -- 2.43.5 From 9bc1f9cee66cb575cde390dd64ccb52d3520bc04 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 25 Nov 2019 22:23:19 +0000 Subject: [PATCH 24/40] README updated, code restructured --- discourse/README | 117 +++++++++------------------------------- discourse/discourse.php | 71 ++++++++++++------------ 2 files changed, 60 insertions(+), 128 deletions(-) diff --git a/discourse/README b/discourse/README index e4a8b9d3..65c54d20 100644 --- a/discourse/README +++ b/discourse/README @@ -1,97 +1,28 @@ -NSFW +Discourse connector +=================== -"Not safe for work" +The Discourse connectors detects incoming mails from Discourse and +improves them by fetching the content and user data via API. -Scans the message content for the string 'nsfw' -(case insensitive) and if found replaces the content -with a "click to open/close" link, default is closed. +Prerequisites +------------- +The user has to configure the mail interface so that the user's mails +can be fetched via Friendica. Then the user has to activate the +mailing list mode in Discourse. -If you click on the 'Not safe for work' addon under -/settings/addon a text field appears, where you can -extend the list of search terms. The terms must be -seperated by commas. +The mailing list mode in Discourse knows two different options: +1. Get all posts - including your own. This will create duplicates + if you post via Friendica. +2. Don't get your own posts. Then you will missing all your posts + that you made directly on Discourse. Since you cannot create + a new post via this connector (only comments are possible) + this is not a goog choice either. -It is also possible to enter profile URLs as values. -This is quite useful for the case, that you perhaps -don't want to see postings by person_A, but person_B -is one of your contacts and person_B used to reshare -postings by person_A. - -You can also make use of regular expressions. -They also have to be seperated by commas and the -regex itself has to be enclosed with slashes: - - ... nsfw, //, politics,... - ---------------- -A few examples: ---------------- - -1) -Let's say you don't want to see postings which contain -the term 'fake news' - -The term could appear in several ways: - -fakenews, fake news, fake_news, fake-news, f@ke news, -f4ke news, f4k3 n3ws, and so on and so on and so on. - -You could write every possible version of it as single -item into your NSFW-filter list, but this can also be -done with a single regex, which matches all of them: - - /f[@4a]k[3e][-_ ]n[3e]w[sz]/ - - -2) -Another use case could be, that you are simply not -interested in postings about christmas. - - /christmas(?:[-_ ]?(?:tree|time|eve|pudding))?/ - - -ATTENTION: - -It is absolutely important, that you use grouping -parentheses instead of capturing parentheses!! - -Grouping parentheses are: - - (?: ) - -If you use capturing parentheses, which are - - ( ) - -it will produce errors and the regex won't work and -at least your targets will not get collapsed. - - - -3) -Another possibility is the usage of a so called -'lookbehind' construct. I'll give an example followed -by a descripton: - - /(? $matches[1], 'post' => $matches[2], 'host' => $matches[3]]); - if (discourse_fetch_post_from_api($message, $matches[2], $matches[3])) { - return; - } + // We do assume that all Discourse servers are running with SSL + if (preg_match('=topic/(.*\d)/(.*\d)@(.*)=', $message['item']['uri'], $matches) && + discourse_fetch_post_from_api($message, $matches[2], $matches[3])) { + Logger::info('Fetched comment via API', ['host' => $matches[3], 'topic' => $matches[1], 'post' => $matches[2]]); + return; } -*/ + + if (preg_match('=topic/(.*\d)@(.*)=', $message['item']['uri'], $matches) && + discourse_fetch_topic_from_api($message, 'https://' . $matches[2], $matches[1], 1)) { + discourse_fetch_post_from_api($message, $matches[2], $matches[3]); + Logger::info('Fetched starting post via API', ['host' => $matches[2], 'topic' => $matches[1]]); + return; + } + // Search in the text part for the link to the discourse entry and the text body - // The text body is used as alternative, if the fetched HTML isn't working if (!empty($message['text'])) { $message = discourse_get_text($message); } - if (!empty($message['item']['plink'])) { - if (preg_match('=(http.*)/t/.*/(.*\d)/(.*\d)=', $message['item']['plink'], $matches)) { - if (discourse_fetch_topic_from_api($message, $matches[1], $matches[2], $matches[3])) { - return; - } - } + if (empty($message['item']['plink']) || !preg_match('=(http.*)/t/.*/(.*\d)/(.*\d)=', $message['item']['plink'], $matches)) { + Logger::info('This is no Discourse post'); } - Logger::info('Stop'); -die('Test'); + + if (discourse_fetch_topic_from_api($message, $matches[1], $matches[2], $matches[3])) { + Logger::info('Fetched post from via API', ['host' => $matches[1], 'topic' => $matches[2], 'id' => $matches[3]]); + return; + } + + Logger::info('Fallback mode'); // Search in the HTML part for the discourse entry and the author profile if (!empty($message['html'])) { $message = discourse_get_html($message); @@ -98,8 +103,7 @@ function discourse_fetch_post($host, $topic, $pid) $posts = $data['post_stream']['posts']; foreach($posts as $post) { if ($post['post_number'] != $pid) { - // Test - discourse_get_user($post, $host); + /// @todo Possibly fetch missing posts here continue; } Logger::info('Got post data from topic', $post); @@ -146,9 +150,11 @@ function discourse_get_user($post, $hostaddr) { $host = parse_url($hostaddr, PHP_URL_HOST); + // Currently unused contact fields: + // - display_username + // - user_id + $contact = []; - // display_username - // user_id $contact['uid'] = 0; $contact['network'] = Protocol::DISCOURSE; $contact['name'] = $contact['nick'] = $post['username']; @@ -198,7 +204,7 @@ function discourse_process_post($message, $post, $hostaddr) if ($post['post_number'] == 1) { $message['item']['parent-uri'] = $message['item']['uri'] = 'topic/' . $post['topic_id'] . '@' . $host; - // To-Do: Thread information + /// @ToDo Fetch thread information } else { $message['item']['uri'] = 'topic/' . $post['topic_id'] . '/' . $post['id'] . '@' . $host; unset($message['item']['title']); @@ -224,7 +230,7 @@ function discourse_get_html($message) $xpath = new DomXPath($doc); - // Fetch the first 'div' before the 'hr' -hopefully this fits for all systems + // Fetch the first 'div' before the 'hr' - hopefully this fits for all systems $result = $xpath->query("//hr//preceding::div[1]"); $div = $doc2->importNode($result->item(0), true); $doc2->appendChild($div); @@ -232,7 +238,7 @@ function discourse_get_html($message) Logger::info('Found html body', ['html' => $message['html']]); $profile = discourse_get_profile($xpath); - if (!empty($profile)) { + if (!empty($profile['url'])) { Logger::info('Found profile', $profile); $message['item']['author-id'] = Contact::getIdForURL($profile['url'], 0, true, $profile); $message['item']['author-link'] = $profile['url']; @@ -301,8 +307,3 @@ function discourse_get_profile($xpath) } return $profile; } - -function discourse_email_getmessage_end(App $a, &$message) -{ -// Logger::info('Got converted message', $message); -} -- 2.43.5 From 0235126589e0ad23c3e72a34203402b73bf3dea0 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 25 Nov 2019 22:58:01 +0000 Subject: [PATCH 25/40] Settings page added --- discourse/discourse.php | 55 ++++++++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/discourse/discourse.php b/discourse/discourse.php index 3b0f7cf4..d8bb95f2 100644 --- a/discourse/discourse.php +++ b/discourse/discourse.php @@ -14,6 +14,7 @@ use Friendica\Core\Hook; use Friendica\Core\L10n; use Friendica\Core\Logger; use Friendica\Core\PConfig; +use Friendica\Core\Renderer; use Friendica\Core\Protocol; use Friendica\Database\DBA; use Friendica\Model\Contact; @@ -25,9 +26,9 @@ Use Friendica\Util\DateTimeFormat; function discourse_install() { - Hook::register('email_getmessage', __FILE__, 'discourse_email_getmessage'); - Hook::register('addon_settings', __FILE__, 'discourse_settings'); - Hook::register('addon_settings_post', __FILE__, 'discourse_settings_post'); + Hook::register('email_getmessage', __FILE__, 'discourse_email_getmessage'); + Hook::register('connector_settings', __FILE__, 'discourse_settings'); + Hook::register('connector_settings_post', __FILE__, 'discourse_settings_post'); } function discourse_uninstall() @@ -37,29 +38,64 @@ function discourse_uninstall() Hook::unregister('connector_settings_post', __FILE__, 'discourse_settings_post'); } -function discourse_addon_settings(App $a, &$s) +function discourse_settings(App $a, &$s) { + if (!local_user()) { + return; + } + + $enabled = intval(PConfig::get(local_user(), 'discourse', 'enabled')); + $css = ($enabled ? '' : '-disabled'); + + $s .= ''; + $s .= '

' . L10n::t('Discourse') . '

'; + $s .= '
'; + $s .= ''; } -function discourse_addon_settings_post(App $a) +function discourse_settings_post(App $a) { + if (!local_user() || empty($_POST['discourse-submit'])) { + return; + } + + PConfig::set(local_user(), 'discourse', 'enabled', intval($_POST['enabled'])); } function discourse_email_getmessage(App $a, &$message) { -// Logger::info('Got raw message', $message); + if (empty($message['item']['uid'])) { + return; + } + + if (!PConfig::get($message['item']['uid'], 'discourse', 'enabled')) { + return; + } // We do assume that all Discourse servers are running with SSL if (preg_match('=topic/(.*\d)/(.*\d)@(.*)=', $message['item']['uri'], $matches) && discourse_fetch_post_from_api($message, $matches[2], $matches[3])) { - Logger::info('Fetched comment via API', ['host' => $matches[3], 'topic' => $matches[1], 'post' => $matches[2]]); + Logger::info('Fetched comment via API (message-id mode)', ['host' => $matches[3], 'topic' => $matches[1], 'post' => $matches[2]]); return; } if (preg_match('=topic/(.*\d)@(.*)=', $message['item']['uri'], $matches) && discourse_fetch_topic_from_api($message, 'https://' . $matches[2], $matches[1], 1)) { discourse_fetch_post_from_api($message, $matches[2], $matches[3]); - Logger::info('Fetched starting post via API', ['host' => $matches[2], 'topic' => $matches[1]]); + Logger::info('Fetched starting post via API (message-id mode)', ['host' => $matches[2], 'topic' => $matches[1]]); return; } @@ -70,10 +106,11 @@ function discourse_email_getmessage(App $a, &$message) if (empty($message['item']['plink']) || !preg_match('=(http.*)/t/.*/(.*\d)/(.*\d)=', $message['item']['plink'], $matches)) { Logger::info('This is no Discourse post'); + return; } if (discourse_fetch_topic_from_api($message, $matches[1], $matches[2], $matches[3])) { - Logger::info('Fetched post from via API', ['host' => $matches[1], 'topic' => $matches[2], 'id' => $matches[3]]); + Logger::info('Fetched post via API (plink mode)', ['host' => $matches[1], 'topic' => $matches[2], 'id' => $matches[3]]); return; } -- 2.43.5 From f95160866961da0b434247e340cc16b0a180fc80 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 25 Nov 2019 23:09:18 +0000 Subject: [PATCH 26/40] Added logging value --- discourse/discourse.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discourse/discourse.php b/discourse/discourse.php index d8bb95f2..c171f7ad 100644 --- a/discourse/discourse.php +++ b/discourse/discourse.php @@ -114,7 +114,7 @@ function discourse_email_getmessage(App $a, &$message) return; } - Logger::info('Fallback mode'); + Logger::info('Fallback mode', ['plink' => $message['item']['plink']]); // Search in the HTML part for the discourse entry and the author profile if (!empty($message['html'])) { $message = discourse_get_html($message); -- 2.43.5 From 57f689faf1b1b2eff6fa09b8ad7d15cb3f39552d Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 26 Nov 2019 07:21:49 +0000 Subject: [PATCH 27/40] To-Do added, code fragment removed --- discourse/discourse.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/discourse/discourse.php b/discourse/discourse.php index c171f7ad..15081cd1 100644 --- a/discourse/discourse.php +++ b/discourse/discourse.php @@ -24,6 +24,15 @@ use Friendica\Util\Network; use Friendica\Util\Strings; Use Friendica\Util\DateTimeFormat; +/* Todo: + * - Obtaining API tokens to be able to read non public posts as well + * - Handling duplicates (possibly using some non visible marker) + * - Fetching missing posts + * - Fetch topic information + * - Support mail free mode when write tokens are available + * - Fix incomplete (relative) links (hosts are missing) +*/ + function discourse_install() { Hook::register('email_getmessage', __FILE__, 'discourse_email_getmessage'); @@ -94,7 +103,6 @@ function discourse_email_getmessage(App $a, &$message) if (preg_match('=topic/(.*\d)@(.*)=', $message['item']['uri'], $matches) && discourse_fetch_topic_from_api($message, 'https://' . $matches[2], $matches[1], 1)) { - discourse_fetch_post_from_api($message, $matches[2], $matches[3]); Logger::info('Fetched starting post via API (message-id mode)', ['host' => $matches[2], 'topic' => $matches[1]]); return; } -- 2.43.5 From fae6bbe92c7bd83a0b6a54ff528b25e3ccff30d4 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 26 Nov 2019 18:59:50 +0000 Subject: [PATCH 28/40] Some fixes / subject cleaning --- discourse/README | 2 +- discourse/discourse.php | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/discourse/README b/discourse/README index 65c54d20..338b10bf 100644 --- a/discourse/README +++ b/discourse/README @@ -16,7 +16,7 @@ The mailing list mode in Discourse knows two different options: 2. Don't get your own posts. Then you will missing all your posts that you made directly on Discourse. Since you cannot create a new post via this connector (only comments are possible) - this is not a goog choice either. + this is not a good choice either. Known problems -------------- diff --git a/discourse/discourse.php b/discourse/discourse.php index 15081cd1..2fce970d 100644 --- a/discourse/discourse.php +++ b/discourse/discourse.php @@ -7,8 +7,6 @@ * Author: Michael Vogel * */ -//use DOMDocument; -//use DOMXPath; use Friendica\App; use Friendica\Core\Hook; use Friendica\Core\L10n; @@ -40,13 +38,6 @@ function discourse_install() Hook::register('connector_settings_post', __FILE__, 'discourse_settings_post'); } -function discourse_uninstall() -{ - Hook::unregister('email_getmessage', __FILE__, 'discourse_email_getmessage'); - Hook::unregister('connector_settings', __FILE__, 'discourse_settings'); - Hook::unregister('connector_settings_post', __FILE__, 'discourse_settings_post'); -} - function discourse_settings(App $a, &$s) { if (!local_user()) { @@ -249,6 +240,12 @@ function discourse_process_post($message, $post, $hostaddr) if ($post['post_number'] == 1) { $message['item']['parent-uri'] = $message['item']['uri'] = 'topic/' . $post['topic_id'] . '@' . $host; + + // Remove the Discourse forum name from the subject + $pattern = '=\[.*\].*\s(\[.*\].*)='; + if (preg_match($pattern, $message['item']['title'])) { + $message['item']['title'] = preg_replace($pattern, '$1', $message['item']['title']); + } /// @ToDo Fetch thread information } else { $message['item']['uri'] = 'topic/' . $post['topic_id'] . '/' . $post['id'] . '@' . $host; -- 2.43.5 From 561ae12b029e44bf3170db70dc33cc01ec9ed26e Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 27 Nov 2019 05:54:26 +0000 Subject: [PATCH 29/40] Settings had been moved into a template --- discourse/discourse.php | 23 ++++++----------------- discourse/templates/settings.tpl | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 17 deletions(-) create mode 100644 discourse/templates/settings.tpl diff --git a/discourse/discourse.php b/discourse/discourse.php index 2fce970d..6ee40943 100644 --- a/discourse/discourse.php +++ b/discourse/discourse.php @@ -45,25 +45,14 @@ function discourse_settings(App $a, &$s) } $enabled = intval(PConfig::get(local_user(), 'discourse', 'enabled')); - $css = ($enabled ? '' : '-disabled'); - $s .= ''; - $s .= '

' . L10n::t('Discourse') . '

'; - $s .= '
'; - $s .= ''; } function discourse_settings_post(App $a) diff --git a/discourse/templates/settings.tpl b/discourse/templates/settings.tpl new file mode 100644 index 00000000..dc6ef2f0 --- /dev/null +++ b/discourse/templates/settings.tpl @@ -0,0 +1,15 @@ + +

{{$title}}

+
+ -- 2.43.5 From c45df0b96420d35b9f7f9bab6b153def3f1fae3a Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 28 Nov 2019 04:57:39 +0000 Subject: [PATCH 30/40] Improved template --- discourse/discourse.php | 1 - discourse/templates/settings.tpl | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/discourse/discourse.php b/discourse/discourse.php index 6ee40943..262ee554 100644 --- a/discourse/discourse.php +++ b/discourse/discourse.php @@ -49,7 +49,6 @@ function discourse_settings(App $a, &$s) $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/discourse/'); $s .= Renderer::replaceMacros($t, [ '$title' => L10n::t('Discourse'), - '$css' => ($enabled ? '' : '-disabled'), '$enabled' => ['enabled', L10n::t('Enable processing of Discourse mailing list mails'), $enabled, L10n::t('If enabled, incoming mails from Discourse will be improved so they look much better. To make it work, you have to configure the e-mail settings in Friendica. You also have to enable the mailing list mode in Discourse. Then you have to add the Discourse mail account as contact.')], '$submit' => L10n::t('Save Settings'), ]); diff --git a/discourse/templates/settings.tpl b/discourse/templates/settings.tpl index dc6ef2f0..d4b0bf8c 100644 --- a/discourse/templates/settings.tpl +++ b/discourse/templates/settings.tpl @@ -1,9 +1,9 @@ -

{{$title}}

+

{{$title}}