Merge pull request #11549 from annando/move-to-avatar-cache

Console command to move avatars to the avatar cache
This commit is contained in:
Hypolite Petovan 2022-05-25 09:03:12 -04:00 committed by GitHub
commit ae3acba231
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 347 additions and 134 deletions

View File

@ -0,0 +1,162 @@
<?php
/**
* @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
namespace Friendica\Console;
use Friendica\App\BaseURL;
use Friendica\Contact\Avatar;
use Friendica\Core\L10n;
use Friendica\Model\Contact;
use Friendica\Model\Photo;
use Friendica\Util\Images;
use Friendica\Object\Image;
/**
* tool to move cached avatars to the avatar file cache.
*/
class MoveToAvatarCache extends \Asika\SimpleConsole\Console
{
protected $helpOptions = ['h', 'help', '?'];
/**
* @var $dba Friendica\Database\Database
*/
private $dba;
/**
* @var $baseurl Friendica\App\BaseURL
*/
private $baseurl;
/**
* @var L10n
*/
private $l10n;
protected function getHelp()
{
$help = <<<HELP
console movetoavatarcache - Move all cached avatars to the file based avatar cache
Synopsis
bin/console movetoavatarcache
Description
bin/console movetoavatarcache
Move all cached avatars to the file based avatar cache
Options
-h|--help|-? Show help information
HELP;
return $help;
}
public function __construct(\Friendica\Database\Database $dba, BaseURL $baseurl, L10n $l10n, array $argv = null)
{
parent::__construct($argv);
$this->dba = $dba;
$this->baseurl = $baseurl;
$this->l10n = $l10n;
}
protected function doExecute()
{
$condition = ["`avatar` != ? AND `photo` LIKE ? AND `uid` = ? AND `uri-id` != ? AND NOT `uri-id` IS NULL",
'', $this->baseurl->get() . '/photo/%', 0, 0];
$count = 0;
$total = $this->dba->count('contact', $condition);
$contacts = $this->dba->select('contact', ['id', 'avatar', 'photo', 'uri-id', 'url', 'avatar'], $condition, ['order' => ['id']]);
while ($contact = $this->dba->fetch($contacts)) {
$this->out(++$count . '/' . $total . "\t" . $contact['id'] . "\t" . $contact['url'] . "\t", false);
$resourceid = Photo::ridFromURI($contact['photo']);
if (empty($resourceid)) {
$this->out($this->l10n->t('no resource in photo %s', $contact['photo']) . ' ', false);
}
$this->storeAvatar($resourceid, $contact, false);
}
$count = 0;
$totals = $this->dba->p("SELECT COUNT(DISTINCT(`resource-id`)) AS `total` FROM `photo` WHERE `contact-id` != ? AND `photo-type` = ?;", 0, Photo::CONTACT_AVATAR);
$total = $this->dba->fetch($totals)['total'] ?? 0;
$photos = $this->dba->p("SELECT `resource-id`, MAX(`contact-id`) AS `contact-id` FROM `photo` WHERE `contact-id` != ? AND `photo-type` = ? GROUP BY `resource-id`;", 0, Photo::CONTACT_AVATAR);
while ($photo = $this->dba->fetch($photos)) {
$contact = Contact::getById($photo['contact-id'], ['id', 'avatar', 'photo', 'uri-id', 'url', 'avatar']);
if (empty($contact)) {
continue;
}
$this->out(++$count . '/' . $total . "\t" . $contact['id'] . "\t" . $contact['url'] . "\t", false);
$this->storeAvatar($photo['resource-id'], $contact, true);
}
return 0;
}
private function storeAvatar(string $resourceid, array $contact, bool $quit_on_invalid)
{
$valid = !empty($resourceid);
if ($valid) {
$this->out('1', false);
$photo = Photo::selectFirst([], ['resource-id' => $resourceid], ['order' => ['scale']]);
if (empty($photo)) {
$this->out(' ' . $this->l10n->t('no photo with id %s', $resourceid) . ' ', false);
$valid = false;
}
}
if ($valid) {
$this->out('2', false);
$imgdata = Photo::getImageDataForPhoto($photo);
if (empty($imgdata)) {
$this->out(' ' . $this->l10n->t('no image data for photo with id %s', $resourceid) . ' ', false);
$valid = false;
}
}
if ($valid) {
$this->out('3', false);
$image = new Image($imgdata, Images::getMimeTypeByData($imgdata));
if (!$image->isValid()) {
$this->out(' ' . $this->l10n->t('invalid image for id %s', $resourceid) . ' ', false);
$valid = false;
}
}
if ($valid) {
$this->out('4', false);
$fields = Avatar::storeAvatarByImage($contact, $image);
} else {
$fields = ['photo' => '', 'thumb' => '', 'micro' => ''];
}
if ($quit_on_invalid && $fields['photo'] == '') {
$this->out(' ' . $this->l10n->t('Quit on invalid photo %s', $contact['avatar']));
Photo::delete(['resource-id' => $resourceid]);
return;
}
$this->out('5', false);
Contact::update($fields, ['uri-id' => $contact['uri-id']]);
$this->out('6', false);
Photo::delete(['resource-id' => $resourceid]);
$this->out(' ' . $fields['photo']);
}
}

View File

@ -72,11 +72,6 @@ class Avatar
return $fields; return $fields;
} }
$guid = Item::guidFromUri($contact['url'], parse_url($contact['url'], PHP_URL_HOST));
$filename = substr($guid, 0, 2) . '/' . substr($guid, 3, 2) . '/' . substr($guid, 5, 3) . '/' .
substr($guid, 9, 2) .'/' . substr($guid, 11, 2) . '/' . substr($guid, 13, 4). '/' . substr($guid, 18) . '-';
$fetchResult = HTTPSignature::fetchRaw($avatar, 0, [HttpClientOptions::ACCEPT_CONTENT => [HttpClientAccept::IMAGE]]); $fetchResult = HTTPSignature::fetchRaw($avatar, 0, [HttpClientOptions::ACCEPT_CONTENT => [HttpClientAccept::IMAGE]]);
$img_str = $fetchResult->getBody(); $img_str = $fetchResult->getBody();
@ -91,6 +86,8 @@ class Avatar
return $fields; return $fields;
} }
$filename = self::getFilename($contact['url']);
$fields['photo'] = self::storeAvatarCache($image, $filename, Proxy::PIXEL_SMALL); $fields['photo'] = self::storeAvatarCache($image, $filename, Proxy::PIXEL_SMALL);
$fields['thumb'] = self::storeAvatarCache($image, $filename, Proxy::PIXEL_THUMB); $fields['thumb'] = self::storeAvatarCache($image, $filename, Proxy::PIXEL_THUMB);
$fields['micro'] = self::storeAvatarCache($image, $filename, Proxy::PIXEL_MICRO); $fields['micro'] = self::storeAvatarCache($image, $filename, Proxy::PIXEL_MICRO);
@ -100,6 +97,36 @@ class Avatar
return $fields; return $fields;
} }
public static function storeAvatarByImage(array $contact, Image $image): array
{
$fields = ['photo' => '', 'thumb' => '', 'micro' => ''];
if (!DI::config()->get('system', 'avatar_cache')) {
self::deleteCache($contact);
return $fields;
}
if (Network::isLocalLink($contact['avatar'])) {
return $fields;
}
$filename = self::getFilename($contact['url']);
$fields['photo'] = self::storeAvatarCache($image, $filename, Proxy::PIXEL_SMALL);
$fields['thumb'] = self::storeAvatarCache($image, $filename, Proxy::PIXEL_THUMB);
$fields['micro'] = self::storeAvatarCache($image, $filename, Proxy::PIXEL_MICRO);
return $fields;
}
private static function getFilename(string $url)
{
$guid = Item::guidFromUri($url, parse_url($url, PHP_URL_HOST));
return substr($guid, 0, 2) . '/' . substr($guid, 3, 2) . '/' . substr($guid, 5, 3) . '/' .
substr($guid, 9, 2) .'/' . substr($guid, 11, 2) . '/' . substr($guid, 13, 4). '/' . substr($guid, 18) . '-';
}
private static function storeAvatarCache(Image $image, string $filename, int $size): string private static function storeAvatarCache(Image $image, string $filename, int $size): string
{ {
$image->scaleDown($size); $image->scaleDown($size);

View File

@ -59,6 +59,7 @@ Commands:
autoinstall Starts automatic installation of friendica based on values from htconfig.php autoinstall Starts automatic installation of friendica based on values from htconfig.php
lock Edit site locks lock Edit site locks
maintenance Set maintenance mode for this node maintenance Set maintenance mode for this node
movetoavatarcache Move cached avatars to the file based avatar cache
user User management user User management
php2po Generate a messages.po file from a strings.php file php2po Generate a messages.po file from a strings.php file
po2php Generate a strings.php file from a messages.po file po2php Generate a strings.php file from a messages.po file
@ -91,6 +92,7 @@ HELP;
'globalcommunitysilence' => Friendica\Console\GlobalCommunitySilence::class, 'globalcommunitysilence' => Friendica\Console\GlobalCommunitySilence::class,
'lock' => Friendica\Console\Lock::class, 'lock' => Friendica\Console\Lock::class,
'maintenance' => Friendica\Console\Maintenance::class, 'maintenance' => Friendica\Console\Maintenance::class,
'movetoavatarcache' => Friendica\Console\MoveToAvatarCache::class,
'php2po' => Friendica\Console\PhpToPo::class, 'php2po' => Friendica\Console\PhpToPo::class,
'postupdate' => Friendica\Console\PostUpdate::class, 'postupdate' => Friendica\Console\PostUpdate::class,
'po2php' => Friendica\Console\PoToPhp::class, 'po2php' => Friendica\Console\PoToPhp::class,

View File

@ -704,10 +704,7 @@ class Photo
} }
$image_uri = substr($image_uri, strrpos($image_uri, '/') + 1); $image_uri = substr($image_uri, strrpos($image_uri, '/') + 1);
$image_uri = substr($image_uri, 0, strpos($image_uri, '-')); $image_uri = substr($image_uri, 0, strpos($image_uri, '-'));
if (!strlen($image_uri)) { return trim($image_uri);
return '';
}
return $image_uri;
} }
/** /**

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 2022.05-rc\n" "Project-Id-Version: 2022.05-rc\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-05-16 06:01+0000\n" "POT-Creation-Date: 2022-05-24 20:12+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"
@ -20,7 +20,7 @@ msgstr ""
#: mod/cal.php:46 mod/cal.php:50 mod/follow.php:39 mod/redir.php:36 #: mod/cal.php:46 mod/cal.php:50 mod/follow.php:39 mod/redir.php:36
#: mod/redir.php:177 src/Module/Conversation/Community.php:181 #: mod/redir.php:177 src/Module/Conversation/Community.php:181
#: src/Module/Debug/ItemBody.php:37 src/Module/Diaspora/Receive.php:57 #: src/Module/Debug/ItemBody.php:38 src/Module/Diaspora/Receive.php:57
#: src/Module/Item/Follow.php:42 src/Module/Item/Ignore.php:41 #: src/Module/Item/Follow.php:42 src/Module/Item/Ignore.php:41
#: src/Module/Item/Pin.php:42 src/Module/Item/Pin.php:57 #: src/Module/Item/Pin.php:42 src/Module/Item/Pin.php:57
#: src/Module/Item/Star.php:43 #: src/Module/Item/Star.php:43
@ -119,7 +119,7 @@ msgid "The feed for this item is unavailable."
msgstr "" msgstr ""
#: mod/editpost.php:38 mod/events.php:217 mod/follow.php:56 mod/follow.php:130 #: mod/editpost.php:38 mod/events.php:217 mod/follow.php:56 mod/follow.php:130
#: mod/item.php:181 mod/item.php:186 mod/item.php:873 mod/message.php:69 #: mod/item.php:181 mod/item.php:186 mod/item.php:875 mod/message.php:69
#: mod/message.php:111 mod/notes.php:44 mod/ostatus_subscribe.php:33 #: mod/message.php:111 mod/notes.php:44 mod/ostatus_subscribe.php:33
#: mod/photos.php:160 mod/photos.php:897 mod/repair_ostatus.php:31 #: mod/photos.php:160 mod/photos.php:897 mod/repair_ostatus.php:31
#: mod/settings.php:49 mod/settings.php:59 mod/settings.php:165 #: mod/settings.php:49 mod/settings.php:59 mod/settings.php:165
@ -127,7 +127,7 @@ msgstr ""
#: mod/unfollow.php:50 mod/unfollow.php:82 mod/wall_attach.php:67 #: mod/unfollow.php:50 mod/unfollow.php:82 mod/wall_attach.php:67
#: mod/wall_attach.php:69 mod/wall_upload.php:89 mod/wall_upload.php:91 #: mod/wall_attach.php:69 mod/wall_upload.php:89 mod/wall_upload.php:91
#: mod/wallmessage.php:37 mod/wallmessage.php:56 mod/wallmessage.php:90 #: mod/wallmessage.php:37 mod/wallmessage.php:56 mod/wallmessage.php:90
#: mod/wallmessage.php:110 src/Module/Attach.php:55 src/Module/BaseApi.php:93 #: mod/wallmessage.php:110 src/Module/Attach.php:56 src/Module/BaseApi.php:93
#: src/Module/BaseNotifications.php:97 src/Module/Contact/Advanced.php:60 #: src/Module/BaseNotifications.php:97 src/Module/Contact/Advanced.php:60
#: src/Module/Delegation.php:119 src/Module/FollowConfirm.php:38 #: src/Module/Delegation.php:119 src/Module/FollowConfirm.php:38
#: src/Module/FriendSuggest.php:56 src/Module/Group.php:42 #: src/Module/FriendSuggest.php:56 src/Module/Group.php:42
@ -144,7 +144,7 @@ msgstr ""
#: src/Module/Settings/Display.php:120 #: src/Module/Settings/Display.php:120
#: src/Module/Settings/Profile/Photo/Crop.php:166 #: src/Module/Settings/Profile/Photo/Crop.php:166
#: src/Module/Settings/Profile/Photo/Index.php:112 #: src/Module/Settings/Profile/Photo/Index.php:112
#: src/Module/Settings/UserExport.php:57 src/Module/Settings/UserExport.php:91 #: src/Module/Settings/UserExport.php:58 src/Module/Settings/UserExport.php:92
#: src/Module/Settings/UserExport.php:196 #: src/Module/Settings/UserExport.php:196
#: src/Module/Settings/UserExport.php:216 #: src/Module/Settings/UserExport.php:216
#: src/Module/Settings/UserExport.php:281 #: src/Module/Settings/UserExport.php:281
@ -467,7 +467,7 @@ msgid "OStatus support is disabled. Contact can't be added."
msgstr "" msgstr ""
#: mod/follow.php:138 src/Content/Item.php:443 src/Content/Widget.php:78 #: mod/follow.php:138 src/Content/Item.php:443 src/Content/Widget.php:78
#: src/Model/Contact.php:1088 src/Model/Contact.php:1100 #: src/Model/Contact.php:1101 src/Model/Contact.php:1113
#: view/theme/vier/theme.php:172 #: view/theme/vier/theme.php:172
msgid "Connect/Follow" msgid "Connect/Follow"
msgstr "" msgstr ""
@ -520,21 +520,21 @@ msgstr ""
msgid "Empty post discarded." msgid "Empty post discarded."
msgstr "" msgstr ""
#: mod/item.php:685 #: mod/item.php:687
msgid "Post updated." msgid "Post updated."
msgstr "" msgstr ""
#: mod/item.php:695 mod/item.php:700 #: mod/item.php:697 mod/item.php:702
msgid "Item wasn't stored." msgid "Item wasn't stored."
msgstr "" msgstr ""
#: mod/item.php:711 #: mod/item.php:713
msgid "Item couldn't be fetched." msgid "Item couldn't be fetched."
msgstr "" msgstr ""
#: mod/item.php:851 src/Module/Admin/Themes/Details.php:39 #: mod/item.php:853 src/Module/Admin/Themes/Details.php:39
#: src/Module/Admin/Themes/Index.php:59 src/Module/Debug/ItemBody.php:41 #: src/Module/Admin/Themes/Index.php:59 src/Module/Debug/ItemBody.php:42
#: src/Module/Debug/ItemBody.php:56 #: src/Module/Debug/ItemBody.php:57
msgid "Item not found." msgid "Item not found."
msgstr "" msgstr ""
@ -1408,7 +1408,7 @@ msgstr ""
msgid "Friend Suggestions" msgid "Friend Suggestions"
msgstr "" msgstr ""
#: mod/tagger.php:78 src/Content/Item.php:342 src/Model/Item.php:2694 #: mod/tagger.php:78 src/Content/Item.php:342 src/Model/Item.php:2699
msgid "photo" msgid "photo"
msgstr "" msgstr ""
@ -1522,7 +1522,7 @@ msgstr ""
msgid "File upload failed." msgid "File upload failed."
msgstr "" msgstr ""
#: mod/wall_upload.php:218 src/Model/Photo.php:1064 #: mod/wall_upload.php:218 src/Model/Photo.php:1061
msgid "Wall Photos" msgid "Wall Photos"
msgstr "" msgstr ""
@ -1550,21 +1550,21 @@ msgstr ""
msgid "No system theme config value set." msgid "No system theme config value set."
msgstr "" msgstr ""
#: src/App.php:583 #: src/App.php:584
msgid "Apologies but the website is unavailable at the moment." msgid "Apologies but the website is unavailable at the moment."
msgstr "" msgstr ""
#: src/App/Page.php:252 #: src/App/Page.php:276
msgid "Delete this item?" msgid "Delete this item?"
msgstr "" msgstr ""
#: src/App/Page.php:253 #: src/App/Page.php:277
msgid "" msgid ""
"Block this author? They won't be able to follow you nor see your public " "Block this author? They won't be able to follow you nor see your public "
"posts, and you won't be able to see their posts and their notifications." "posts, and you won't be able to see their posts and their notifications."
msgstr "" msgstr ""
#: src/App/Page.php:323 #: src/App/Page.php:347
msgid "toggle mobile" msgid "toggle mobile"
msgstr "" msgstr ""
@ -1573,7 +1573,7 @@ msgstr ""
msgid "Method not allowed for this module. Allowed method(s): %s" msgid "Method not allowed for this module. Allowed method(s): %s"
msgstr "" msgstr ""
#: src/App/Router.php:277 src/Module/HTTPException/PageNotFound.php:33 #: src/App/Router.php:277 src/Module/HTTPException/PageNotFound.php:34
msgid "Page not found." msgid "Page not found."
msgstr "" msgstr ""
@ -1592,8 +1592,8 @@ msgid "All contacts"
msgstr "" msgstr ""
#: src/BaseModule.php:409 src/Content/Widget.php:233 src/Core/ACL.php:194 #: src/BaseModule.php:409 src/Content/Widget.php:233 src/Core/ACL.php:194
#: src/Module/Contact.php:367 src/Module/PermissionTooltip.php:121 #: src/Module/Contact.php:367 src/Module/PermissionTooltip.php:122
#: src/Module/PermissionTooltip.php:143 #: src/Module/PermissionTooltip.php:144
msgid "Followers" msgid "Followers"
msgstr "" msgstr ""
@ -1641,6 +1641,31 @@ msgstr ""
msgid "The contact has been blocked from the node" msgid "The contact has been blocked from the node"
msgstr "" msgstr ""
#: src/Console/MoveToAvatarCache.php:92
#, php-format
msgid "no resource in photo %s"
msgstr ""
#: src/Console/MoveToAvatarCache.php:118
#, php-format
msgid "no photo with id %s"
msgstr ""
#: src/Console/MoveToAvatarCache.php:127
#, php-format
msgid "no image data for photo with id %s"
msgstr ""
#: src/Console/MoveToAvatarCache.php:136
#, php-format
msgid "invalid image for id %s"
msgstr ""
#: src/Console/MoveToAvatarCache.php:149
#, php-format
msgid "Quit on invalid photo %s"
msgstr ""
#: src/Console/PostUpdate.php:87 #: src/Console/PostUpdate.php:87
#, php-format #, php-format
msgid "Post update version number has been set to %s." msgid "Post update version number has been set to %s."
@ -2183,7 +2208,7 @@ msgstr ""
msgid "%1$s poked %2$s" msgid "%1$s poked %2$s"
msgstr "" msgstr ""
#: src/Content/Item.php:334 src/Model/Item.php:2692 #: src/Content/Item.php:334 src/Model/Item.php:2697
msgid "event" msgid "event"
msgstr "" msgstr ""
@ -2191,31 +2216,31 @@ msgstr ""
msgid "Follow Thread" msgid "Follow Thread"
msgstr "" msgstr ""
#: src/Content/Item.php:423 src/Model/Contact.php:1093 #: src/Content/Item.php:423 src/Model/Contact.php:1106
msgid "View Status" msgid "View Status"
msgstr "" msgstr ""
#: src/Content/Item.php:424 src/Content/Item.php:446 src/Model/Contact.php:1027 #: src/Content/Item.php:424 src/Content/Item.php:446 src/Model/Contact.php:1040
#: src/Model/Contact.php:1085 src/Model/Contact.php:1094 #: src/Model/Contact.php:1098 src/Model/Contact.php:1107
#: src/Module/Directory.php:158 src/Module/Settings/Profile/Index.php:225 #: src/Module/Directory.php:158 src/Module/Settings/Profile/Index.php:225
msgid "View Profile" msgid "View Profile"
msgstr "" msgstr ""
#: src/Content/Item.php:425 src/Model/Contact.php:1095 #: src/Content/Item.php:425 src/Model/Contact.php:1108
msgid "View Photos" msgid "View Photos"
msgstr "" msgstr ""
#: src/Content/Item.php:426 src/Model/Contact.php:1086 #: src/Content/Item.php:426 src/Model/Contact.php:1099
#: src/Model/Contact.php:1096 #: src/Model/Contact.php:1109
msgid "Network Posts" msgid "Network Posts"
msgstr "" msgstr ""
#: src/Content/Item.php:427 src/Model/Contact.php:1087 #: src/Content/Item.php:427 src/Model/Contact.php:1100
#: src/Model/Contact.php:1097 #: src/Model/Contact.php:1110
msgid "View Contact" msgid "View Contact"
msgstr "" msgstr ""
#: src/Content/Item.php:428 src/Model/Contact.php:1098 #: src/Content/Item.php:428 src/Model/Contact.php:1111
msgid "Send PM" msgid "Send PM"
msgstr "" msgstr ""
@ -2238,7 +2263,7 @@ msgstr ""
msgid "Languages" msgid "Languages"
msgstr "" msgstr ""
#: src/Content/Item.php:438 src/Model/Contact.php:1099 #: src/Content/Item.php:438 src/Model/Contact.php:1112
msgid "Poke" msgid "Poke"
msgstr "" msgstr ""
@ -2534,8 +2559,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:1188 src/Model/Item.php:3258 #: src/Content/Text/BBCode.php:1188 src/Model/Item.php:3271
#: src/Model/Item.php:3264 src/Model/Item.php:3265 #: src/Model/Item.php:3277 src/Model/Item.php:3278
msgid "Link to source" msgid "Link to source"
msgstr "" msgstr ""
@ -2551,11 +2576,11 @@ msgstr ""
msgid "Encrypted content" msgid "Encrypted content"
msgstr "" msgstr ""
#: src/Content/Text/BBCode.php:2005 #: src/Content/Text/BBCode.php:2008
msgid "Invalid source protocol" msgid "Invalid source protocol"
msgstr "" msgstr ""
#: src/Content/Text/BBCode.php:2020 #: src/Content/Text/BBCode.php:2023
msgid "Invalid link protocol" msgid "Invalid link protocol"
msgstr "" msgstr ""
@ -2690,7 +2715,7 @@ msgstr ""
msgid "Organisations" msgid "Organisations"
msgstr "" msgstr ""
#: src/Content/Widget.php:521 src/Model/Contact.php:1523 #: src/Content/Widget.php:521 src/Model/Contact.php:1536
msgid "News" msgid "News"
msgstr "" msgstr ""
@ -2771,8 +2796,8 @@ msgstr ""
msgid "Yourself" msgid "Yourself"
msgstr "" msgstr ""
#: src/Core/ACL.php:201 src/Module/PermissionTooltip.php:127 #: src/Core/ACL.php:201 src/Module/PermissionTooltip.php:128
#: src/Module/PermissionTooltip.php:149 #: src/Module/PermissionTooltip.php:150
msgid "Mutuals" msgid "Mutuals"
msgstr "" msgstr ""
@ -2780,7 +2805,7 @@ msgstr ""
msgid "Post to Email" msgid "Post to Email"
msgstr "" msgstr ""
#: src/Core/ACL.php:320 src/Module/PermissionTooltip.php:84 #: src/Core/ACL.php:320 src/Module/PermissionTooltip.php:85
#: src/Module/PermissionTooltip.php:197 #: src/Module/PermissionTooltip.php:197
msgid "Public" msgid "Public"
msgstr "" msgstr ""
@ -2791,7 +2816,7 @@ msgid ""
"community pages and by anyone with its link." "community pages and by anyone with its link."
msgstr "" msgstr ""
#: src/Core/ACL.php:322 src/Module/PermissionTooltip.php:92 #: src/Core/ACL.php:322 src/Module/PermissionTooltip.php:93
msgid "Limited/Private" msgid "Limited/Private"
msgstr "" msgstr ""
@ -3518,81 +3543,81 @@ msgstr ""
msgid "Legacy module file not found: %s" msgid "Legacy module file not found: %s"
msgstr "" msgstr ""
#: src/Model/Contact.php:1089 src/Model/Contact.php:1101 #: src/Model/Contact.php:1102 src/Model/Contact.php:1114
msgid "UnFollow" msgid "UnFollow"
msgstr "" msgstr ""
#: src/Model/Contact.php:1107 src/Module/Admin/Users/Pending.php:107 #: src/Model/Contact.php:1120 src/Module/Admin/Users/Pending.php:107
#: src/Module/Notifications/Introductions.php:130 #: src/Module/Notifications/Introductions.php:130
#: src/Module/Notifications/Introductions.php:202 #: src/Module/Notifications/Introductions.php:202
msgid "Approve" msgid "Approve"
msgstr "" msgstr ""
#: src/Model/Contact.php:1519 #: src/Model/Contact.php:1532
msgid "Organisation" msgid "Organisation"
msgstr "" msgstr ""
#: src/Model/Contact.php:1527 #: src/Model/Contact.php:1540
msgid "Forum" msgid "Forum"
msgstr "" msgstr ""
#: src/Model/Contact.php:2503 #: src/Model/Contact.php:2516
msgid "Disallowed profile URL." msgid "Disallowed profile URL."
msgstr "" msgstr ""
#: src/Model/Contact.php:2508 src/Module/Friendica.php:81 #: src/Model/Contact.php:2521 src/Module/Friendica.php:81
msgid "Blocked domain" msgid "Blocked domain"
msgstr "" msgstr ""
#: src/Model/Contact.php:2513 #: src/Model/Contact.php:2526
msgid "Connect URL missing." msgid "Connect URL missing."
msgstr "" msgstr ""
#: src/Model/Contact.php:2522 #: src/Model/Contact.php:2535
msgid "" msgid ""
"The contact could not be added. Please check the relevant network " "The contact could not be added. Please check the relevant network "
"credentials in your Settings -> Social Networks page." "credentials in your Settings -> Social Networks page."
msgstr "" msgstr ""
#: src/Model/Contact.php:2559 #: src/Model/Contact.php:2572
msgid "The profile address specified does not provide adequate information." msgid "The profile address specified does not provide adequate information."
msgstr "" msgstr ""
#: src/Model/Contact.php:2561 #: src/Model/Contact.php:2574
msgid "No compatible communication protocols or feeds were discovered." msgid "No compatible communication protocols or feeds were discovered."
msgstr "" msgstr ""
#: src/Model/Contact.php:2564 #: src/Model/Contact.php:2577
msgid "An author or name was not found." msgid "An author or name was not found."
msgstr "" msgstr ""
#: src/Model/Contact.php:2567 #: src/Model/Contact.php:2580
msgid "No browser URL could be matched to this address." msgid "No browser URL could be matched to this address."
msgstr "" msgstr ""
#: src/Model/Contact.php:2570 #: src/Model/Contact.php:2583
msgid "" msgid ""
"Unable to match @-style Identity Address with a known protocol or email " "Unable to match @-style Identity Address with a known protocol or email "
"contact." "contact."
msgstr "" msgstr ""
#: src/Model/Contact.php:2571 #: src/Model/Contact.php:2584
msgid "Use mailto: in front of address to force email check." msgid "Use mailto: in front of address to force email check."
msgstr "" msgstr ""
#: src/Model/Contact.php:2577 #: src/Model/Contact.php:2590
msgid "" msgid ""
"The profile address specified belongs to a network which has been disabled " "The profile address specified belongs to a network which has been disabled "
"on this site." "on this site."
msgstr "" msgstr ""
#: src/Model/Contact.php:2582 #: src/Model/Contact.php:2595
msgid "" msgid ""
"Limited profile. This person will be unable to receive direct/personal " "Limited profile. This person will be unable to receive direct/personal "
"notifications from you." "notifications from you."
msgstr "" msgstr ""
#: src/Model/Contact.php:2641 #: src/Model/Contact.php:2654
msgid "Unable to retrieve contact information." msgid "Unable to retrieve contact information."
msgstr "" msgstr ""
@ -3712,58 +3737,58 @@ msgstr ""
msgid "Edit groups" msgid "Edit groups"
msgstr "" msgstr ""
#: src/Model/Item.php:1790 #: src/Model/Item.php:1795
#, 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:2696 #: src/Model/Item.php:2701
msgid "activity" msgid "activity"
msgstr "" msgstr ""
#: src/Model/Item.php:2698 #: src/Model/Item.php:2703
msgid "comment" msgid "comment"
msgstr "" msgstr ""
#: src/Model/Item.php:2701 #: src/Model/Item.php:2706
msgid "post" msgid "post"
msgstr "" msgstr ""
#: src/Model/Item.php:2816 #: src/Model/Item.php:2821
#, php-format #, php-format
msgid "Content warning: %s" msgid "Content warning: %s"
msgstr "" msgstr ""
#: src/Model/Item.php:3167 #: src/Model/Item.php:3180
msgid "bytes" msgid "bytes"
msgstr "" msgstr ""
#: src/Model/Item.php:3201 #: src/Model/Item.php:3214
#, php-format #, php-format
msgid "%s (%d%s, %d votes)" msgid "%s (%d%s, %d votes)"
msgstr "" msgstr ""
#: src/Model/Item.php:3203 #: src/Model/Item.php:3216
#, php-format #, php-format
msgid "%s (%d votes)" msgid "%s (%d votes)"
msgstr "" msgstr ""
#: src/Model/Item.php:3208 #: src/Model/Item.php:3221
#, php-format #, php-format
msgid "%d voters. Poll end: %s" msgid "%d voters. Poll end: %s"
msgstr "" msgstr ""
#: src/Model/Item.php:3210 #: src/Model/Item.php:3223
#, php-format #, php-format
msgid "%d voters." msgid "%d voters."
msgstr "" msgstr ""
#: src/Model/Item.php:3212 #: src/Model/Item.php:3225
#, php-format #, php-format
msgid "Poll end: %s" msgid "Poll end: %s"
msgstr "" msgstr ""
#: src/Model/Item.php:3246 src/Model/Item.php:3247 #: src/Model/Item.php:3259 src/Model/Item.php:3260
msgid "View on separate page" msgid "View on separate page"
msgstr "" msgstr ""
@ -6414,7 +6439,7 @@ msgstr ""
msgid "Applications" msgid "Applications"
msgstr "" msgstr ""
#: src/Module/Attach.php:49 src/Module/Attach.php:61 #: src/Module/Attach.php:50 src/Module/Attach.php:62
msgid "Item was not found." msgid "Item was not found."
msgstr "" msgstr ""
@ -6579,7 +6604,7 @@ msgstr ""
msgid "Connected apps" msgid "Connected apps"
msgstr "" msgstr ""
#: src/Module/BaseSettings.php:106 src/Module/Settings/UserExport.php:75 #: src/Module/BaseSettings.php:106 src/Module/Settings/UserExport.php:76
msgid "Export personal data" msgid "Export personal data"
msgstr "" msgstr ""
@ -8085,24 +8110,24 @@ msgstr ""
msgid "Unsupported or missing grant type" msgid "Unsupported or missing grant type"
msgstr "" msgstr ""
#: src/Module/PermissionTooltip.php:48 #: src/Module/PermissionTooltip.php:49
#, php-format #, php-format
msgid "Wrong type \"%s\", expected one of: %s" msgid "Wrong type \"%s\", expected one of: %s"
msgstr "" msgstr ""
#: src/Module/PermissionTooltip.php:65 #: src/Module/PermissionTooltip.php:66
msgid "Model not found" msgid "Model not found"
msgstr "" msgstr ""
#: src/Module/PermissionTooltip.php:88 #: src/Module/PermissionTooltip.php:89
msgid "Unlisted" msgid "Unlisted"
msgstr "" msgstr ""
#: src/Module/PermissionTooltip.php:106 #: src/Module/PermissionTooltip.php:107
msgid "Remote privacy information not available." msgid "Remote privacy information not available."
msgstr "" msgstr ""
#: src/Module/PermissionTooltip.php:115 #: src/Module/PermissionTooltip.php:116
msgid "Visible to:" msgid "Visible to:"
msgstr "" msgstr ""
@ -8136,21 +8161,21 @@ msgstr ""
msgid "<b>BCC:</b> %s<br>" msgid "<b>BCC:</b> %s<br>"
msgstr "" msgstr ""
#: src/Module/Photo.php:127 #: src/Module/Photo.php:128
msgid "The Photo is not available." msgid "The Photo is not available."
msgstr "" msgstr ""
#: src/Module/Photo.php:140 #: src/Module/Photo.php:141
#, php-format #, php-format
msgid "The Photo with id %s is not available." msgid "The Photo with id %s is not available."
msgstr "" msgstr ""
#: src/Module/Photo.php:173 #: src/Module/Photo.php:174
#, php-format #, php-format
msgid "Invalid external resource with url %s." msgid "Invalid external resource with url %s."
msgstr "" msgstr ""
#: src/Module/Photo.php:175 #: src/Module/Photo.php:176
#, php-format #, php-format
msgid "Invalid photo with id %s." msgid "Invalid photo with id %s."
msgstr "" msgstr ""
@ -9761,32 +9786,32 @@ msgstr ""
msgid "Verify code and enable two-factor authentication" msgid "Verify code and enable two-factor authentication"
msgstr "" msgstr ""
#: src/Module/Settings/UserExport.php:67 #: src/Module/Settings/UserExport.php:68
msgid "Export account" msgid "Export account"
msgstr "" msgstr ""
#: src/Module/Settings/UserExport.php:67 #: src/Module/Settings/UserExport.php:68
msgid "" msgid ""
"Export your account info and contacts. Use this to make a backup of your " "Export your account info and contacts. Use this to make a backup of your "
"account and/or to move it to another server." "account and/or to move it to another server."
msgstr "" msgstr ""
#: src/Module/Settings/UserExport.php:68 #: src/Module/Settings/UserExport.php:69
msgid "Export all" msgid "Export all"
msgstr "" msgstr ""
#: src/Module/Settings/UserExport.php:68 #: src/Module/Settings/UserExport.php:69
msgid "" msgid ""
"Export your account info, contacts and all your items as json. Could be a " "Export your account info, contacts and all your items as json. Could be a "
"very big file, and could take a lot of time. Use this to make a full backup " "very big file, and could take a lot of time. Use this to make a full backup "
"of your account (photos are not exported)" "of your account (photos are not exported)"
msgstr "" msgstr ""
#: src/Module/Settings/UserExport.php:69 #: src/Module/Settings/UserExport.php:70
msgid "Export Contacts to CSV" msgid "Export Contacts to CSV"
msgstr "" msgstr ""
#: src/Module/Settings/UserExport.php:69 #: src/Module/Settings/UserExport.php:70
msgid "" msgid ""
"Export the list of the accounts you are following as CSV file. Compatible to " "Export the list of the accounts you are following as CSV file. Compatible to "
"e.g. Mastodon." "e.g. Mastodon."
@ -10057,155 +10082,155 @@ msgstr ""
msgid "New Follower" msgid "New Follower"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:119 #: src/Navigation/Notifications/Factory/Notification.php:131
#, php-format #, php-format
msgid "%1$s wants to follow you" msgid "%1$s wants to follow you"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:121 #: src/Navigation/Notifications/Factory/Notification.php:133
#, php-format #, php-format
msgid "%1$s has started following you" msgid "%1$s has started following you"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:186 #: src/Navigation/Notifications/Factory/Notification.php:197
#, php-format #, php-format
msgid "%1$s liked your comment on %2$s" msgid "%1$s liked your comment on %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:189 #: src/Navigation/Notifications/Factory/Notification.php:200
#, php-format #, php-format
msgid "%1$s liked your post %2$s" msgid "%1$s liked your post %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:196 #: src/Navigation/Notifications/Factory/Notification.php:207
#, php-format #, php-format
msgid "%1$s disliked your comment on %2$s" msgid "%1$s disliked your comment on %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:199 #: src/Navigation/Notifications/Factory/Notification.php:210
#, php-format #, php-format
msgid "%1$s disliked your post %2$s" msgid "%1$s disliked your post %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:206 #: src/Navigation/Notifications/Factory/Notification.php:217
#, php-format #, php-format
msgid "%1$s shared your comment %2$s" msgid "%1$s shared your comment %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:209 #: src/Navigation/Notifications/Factory/Notification.php:220
#, php-format #, php-format
msgid "%1$s shared your post %2$s" msgid "%1$s shared your post %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:213 #: src/Navigation/Notifications/Factory/Notification.php:224
#: src/Navigation/Notifications/Factory/Notification.php:282 #: src/Navigation/Notifications/Factory/Notification.php:293
#, php-format #, php-format
msgid "%1$s shared the post %2$s from %3$s" msgid "%1$s shared the post %2$s from %3$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:215 #: src/Navigation/Notifications/Factory/Notification.php:226
#: src/Navigation/Notifications/Factory/Notification.php:284 #: src/Navigation/Notifications/Factory/Notification.php:295
#, php-format #, php-format
msgid "%1$s shared a post from %3$s" msgid "%1$s shared a post from %3$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:217 #: src/Navigation/Notifications/Factory/Notification.php:228
#: src/Navigation/Notifications/Factory/Notification.php:286 #: src/Navigation/Notifications/Factory/Notification.php:297
#, php-format #, php-format
msgid "%1$s shared the post %2$s" msgid "%1$s shared the post %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:219 #: src/Navigation/Notifications/Factory/Notification.php:230
#: src/Navigation/Notifications/Factory/Notification.php:288 #: src/Navigation/Notifications/Factory/Notification.php:299
#, php-format #, php-format
msgid "%1$s shared a post" msgid "%1$s shared a post"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:227 #: src/Navigation/Notifications/Factory/Notification.php:238
#, php-format #, php-format
msgid "%1$s wants to attend your event %2$s" msgid "%1$s wants to attend your event %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:234 #: src/Navigation/Notifications/Factory/Notification.php:245
#, php-format #, php-format
msgid "%1$s does not want to attend your event %2$s" msgid "%1$s does not want to attend your event %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:241 #: src/Navigation/Notifications/Factory/Notification.php:252
#, php-format #, php-format
msgid "%1$s maybe wants to attend your event %2$s" msgid "%1$s maybe wants to attend your event %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:248 #: src/Navigation/Notifications/Factory/Notification.php:259
#, php-format #, php-format
msgid "%1$s tagged you on %2$s" msgid "%1$s tagged you on %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:252 #: src/Navigation/Notifications/Factory/Notification.php:263
#, php-format #, php-format
msgid "%1$s replied to you on %2$s" msgid "%1$s replied to you on %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:256 #: src/Navigation/Notifications/Factory/Notification.php:267
#, php-format #, php-format
msgid "%1$s commented in your thread %2$s" msgid "%1$s commented in your thread %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:260 #: src/Navigation/Notifications/Factory/Notification.php:271
#, php-format #, php-format
msgid "%1$s commented on your comment %2$s" msgid "%1$s commented on your comment %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:266 #: src/Navigation/Notifications/Factory/Notification.php:277
#, php-format #, php-format
msgid "%1$s commented in their thread %2$s" msgid "%1$s commented in their thread %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:268 #: src/Navigation/Notifications/Factory/Notification.php:279
#, php-format #, php-format
msgid "%1$s commented in their thread" msgid "%1$s commented in their thread"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:270 #: src/Navigation/Notifications/Factory/Notification.php:281
#, php-format #, php-format
msgid "%1$s commented in the thread %2$s from %3$s" msgid "%1$s commented in the thread %2$s from %3$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:272 #: src/Navigation/Notifications/Factory/Notification.php:283
#, php-format #, php-format
msgid "%1$s commented in the thread from %3$s" msgid "%1$s commented in the thread from %3$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:277 #: src/Navigation/Notifications/Factory/Notification.php:288
#, php-format #, php-format
msgid "%1$s commented on your thread %2$s" msgid "%1$s commented on your thread %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Repository/Notify.php:214 #: src/Navigation/Notifications/Repository/Notify.php:215
#: src/Navigation/Notifications/Repository/Notify.php:697 #: src/Navigation/Notifications/Repository/Notify.php:697
msgid "[Friendica:Notify]" msgid "[Friendica:Notify]"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Repository/Notify.php:278 #: src/Navigation/Notifications/Repository/Notify.php:279
#, php-format #, php-format
msgid "%s New mail received at %s" msgid "%s New mail received at %s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Repository/Notify.php:280 #: src/Navigation/Notifications/Repository/Notify.php:281
#, php-format #, php-format
msgid "%1$s sent you a new private message at %2$s." msgid "%1$s sent you a new private message at %2$s."
msgstr "" msgstr ""
#: src/Navigation/Notifications/Repository/Notify.php:281 #: src/Navigation/Notifications/Repository/Notify.php:282
msgid "a private message" msgid "a private message"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Repository/Notify.php:281 #: src/Navigation/Notifications/Repository/Notify.php:282
#, php-format #, php-format
msgid "%1$s sent you %2$s." msgid "%1$s sent you %2$s."
msgstr "" msgstr ""
#: src/Navigation/Notifications/Repository/Notify.php:283 #: src/Navigation/Notifications/Repository/Notify.php:284
#, php-format #, php-format
msgid "Please visit %s to view and/or reply to your private messages." msgid "Please visit %s to view and/or reply to your private messages."
msgstr "" msgstr ""
@ -10226,7 +10251,7 @@ msgid "%1$s commented on their %2$s %3$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Repository/Notify.php:327 #: src/Navigation/Notifications/Repository/Notify.php:327
#: src/Navigation/Notifications/Repository/Notify.php:732 #: src/Navigation/Notifications/Repository/Notify.php:731
#, php-format #, php-format
msgid "%1$s Comment to conversation #%2$d by %3$s" msgid "%1$s Comment to conversation #%2$d by %3$s"
msgstr "" msgstr ""
@ -10239,7 +10264,7 @@ msgstr ""
#: src/Navigation/Notifications/Repository/Notify.php:333 #: src/Navigation/Notifications/Repository/Notify.php:333
#: src/Navigation/Notifications/Repository/Notify.php:348 #: src/Navigation/Notifications/Repository/Notify.php:348
#: src/Navigation/Notifications/Repository/Notify.php:367 #: src/Navigation/Notifications/Repository/Notify.php:367
#: src/Navigation/Notifications/Repository/Notify.php:747 #: src/Navigation/Notifications/Repository/Notify.php:746
#, php-format #, php-format
msgid "Please visit %s to view and/or reply to the conversation." msgid "Please visit %s to view and/or reply to the conversation."
msgstr "" msgstr ""
@ -10427,12 +10452,12 @@ msgstr ""
msgid "Please visit %s to approve or reject the request." msgid "Please visit %s to approve or reject the request."
msgstr "" msgstr ""
#: src/Navigation/Notifications/Repository/Notify.php:726 #: src/Navigation/Notifications/Repository/Notify.php:725
#, php-format #, php-format
msgid "%s %s tagged you" msgid "%s %s tagged you"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Repository/Notify.php:729 #: src/Navigation/Notifications/Repository/Notify.php:728
#, php-format #, php-format
msgid "%s %s shared a new post" msgid "%s %s shared a new post"
msgstr "" msgstr ""