New field "publish" for channels

This commit is contained in:
Michael 2024-01-07 18:36:47 +00:00
parent 08738e6551
commit c4b85ef25a
11 changed files with 162 additions and 122 deletions

View file

@ -1,6 +1,6 @@
-- ------------------------------------------ -- ------------------------------------------
-- Friendica 2024.03-dev (Yellow Archangel) -- Friendica 2024.03-dev (Yellow Archangel)
-- DB_UPDATE_VERSION 1545 -- DB_UPDATE_VERSION 1546
-- ------------------------------------------ -- ------------------------------------------
@ -505,6 +505,7 @@ CREATE TABLE IF NOT EXISTS `channel` (
`full-text-search` varchar(1023) COMMENT 'Full text search pattern, see https://mariadb.com/kb/en/full-text-index-overview/#in-boolean-mode', `full-text-search` varchar(1023) COMMENT 'Full text search pattern, see https://mariadb.com/kb/en/full-text-index-overview/#in-boolean-mode',
`media-type` smallint unsigned COMMENT 'Filtered media types', `media-type` smallint unsigned COMMENT 'Filtered media types',
`languages` mediumtext COMMENT 'Desired languages', `languages` mediumtext COMMENT 'Desired languages',
`publish` boolean COMMENT 'publish channel content',
PRIMARY KEY(`id`), PRIMARY KEY(`id`),
INDEX `uid` (`uid`), INDEX `uid` (`uid`),
FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE

View file

@ -19,6 +19,7 @@ Fields
| full-text-search | Full text search pattern, see https://mariadb.com/kb/en/full-text-index-overview/#in-boolean-mode | varchar(1023) | YES | | NULL | | | full-text-search | Full text search pattern, see https://mariadb.com/kb/en/full-text-index-overview/#in-boolean-mode | varchar(1023) | YES | | NULL | |
| media-type | Filtered media types | smallint unsigned | YES | | NULL | | | media-type | Filtered media types | smallint unsigned | YES | | NULL | |
| languages | Desired languages | mediumtext | YES | | NULL | | | languages | Desired languages | mediumtext | YES | | NULL | |
| publish | publish channel content | boolean | YES | | NULL | |
Indexes Indexes
------------ ------------

View file

@ -34,6 +34,7 @@ namespace Friendica\Content\Conversation\Entity;
* @property-read int $mediaType Media types that are included in the channel * @property-read int $mediaType Media types that are included in the channel
* @property-read array $languages Channel languages * @property-read array $languages Channel languages
* @property-read int $circle Circle or timeline this channel is based on * @property-read int $circle Circle or timeline this channel is based on
* @property-read bool $publish Publish the channel
*/ */
class Timeline extends \Friendica\BaseEntity class Timeline extends \Friendica\BaseEntity
{ {
@ -61,8 +62,10 @@ class Timeline extends \Friendica\BaseEntity
protected $mediaType; protected $mediaType;
/** @var array */ /** @var array */
protected $languages; protected $languages;
/** @var bool */
protected $publish;
public function __construct(string $code = null, string $label = null, string $description = null, string $accessKey = null, string $path = null, int $uid = null, string $includeTags = null, string $excludeTags = null, string $fullTextSearch = null, int $mediaType = null, int $circle = null, array $languages = null) public function __construct(string $code = null, string $label = null, string $description = null, string $accessKey = null, string $path = null, int $uid = null, string $includeTags = null, string $excludeTags = null, string $fullTextSearch = null, int $mediaType = null, int $circle = null, array $languages = null, bool $publish = null)
{ {
$this->code = $code; $this->code = $code;
$this->label = $label; $this->label = $label;
@ -76,5 +79,6 @@ class Timeline extends \Friendica\BaseEntity
$this->mediaType = $mediaType; $this->mediaType = $mediaType;
$this->circle = $circle; $this->circle = $circle;
$this->languages = $languages; $this->languages = $languages;
$this->publish = $publish;
} }
} }

View file

@ -50,6 +50,7 @@ final class UserDefinedChannel extends Timeline implements ICanCreateFromTableRo
$row['media-type'] ?? null, $row['media-type'] ?? null,
$row['circle'] ?? null, $row['circle'] ?? null,
$row['languages'] ?? null, $row['languages'] ?? null,
$row['publish'] ?? null,
); );
} }
} }

View file

@ -66,7 +66,7 @@ class UserDefinedChannel extends \Friendica\BaseRepository
return $Entities; return $Entities;
} }
public function select(array $condition, array $params = []): BaseCollection public function select(array $condition, array $params = []): UserDefinedChannels
{ {
return $this->_select($condition, $params); return $this->_select($condition, $params);
} }
@ -133,6 +133,7 @@ class UserDefinedChannel extends \Friendica\BaseRepository
'full-text-search' => $Channel->fullTextSearch, 'full-text-search' => $Channel->fullTextSearch,
'media-type' => $Channel->mediaType, 'media-type' => $Channel->mediaType,
'languages' => serialize($Channel->languages), 'languages' => serialize($Channel->languages),
'publish' => $Channel->publish,
]; ];
if ($Channel->code) { if ($Channel->code) {
@ -160,14 +161,7 @@ class UserDefinedChannel extends \Friendica\BaseRepository
*/ */
public function match(string $searchtext, string $language, array $tags, int $media_type): bool public function match(string $searchtext, string $language, array $tags, int $media_type): bool
{ {
$condition = ["`verified` AND NOT `blocked` AND NOT `account_removed` AND NOT `account_expired` AND `user`.`uid` > ?", 0]; $users = $this->db->selectToArray('user', ['uid'], $this->getUserCondition());
$abandon_days = intval($this->config->get('system', 'account_abandon_days'));
if (!empty($abandon_days)) {
$condition = DBA::mergeConditions($condition, ["`last-activity` > ?", DateTimeFormat::utc('now - ' . $abandon_days . ' days')]);
}
$users = $this->db->selectToArray('user', ['uid'], $condition);
if (empty($users)) { if (empty($users)) {
return []; return [];
} }
@ -187,7 +181,9 @@ class UserDefinedChannel extends \Friendica\BaseRepository
*/ */
public function getMatchingChannelUsers(string $searchtext, string $language, array $tags, int $media_type, int $owner_id): array public function getMatchingChannelUsers(string $searchtext, string $language, array $tags, int $media_type, int $owner_id): array
{ {
$users = $this->db->selectToArray('user', ['uid'], ["`account-type` = ? AND `uid` != ?", User::ACCOUNT_TYPE_RELAY, 0]); $condition = $this->getUserCondition();
$condition = DBA::mergeConditions($condition, ["`account-type` IN (?, ?) AND `uid` != ?", User::ACCOUNT_TYPE_RELAY, User::ACCOUNT_TYPE_COMMUNITY, 0]);
$users = $this->db->selectToArray('user', ['uid'], $condition);
if (empty($users)) { if (empty($users)) {
return []; return [];
} }
@ -208,6 +204,8 @@ class UserDefinedChannel extends \Friendica\BaseRepository
$condition = ['uid' => $channelUids]; $condition = ['uid' => $channelUids];
if (!$relayMode) { if (!$relayMode) {
$condition = DBA::mergeConditions($condition, ["`full-text-search` != ?", '']); $condition = DBA::mergeConditions($condition, ["`full-text-search` != ?", '']);
} else {
$condition = DBA::mergeConditions($condition, ['publish' => true]);
} }
foreach ($this->select($condition) as $channel) { foreach ($this->select($condition) as $channel) {
@ -278,4 +276,15 @@ class UserDefinedChannel extends \Friendica\BaseRepository
$this->db->delete('check-full-text-search', ['pid' => getmypid()]); $this->db->delete('check-full-text-search', ['pid' => getmypid()]);
return $uids; return $uids;
} }
private function getUserCondition()
{
$condition = ["`verified` AND NOT `blocked` AND NOT `account_removed` AND NOT `account_expired` AND `user`.`uid` > ?", 0];
$abandon_days = intval($this->config->get('system', 'account_abandon_days'));
if (!empty($abandon_days)) {
$condition = DBA::mergeConditions($condition, ["`last-activity` > ?", DateTimeFormat::utc('now - ' . $abandon_days . ' days')]);
}
return $condition;
}
} }

View file

@ -2128,12 +2128,11 @@ class Item
} }
} }
$result = self::compactLanguages($result);
if (empty($result)) { if (empty($result)) {
return $default; return $default;
} }
$result = self::compactLanguages($result);
arsort($result); arsort($result);
return array_slice($result, 0, $count); return array_slice($result, 0, $count);
} }

View file

@ -110,6 +110,7 @@ class Channels extends BaseSettings
'full-text-search' => $request['text_search'][$id], 'full-text-search' => $request['text_search'][$id],
'media-type' => ($request['image'][$id] ? 1 : 0) | ($request['video'][$id] ? 2 : 0) | ($request['audio'][$id] ? 4 : 0), 'media-type' => ($request['image'][$id] ? 1 : 0) | ($request['video'][$id] ? 2 : 0) | ($request['audio'][$id] ? 4 : 0),
'languages' => $request['languages'][$id], 'languages' => $request['languages'][$id],
'publish' => $request['publish'][$id],
]); ]);
$saved = $this->channel->save($channel); $saved = $this->channel->save($channel);
$this->logger->debug('Save channel', ['id' => $id, 'saved' => $saved]); $this->logger->debug('Save channel', ['id' => $id, 'saved' => $saved]);
@ -128,7 +129,7 @@ class Channels extends BaseSettings
$user = User::getById($uid, ['account-type']); $user = User::getById($uid, ['account-type']);
$account_type = $user['account-type']; $account_type = $user['account-type'];
if ($account_type == User::ACCOUNT_TYPE_RELAY) { if (in_array($account_type, [User::ACCOUNT_TYPE_COMMUNITY, User::ACCOUNT_TYPE_RELAY])) {
$intro = $this->t('This page can be used to define the channels that will automatically be reshared by your account.'); $intro = $this->t('This page can be used to define the channels that will automatically be reshared by your account.');
$circles = [ $circles = [
0 => $this->l10n->t('Global Community') 0 => $this->l10n->t('Global Community')
@ -160,6 +161,12 @@ class Channels extends BaseSettings
$open = false; $open = false;
} }
if (in_array($account_type, [User::ACCOUNT_TYPE_COMMUNITY, User::ACCOUNT_TYPE_RELAY])) {
$publish = ["publish[$channel->code]", $this->t("Publish"), $channel->publish, $this->t("When selected, the channel results are reshared. This only works for public ActivityPub posts from the public timeline or the user defined circles.")];
} else {
$publish = null;
}
$channels[] = [ $channels[] = [
'id' => $channel->code, 'id' => $channel->code,
'open' => $open, 'open' => $open,
@ -174,6 +181,7 @@ class Channels extends BaseSettings
'video' => ["video[$channel->code]", $this->t("Videos"), $channel->mediaType & 2], 'video' => ["video[$channel->code]", $this->t("Videos"), $channel->mediaType & 2],
'audio' => ["audio[$channel->code]", $this->t("Audio"), $channel->mediaType & 4], 'audio' => ["audio[$channel->code]", $this->t("Audio"), $channel->mediaType & 4],
'languages' => ["languages[$channel->code][]", $this->t('Languages'), $channel->languages ?? $channel_languages, $this->t('Select all languages that you want to see in this channel.'), $languages, 'multiple'], 'languages' => ["languages[$channel->code][]", $this->t('Languages'), $channel->languages ?? $channel_languages, $this->t('Select all languages that you want to see in this channel.'), $languages, 'multiple'],
'publish' => $publish,
'delete' => ["delete[$channel->code]", $this->t("Delete channel") . ' (' . $channel->label . ')', false, $this->t("Check to delete this entry from the channel list")] 'delete' => ["delete[$channel->code]", $this->t("Delete channel") . ' (' . $channel->label . ')', false, $this->t("Check to delete this entry from the channel list")]
]; ];
} }

View file

@ -56,7 +56,7 @@ use Friendica\Database\DBA;
// This file is required several times during the test in DbaDefinition which justifies this condition // This file is required several times during the test in DbaDefinition which justifies this condition
if (!defined('DB_UPDATE_VERSION')) { if (!defined('DB_UPDATE_VERSION')) {
define('DB_UPDATE_VERSION', 1545); define('DB_UPDATE_VERSION', 1546);
} }
return [ return [
@ -563,6 +563,7 @@ return [
"full-text-search" => ["type" => "varchar(1023)", "comment" => "Full text search pattern, see https://mariadb.com/kb/en/full-text-index-overview/#in-boolean-mode"], "full-text-search" => ["type" => "varchar(1023)", "comment" => "Full text search pattern, see https://mariadb.com/kb/en/full-text-index-overview/#in-boolean-mode"],
"media-type" => ["type" => "smallint unsigned", "comment" => "Filtered media types"], "media-type" => ["type" => "smallint unsigned", "comment" => "Filtered media types"],
"languages" => ["type" => "mediumtext", "comment" => "Desired languages"], "languages" => ["type" => "mediumtext", "comment" => "Desired languages"],
"publish" => ["type" => "boolean", "comment" => "publish channel content"],
], ],
"indexes" => [ "indexes" => [
"PRIMARY" => ["id"], "PRIMARY" => ["id"],

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 2024.03-dev\n" "Project-Id-Version: 2024.03-dev\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-01-07 10:10+0000\n" "POT-Creation-Date: 2024-01-07 18:33+0000\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"
@ -67,7 +67,7 @@ msgstr ""
#: src/Module/Register.php:206 src/Module/Register.php:245 #: src/Module/Register.php:206 src/Module/Register.php:245
#: src/Module/Search/Directory.php:37 src/Module/Settings/Account.php:50 #: src/Module/Search/Directory.php:37 src/Module/Settings/Account.php:50
#: src/Module/Settings/Account.php:386 src/Module/Settings/Channels.php:57 #: src/Module/Settings/Account.php:386 src/Module/Settings/Channels.php:57
#: src/Module/Settings/Channels.php:125 src/Module/Settings/Delegation.php:90 #: src/Module/Settings/Channels.php:126 src/Module/Settings/Delegation.php:90
#: src/Module/Settings/Display.php:90 src/Module/Settings/Display.php:197 #: src/Module/Settings/Display.php:90 src/Module/Settings/Display.php:197
#: src/Module/Settings/Profile/Photo/Crop.php:165 #: src/Module/Settings/Profile/Photo/Crop.php:165
#: src/Module/Settings/Profile/Photo/Index.php:112 #: src/Module/Settings/Profile/Photo/Index.php:112
@ -382,7 +382,7 @@ msgstr ""
#: mod/notes.php:57 src/Content/Text/HTML.php:859 #: mod/notes.php:57 src/Content/Text/HTML.php:859
#: src/Module/Admin/Storage.php:142 src/Module/Filer/SaveTag.php:74 #: src/Module/Admin/Storage.php:142 src/Module/Filer/SaveTag.php:74
#: src/Module/Post/Edit.php:129 src/Module/Settings/Channels.php:200 #: src/Module/Post/Edit.php:129 src/Module/Settings/Channels.php:208
msgid "Save" msgid "Save"
msgstr "" msgstr ""
@ -794,12 +794,12 @@ msgstr ""
#: src/BaseModule.php:439 src/Content/Conversation/Factory/Channel.php:45 #: src/BaseModule.php:439 src/Content/Conversation/Factory/Channel.php:45
#: src/Content/Widget.php:239 src/Core/ACL.php:195 src/Module/Contact.php:414 #: src/Content/Widget.php:239 src/Core/ACL.php:195 src/Module/Contact.php:414
#: src/Module/PermissionTooltip.php:141 src/Module/PermissionTooltip.php:163 #: src/Module/PermissionTooltip.php:141 src/Module/PermissionTooltip.php:163
#: src/Module/Settings/Channels.php:142 #: src/Module/Settings/Channels.php:143
msgid "Followers" msgid "Followers"
msgstr "" msgstr ""
#: src/BaseModule.php:444 src/Content/Widget.php:240 src/Module/Contact.php:417 #: src/BaseModule.php:444 src/Content/Widget.php:240 src/Module/Contact.php:417
#: src/Module/Settings/Channels.php:141 #: src/Module/Settings/Channels.php:142
msgid "Following" msgid "Following"
msgstr "" msgstr ""
@ -957,7 +957,7 @@ msgstr ""
msgid "Enter user nickname: " msgid "Enter user nickname: "
msgstr "" msgstr ""
#: src/Console/User.php:182 src/Model/User.php:812 #: src/Console/User.php:182 src/Model/User.php:816
#: src/Module/Api/Twitter/ContactEndpoint.php:74 #: src/Module/Api/Twitter/ContactEndpoint.php:74
#: src/Module/Moderation/Users/Active.php:71 #: src/Module/Moderation/Users/Active.php:71
#: src/Module/Moderation/Users/Blocked.php:71 #: src/Module/Moderation/Users/Blocked.php:71
@ -1547,7 +1547,7 @@ msgid "Posts from accounts that are followed by accounts that you follow"
msgstr "" msgstr ""
#: src/Content/Conversation/Factory/Channel.php:47 #: src/Content/Conversation/Factory/Channel.php:47
#: src/Module/Settings/Channels.php:173 src/Module/Settings/Channels.php:191 #: src/Module/Settings/Channels.php:180 src/Module/Settings/Channels.php:199
msgid "Images" msgid "Images"
msgstr "" msgstr ""
@ -1556,7 +1556,7 @@ msgid "Posts with images"
msgstr "" msgstr ""
#: src/Content/Conversation/Factory/Channel.php:48 #: src/Content/Conversation/Factory/Channel.php:48
#: src/Module/Settings/Channels.php:175 src/Module/Settings/Channels.php:193 #: src/Module/Settings/Channels.php:182 src/Module/Settings/Channels.php:201
msgid "Audio" msgid "Audio"
msgstr "" msgstr ""
@ -1565,7 +1565,7 @@ msgid "Posts with audio"
msgstr "" msgstr ""
#: src/Content/Conversation/Factory/Channel.php:49 #: src/Content/Conversation/Factory/Channel.php:49
#: src/Module/Settings/Channels.php:174 src/Module/Settings/Channels.php:192 #: src/Module/Settings/Channels.php:181 src/Module/Settings/Channels.php:200
msgid "Videos" msgid "Videos"
msgstr "" msgstr ""
@ -1582,7 +1582,7 @@ msgid "Posts from local users on this server"
msgstr "" msgstr ""
#: src/Content/Conversation/Factory/Community.php:47 #: src/Content/Conversation/Factory/Community.php:47
#: src/Module/Settings/Channels.php:134 src/Module/Settings/Channels.php:139 #: src/Module/Settings/Channels.php:135 src/Module/Settings/Channels.php:140
msgid "Global Community" msgid "Global Community"
msgstr "" msgstr ""
@ -1745,7 +1745,7 @@ msgstr ""
#: src/Content/GroupManager.php:147 src/Content/Nav.php:278 #: src/Content/GroupManager.php:147 src/Content/Nav.php:278
#: src/Content/Text/HTML.php:880 src/Content/Widget.php:537 #: src/Content/Text/HTML.php:880 src/Content/Widget.php:537
#: src/Model/User.php:1374 #: src/Model/User.php:1378
msgid "Groups" msgid "Groups"
msgstr "" msgstr ""
@ -1766,7 +1766,7 @@ msgstr ""
msgid "Create new group" msgid "Create new group"
msgstr "" msgstr ""
#: src/Content/Item.php:332 src/Model/Item.php:3204 #: src/Content/Item.php:332 src/Model/Item.php:3201
msgid "event" msgid "event"
msgstr "" msgstr ""
@ -1774,7 +1774,7 @@ msgstr ""
msgid "status" msgid "status"
msgstr "" msgstr ""
#: src/Content/Item.php:341 src/Model/Item.php:3206 #: src/Content/Item.php:341 src/Model/Item.php:3203
#: src/Module/Post/Tag/Add.php:123 #: src/Module/Post/Tag/Add.php:123
msgid "photo" msgid "photo"
msgstr "" msgstr ""
@ -1842,8 +1842,8 @@ msgstr ""
msgid "Ignore %s server" msgid "Ignore %s server"
msgstr "" msgstr ""
#: src/Content/Item.php:443 src/Module/Settings/Channels.php:176 #: src/Content/Item.php:443 src/Module/Settings/Channels.php:183
#: src/Module/Settings/Channels.php:194 src/Object/Post.php:509 #: src/Module/Settings/Channels.php:202 src/Object/Post.php:509
msgid "Languages" msgid "Languages"
msgstr "" msgstr ""
@ -2046,7 +2046,7 @@ msgstr ""
msgid "Terms of Service of this Friendica instance" msgid "Terms of Service of this Friendica instance"
msgstr "" msgstr ""
#: src/Content/Nav.php:306 src/Module/Settings/Channels.php:140 #: src/Content/Nav.php:306 src/Module/Settings/Channels.php:141
#: view/theme/frio/theme.php:239 #: view/theme/frio/theme.php:239
msgid "Network" msgid "Network"
msgstr "" msgstr ""
@ -2187,8 +2187,8 @@ msgid ""
"<a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">%2$s</a> %3$s" "<a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">%2$s</a> %3$s"
msgstr "" msgstr ""
#: src/Content/Text/BBCode.php:994 src/Model/Item.php:3937 #: src/Content/Text/BBCode.php:994 src/Model/Item.php:3934
#: src/Model/Item.php:3943 src/Model/Item.php:3944 #: src/Model/Item.php:3940 src/Model/Item.php:3941
msgid "Link to source" msgid "Link to source"
msgstr "" msgstr ""
@ -2369,7 +2369,7 @@ msgid "All"
msgstr "" msgstr ""
#: src/Content/Widget.php:591 src/Module/Admin/Site.php:466 #: src/Content/Widget.php:591 src/Module/Admin/Site.php:466
#: src/Module/BaseSettings.php:125 src/Module/Settings/Channels.php:196 #: src/Module/BaseSettings.php:125 src/Module/Settings/Channels.php:204
#: src/Module/Settings/Display.php:315 #: src/Module/Settings/Display.php:315
msgid "Channels" msgid "Channels"
msgstr "" msgstr ""
@ -2851,7 +2851,7 @@ msgstr ""
msgid "Could not connect to database." msgid "Could not connect to database."
msgstr "" msgstr ""
#: src/Core/L10n.php:441 src/Model/Item.php:2248 #: src/Core/L10n.php:441 src/Model/Item.php:2245
msgid "Undetermined" msgid "Undetermined"
msgstr "" msgstr ""
@ -3409,91 +3409,91 @@ msgstr ""
msgid "Happy Birthday %s" msgid "Happy Birthday %s"
msgstr "" msgstr ""
#: src/Model/Item.php:2255 #: src/Model/Item.php:2252
#, php-format #, php-format
msgid "%s (%s - %s): %s" msgid "%s (%s - %s): %s"
msgstr "" msgstr ""
#: src/Model/Item.php:2257 #: src/Model/Item.php:2254
#, php-format #, php-format
msgid "%s (%s): %s" msgid "%s (%s): %s"
msgstr "" msgstr ""
#: src/Model/Item.php:2260 #: src/Model/Item.php:2257
#, php-format #, php-format
msgid "Detected languages in this post:\\n%s" msgid "Detected languages in this post:\\n%s"
msgstr "" msgstr ""
#: src/Model/Item.php:3208 #: src/Model/Item.php:3205
msgid "activity" msgid "activity"
msgstr "" msgstr ""
#: src/Model/Item.php:3210 #: src/Model/Item.php:3207
msgid "comment" msgid "comment"
msgstr "" msgstr ""
#: src/Model/Item.php:3213 src/Module/Post/Tag/Add.php:123 #: src/Model/Item.php:3210 src/Module/Post/Tag/Add.php:123
msgid "post" msgid "post"
msgstr "" msgstr ""
#: src/Model/Item.php:3383 #: src/Model/Item.php:3380
#, php-format #, php-format
msgid "%s is blocked" msgid "%s is blocked"
msgstr "" msgstr ""
#: src/Model/Item.php:3385 #: src/Model/Item.php:3382
#, php-format #, php-format
msgid "%s is ignored" msgid "%s is ignored"
msgstr "" msgstr ""
#: src/Model/Item.php:3387 #: src/Model/Item.php:3384
#, php-format #, php-format
msgid "Content from %s is collapsed" msgid "Content from %s is collapsed"
msgstr "" msgstr ""
#: src/Model/Item.php:3391 #: src/Model/Item.php:3388
#, php-format #, php-format
msgid "Content warning: %s" msgid "Content warning: %s"
msgstr "" msgstr ""
#: src/Model/Item.php:3844 #: src/Model/Item.php:3841
msgid "bytes" msgid "bytes"
msgstr "" msgstr ""
#: src/Model/Item.php:3875 #: src/Model/Item.php:3872
#, php-format #, php-format
msgid "%2$s (%3$d%%, %1$d vote)" msgid "%2$s (%3$d%%, %1$d vote)"
msgid_plural "%2$s (%3$d%%, %1$d votes)" msgid_plural "%2$s (%3$d%%, %1$d votes)"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: src/Model/Item.php:3877 #: src/Model/Item.php:3874
#, php-format #, php-format
msgid "%2$s (%1$d vote)" msgid "%2$s (%1$d vote)"
msgid_plural "%2$s (%1$d votes)" msgid_plural "%2$s (%1$d votes)"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: src/Model/Item.php:3882 #: src/Model/Item.php:3879
#, php-format #, php-format
msgid "%d voter. Poll end: %s" msgid "%d voter. Poll end: %s"
msgid_plural "%d voters. Poll end: %s" msgid_plural "%d voters. Poll end: %s"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: src/Model/Item.php:3884 #: src/Model/Item.php:3881
#, php-format #, php-format
msgid "%d voter." msgid "%d voter."
msgid_plural "%d voters." msgid_plural "%d voters."
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: src/Model/Item.php:3886 #: src/Model/Item.php:3883
#, php-format #, php-format
msgid "Poll end: %s" msgid "Poll end: %s"
msgstr "" msgstr ""
#: src/Model/Item.php:3920 src/Model/Item.php:3921 #: src/Model/Item.php:3917 src/Model/Item.php:3918
msgid "View on separate page" msgid "View on separate page"
msgstr "" msgstr ""
@ -3651,145 +3651,145 @@ msgstr ""
msgid "Contact information and Social Networks" msgid "Contact information and Social Networks"
msgstr "" msgstr ""
#: src/Model/User.php:225 src/Model/User.php:1287 #: src/Model/User.php:225 src/Model/User.php:1291
msgid "SERIOUS ERROR: Generation of security keys failed." msgid "SERIOUS ERROR: Generation of security keys failed."
msgstr "" msgstr ""
#: src/Model/User.php:721 src/Model/User.php:754 #: src/Model/User.php:725 src/Model/User.php:758
msgid "Login failed" msgid "Login failed"
msgstr "" msgstr ""
#: src/Model/User.php:786 #: src/Model/User.php:790
msgid "Not enough information to authenticate" msgid "Not enough information to authenticate"
msgstr "" msgstr ""
#: src/Model/User.php:907 #: src/Model/User.php:911
msgid "Password can't be empty" msgid "Password can't be empty"
msgstr "" msgstr ""
#: src/Model/User.php:949 #: src/Model/User.php:953
msgid "Empty passwords are not allowed." msgid "Empty passwords are not allowed."
msgstr "" msgstr ""
#: src/Model/User.php:953 #: src/Model/User.php:957
msgid "" msgid ""
"The new password has been exposed in a public data dump, please choose " "The new password has been exposed in a public data dump, please choose "
"another." "another."
msgstr "" msgstr ""
#: src/Model/User.php:957 #: src/Model/User.php:961
msgid "The password length is limited to 72 characters." msgid "The password length is limited to 72 characters."
msgstr "" msgstr ""
#: src/Model/User.php:961 #: src/Model/User.php:965
msgid "The password can't contain white spaces nor accentuated letters" msgid "The password can't contain white spaces nor accentuated letters"
msgstr "" msgstr ""
#: src/Model/User.php:1170 #: src/Model/User.php:1174
msgid "Passwords do not match. Password unchanged." msgid "Passwords do not match. Password unchanged."
msgstr "" msgstr ""
#: src/Model/User.php:1177 #: src/Model/User.php:1181
msgid "An invitation is required." msgid "An invitation is required."
msgstr "" msgstr ""
#: src/Model/User.php:1181 #: src/Model/User.php:1185
msgid "Invitation could not be verified." msgid "Invitation could not be verified."
msgstr "" msgstr ""
#: src/Model/User.php:1189 #: src/Model/User.php:1193
msgid "Invalid OpenID url" msgid "Invalid OpenID url"
msgstr "" msgstr ""
#: src/Model/User.php:1202 src/Security/Authentication.php:241 #: src/Model/User.php:1206 src/Security/Authentication.php:241
msgid "" msgid ""
"We encountered a problem while logging in with the OpenID you provided. " "We encountered a problem while logging in with the OpenID you provided. "
"Please check the correct spelling of the ID." "Please check the correct spelling of the ID."
msgstr "" msgstr ""
#: src/Model/User.php:1202 src/Security/Authentication.php:241 #: src/Model/User.php:1206 src/Security/Authentication.php:241
msgid "The error message was:" msgid "The error message was:"
msgstr "" msgstr ""
#: src/Model/User.php:1208 #: src/Model/User.php:1212
msgid "Please enter the required information." msgid "Please enter the required information."
msgstr "" msgstr ""
#: src/Model/User.php:1222 #: src/Model/User.php:1226
#, php-format #, php-format
msgid "" msgid ""
"system.username_min_length (%s) and system.username_max_length (%s) are " "system.username_min_length (%s) and system.username_max_length (%s) are "
"excluding each other, swapping values." "excluding each other, swapping values."
msgstr "" msgstr ""
#: src/Model/User.php:1229 #: src/Model/User.php:1233
#, php-format #, php-format
msgid "Username should be at least %s character." msgid "Username should be at least %s character."
msgid_plural "Username should be at least %s characters." msgid_plural "Username should be at least %s characters."
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: src/Model/User.php:1233 #: src/Model/User.php:1237
#, php-format #, php-format
msgid "Username should be at most %s character." msgid "Username should be at most %s character."
msgid_plural "Username should be at most %s characters." msgid_plural "Username should be at most %s characters."
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: src/Model/User.php:1241 #: src/Model/User.php:1245
msgid "That doesn't appear to be your full (First Last) name." msgid "That doesn't appear to be your full (First Last) name."
msgstr "" msgstr ""
#: src/Model/User.php:1246 #: src/Model/User.php:1250
msgid "Your email domain is not among those allowed on this site." msgid "Your email domain is not among those allowed on this site."
msgstr "" msgstr ""
#: src/Model/User.php:1250 #: src/Model/User.php:1254
msgid "Not a valid email address." msgid "Not a valid email address."
msgstr "" msgstr ""
#: src/Model/User.php:1253 #: src/Model/User.php:1257
msgid "The nickname was blocked from registration by the nodes admin." msgid "The nickname was blocked from registration by the nodes admin."
msgstr "" msgstr ""
#: src/Model/User.php:1257 src/Model/User.php:1263 #: src/Model/User.php:1261 src/Model/User.php:1267
msgid "Cannot use that email." msgid "Cannot use that email."
msgstr "" msgstr ""
#: src/Model/User.php:1269 #: src/Model/User.php:1273
msgid "Your nickname can only contain a-z, 0-9 and _." msgid "Your nickname can only contain a-z, 0-9 and _."
msgstr "" msgstr ""
#: src/Model/User.php:1277 src/Model/User.php:1334 #: src/Model/User.php:1281 src/Model/User.php:1338
msgid "Nickname is already registered. Please choose another." msgid "Nickname is already registered. Please choose another."
msgstr "" msgstr ""
#: src/Model/User.php:1321 src/Model/User.php:1325 #: src/Model/User.php:1325 src/Model/User.php:1329
msgid "An error occurred during registration. Please try again." msgid "An error occurred during registration. Please try again."
msgstr "" msgstr ""
#: src/Model/User.php:1348 #: src/Model/User.php:1352
msgid "An error occurred creating your default profile. Please try again." msgid "An error occurred creating your default profile. Please try again."
msgstr "" msgstr ""
#: src/Model/User.php:1355 #: src/Model/User.php:1359
msgid "An error occurred creating your self contact. Please try again." msgid "An error occurred creating your self contact. Please try again."
msgstr "" msgstr ""
#: src/Model/User.php:1360 #: src/Model/User.php:1364
msgid "Friends" msgid "Friends"
msgstr "" msgstr ""
#: src/Model/User.php:1364 #: src/Model/User.php:1368
msgid "" msgid ""
"An error occurred creating your default contact circle. Please try again." "An error occurred creating your default contact circle. Please try again."
msgstr "" msgstr ""
#: src/Model/User.php:1408 #: src/Model/User.php:1412
msgid "Profile Photos" msgid "Profile Photos"
msgstr "" msgstr ""
#: src/Model/User.php:1588 #: src/Model/User.php:1592
#, php-format #, php-format
msgid "" msgid ""
"\n" "\n"
@ -3797,7 +3797,7 @@ msgid ""
"\t\t\tthe administrator of %2$s has set up an account for you." "\t\t\tthe administrator of %2$s has set up an account for you."
msgstr "" msgstr ""
#: src/Model/User.php:1591 #: src/Model/User.php:1595
#, php-format #, php-format
msgid "" msgid ""
"\n" "\n"
@ -3833,12 +3833,12 @@ msgid ""
"\t\tThank you and welcome to %4$s." "\t\tThank you and welcome to %4$s."
msgstr "" msgstr ""
#: src/Model/User.php:1623 src/Model/User.php:1729 #: src/Model/User.php:1627 src/Model/User.php:1733
#, php-format #, php-format
msgid "Registration details for %s" msgid "Registration details for %s"
msgstr "" msgstr ""
#: src/Model/User.php:1643 #: src/Model/User.php:1647
#, php-format #, php-format
msgid "" msgid ""
"\n" "\n"
@ -3854,12 +3854,12 @@ msgid ""
"\t\t" "\t\t"
msgstr "" msgstr ""
#: src/Model/User.php:1662 #: src/Model/User.php:1666
#, php-format #, php-format
msgid "Registration at %s" msgid "Registration at %s"
msgstr "" msgstr ""
#: src/Model/User.php:1686 #: src/Model/User.php:1690
#, php-format #, php-format
msgid "" msgid ""
"\n" "\n"
@ -3868,7 +3868,7 @@ msgid ""
"\t\t\t" "\t\t\t"
msgstr "" msgstr ""
#: src/Model/User.php:1694 #: src/Model/User.php:1698
#, php-format #, php-format
msgid "" msgid ""
"\n" "\n"
@ -3906,7 +3906,7 @@ msgid ""
"\t\t\tThank you and welcome to %2$s." "\t\t\tThank you and welcome to %2$s."
msgstr "" msgstr ""
#: src/Model/User.php:1756 #: src/Model/User.php:1760
msgid "" msgid ""
"User with delegates can't be removed, please remove delegate users first" "User with delegates can't be removed, please remove delegate users first"
msgstr "" msgstr ""
@ -6120,7 +6120,7 @@ msgstr ""
#: src/Module/Moderation/Blocklist/Server/Index.php:116 #: src/Module/Moderation/Blocklist/Server/Index.php:116
#: src/Module/Moderation/Item/Delete.php:67 src/Module/Register.php:148 #: src/Module/Moderation/Item/Delete.php:67 src/Module/Register.php:148
#: src/Module/Security/TwoFactor/Verify.php:101 #: src/Module/Security/TwoFactor/Verify.php:101
#: src/Module/Settings/Channels.php:166 src/Module/Settings/Channels.php:184 #: src/Module/Settings/Channels.php:173 src/Module/Settings/Channels.php:192
#: src/Module/Settings/TwoFactor/Index.php:161 #: src/Module/Settings/TwoFactor/Index.php:161
#: src/Module/Settings/TwoFactor/Verify.php:158 #: src/Module/Settings/TwoFactor/Verify.php:158
msgid "Required" msgid "Required"
@ -7373,7 +7373,7 @@ msgstr ""
#: src/Module/Friendica.php:102 #: src/Module/Friendica.php:102
#: src/Module/Moderation/Blocklist/Server/Index.php:87 #: src/Module/Moderation/Blocklist/Server/Index.php:87
#: src/Module/Moderation/Blocklist/Server/Index.php:111 #: src/Module/Moderation/Blocklist/Server/Index.php:111
#: src/Module/Settings/Channels.php:203 #: src/Module/Settings/Channels.php:211
msgid "Reason for the block" msgid "Reason for the block"
msgstr "" msgstr ""
@ -8121,7 +8121,7 @@ msgstr ""
#: src/Module/Moderation/Blocklist/Server/Index.php:86 #: src/Module/Moderation/Blocklist/Server/Index.php:86
#: src/Module/Moderation/Blocklist/Server/Index.php:110 #: src/Module/Moderation/Blocklist/Server/Index.php:110
#: src/Module/Settings/Channels.php:202 #: src/Module/Settings/Channels.php:210
msgid "Blocked server domain pattern" msgid "Blocked server domain pattern"
msgstr "" msgstr ""
@ -10119,90 +10119,100 @@ msgstr ""
msgid "No Addon settings configured" msgid "No Addon settings configured"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:132 #: src/Module/Settings/Channels.php:133
msgid "" msgid ""
"This page can be used to define the channels that will automatically be " "This page can be used to define the channels that will automatically be "
"reshared by your account." "reshared by your account."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:137 #: src/Module/Settings/Channels.php:138
msgid "This page can be used to define your own channels." msgid "This page can be used to define your own channels."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:166 src/Module/Settings/Channels.php:184 #: src/Module/Settings/Channels.php:165
msgid "Publish"
msgstr ""
#: src/Module/Settings/Channels.php:165
msgid ""
"When selected, the channel results are reshared. This only works for public "
"ActivityPub posts from the public timeline or the user defined circles."
msgstr ""
#: src/Module/Settings/Channels.php:173 src/Module/Settings/Channels.php:192
#: src/Module/Settings/Display.php:338 #: src/Module/Settings/Display.php:338
msgid "Label" msgid "Label"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:167 src/Module/Settings/Channels.php:185 #: src/Module/Settings/Channels.php:174 src/Module/Settings/Channels.php:193
#: src/Module/Settings/Display.php:339 #: src/Module/Settings/Display.php:339
#: src/Module/Settings/TwoFactor/AppSpecific.php:137 #: src/Module/Settings/TwoFactor/AppSpecific.php:137
msgid "Description" msgid "Description"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:168 src/Module/Settings/Channels.php:186 #: src/Module/Settings/Channels.php:175 src/Module/Settings/Channels.php:194
msgid "Access Key" msgid "Access Key"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:169 src/Module/Settings/Channels.php:187 #: src/Module/Settings/Channels.php:176 src/Module/Settings/Channels.php:195
msgid "Circle/Channel" msgid "Circle/Channel"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:170 src/Module/Settings/Channels.php:188 #: src/Module/Settings/Channels.php:177 src/Module/Settings/Channels.php:196
msgid "Include Tags" msgid "Include Tags"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:171 src/Module/Settings/Channels.php:189 #: src/Module/Settings/Channels.php:178 src/Module/Settings/Channels.php:197
msgid "Exclude Tags" msgid "Exclude Tags"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:172 src/Module/Settings/Channels.php:190 #: src/Module/Settings/Channels.php:179 src/Module/Settings/Channels.php:198
msgid "Full Text Search" msgid "Full Text Search"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:176 src/Module/Settings/Channels.php:194 #: src/Module/Settings/Channels.php:183 src/Module/Settings/Channels.php:202
msgid "Select all languages that you want to see in this channel." msgid "Select all languages that you want to see in this channel."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:177 #: src/Module/Settings/Channels.php:185
msgid "Delete channel" msgid "Delete channel"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:177 #: src/Module/Settings/Channels.php:185
msgid "Check to delete this entry from the channel list" msgid "Check to delete this entry from the channel list"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:184 #: src/Module/Settings/Channels.php:192
msgid "Short name for the channel. It is displayed on the channels widget." msgid "Short name for the channel. It is displayed on the channels widget."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:185 #: src/Module/Settings/Channels.php:193
msgid "This should describe the content of the channel in a few word." msgid "This should describe the content of the channel in a few word."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:186 #: src/Module/Settings/Channels.php:194
msgid "" msgid ""
"When you want to access this channel via an access key, you can define it " "When you want to access this channel via an access key, you can define it "
"here. Pay attention to not use an already used one." "here. Pay attention to not use an already used one."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:187 #: src/Module/Settings/Channels.php:195
msgid "Select a circle or channel, that your channel should be based on." msgid "Select a circle or channel, that your channel should be based on."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:188 #: src/Module/Settings/Channels.php:196
msgid "" msgid ""
"Comma separated list of tags. A post will be used when it contains any of " "Comma separated list of tags. A post will be used when it contains any of "
"the listed tags." "the listed tags."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:189 #: src/Module/Settings/Channels.php:197
msgid "" msgid ""
"Comma separated list of tags. If a post contain any of these tags, then it " "Comma separated list of tags. If a post contain any of these tags, then it "
"will not be part of nthis channel." "will not be part of nthis channel."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:190 #: src/Module/Settings/Channels.php:198
#, php-format #, php-format
msgid "" msgid ""
"Search terms for the body, supports the \"boolean mode\" operators from " "Search terms for the body, supports the \"boolean mode\" operators from "
@ -10210,35 +10220,35 @@ msgid ""
"keywords: %s" "keywords: %s"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:191 #: src/Module/Settings/Channels.php:199
msgid "Check to display images in the channel." msgid "Check to display images in the channel."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:192 #: src/Module/Settings/Channels.php:200
msgid "Check to display videos in the channel." msgid "Check to display videos in the channel."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:193 #: src/Module/Settings/Channels.php:201
msgid "Check to display audio in the channel." msgid "Check to display audio in the channel."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:198 #: src/Module/Settings/Channels.php:206
msgid "Add new entry to the channel list" msgid "Add new entry to the channel list"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:199 #: src/Module/Settings/Channels.php:207
msgid "Add" msgid "Add"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:201 #: src/Module/Settings/Channels.php:209
msgid "Current Entries in the channel list" msgid "Current Entries in the channel list"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:204 #: src/Module/Settings/Channels.php:212
msgid "Delete entry from the channel list" msgid "Delete entry from the channel list"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:205 #: src/Module/Settings/Channels.php:213
msgid "Delete entry from the channel list?" msgid "Delete entry from the channel list?"
msgstr "" msgstr ""

View file

@ -36,6 +36,9 @@
{{include file="field_checkbox.tpl" field=$e.video}} {{include file="field_checkbox.tpl" field=$e.video}}
{{include file="field_checkbox.tpl" field=$e.audio}} {{include file="field_checkbox.tpl" field=$e.audio}}
{{include file="field_select.tpl" field=$e.languages}} {{include file="field_select.tpl" field=$e.languages}}
{{if $e.publish}}
{{include file="field_checkbox.tpl" field=$e.publish}}
{{/if}}
{{include file="field_checkbox.tpl" field=$e.delete}} {{include file="field_checkbox.tpl" field=$e.delete}}
<hr> <hr>
{{/foreach}} {{/foreach}}

View file

@ -53,6 +53,9 @@
{{include file="field_checkbox.tpl" field=$e.video}} {{include file="field_checkbox.tpl" field=$e.video}}
{{include file="field_checkbox.tpl" field=$e.audio}} {{include file="field_checkbox.tpl" field=$e.audio}}
{{include file="field_select.tpl" field=$e.languages}} {{include file="field_select.tpl" field=$e.languages}}
{{if $e.publish}}
{{include file="field_checkbox.tpl" field=$e.publish}}
{{/if}}
{{include file="field_checkbox.tpl" field=$e.delete}} {{include file="field_checkbox.tpl" field=$e.delete}}
<div class="submit"> <div class="submit">
<button type="submit" class="btn btn-primary" name="edit_channel" value="{{$l10n.savechanges}}">{{$l10n.savechanges}}</button> <button type="submit" class="btn btn-primary" name="edit_channel" value="{{$l10n.savechanges}}">{{$l10n.savechanges}}</button>