Merge pull request #1175 from tobiasd/20211001-nitter

[nitter] addon version update - reload of the addon required
This commit is contained in:
Hypolite Petovan 2021-10-01 11:20:01 -04:00 committed by GitHub
commit 7d72aeb2c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-03-08 07:44+0100\n" "POT-Creation-Date: 2021-10-01 16:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: nitter.php:51 #: nitter.php:52
#, php-format #, php-format
msgid "" msgid ""
"Which nitter server shall be used for the replacements in the post bodies? " "Which nitter server shall be used for the replacements in the post bodies? "
@ -25,17 +25,17 @@ msgid ""
"public Nitter servers." "public Nitter servers."
msgstr "" msgstr ""
#: nitter.php:52 #: nitter.php:53
msgid "Nitter server" msgid "Nitter server"
msgstr "" msgstr ""
#: nitter.php:53 #: nitter.php:54
msgid "Save Settings" msgid "Save Settings"
msgstr "" msgstr ""
#: nitter.php:65 #: nitter.php:99
#, php-format #, php-format
msgid "" msgid ""
"Links to Twitter in this posting were replaced by links to the Nitter " "In an attempt to protect your privacy, links to Twitter in this posting were "
"instance at %s" "replaced by links to the Nitter instance at %s"
msgstr "" msgstr ""

View file

@ -2,7 +2,7 @@
/* /*
* Name: nitter * Name: nitter
* Description: Replaces links to twitter.com to a nitter server in all displays of postings on a node. * Description: Replaces links to twitter.com to a nitter server in all displays of postings on a node.
* Version: 1.1 * Version: 2.0
* Author: Tobias Diekershoff <tobias@social.diekershoff.de> * Author: Tobias Diekershoff <tobias@social.diekershoff.de>
* *
* Copyright (c) 2020 Tobias Diekershoff * Copyright (c) 2020 Tobias Diekershoff
@ -30,7 +30,7 @@ use Friendica\DI;
function nitter_install() function nitter_install()
{ {
Addon::registerHook ('prepare_body', 'addon/nitter/nitter.php', 'nitter_render'); Addon::registerHook ('prepare_body_final', 'addon/nitter/nitter.php', 'nitter_render');
} }
/* Handle the send data from the admin settings /* Handle the send data from the admin settings
@ -72,6 +72,6 @@ function nitter_render(&$a, &$o)
$replaced = true; $replaced = true;
} }
if ($replaced) { if ($replaced) {
$o['html'] .= '<hr><p>' . DI::l10n()->t('Links to Twitter in this posting were replaced by links to the Nitter instance at %s', $nitter) . '</p>'; $o['html'] .= '<hr><p>' . DI::l10n()->t('In an attempt to protect your privacy, links to Twitter in this posting were replaced by links to the Nitter instance at %s', $nitter) . '</p>';
} }
} }