Merge pull request #13103 from annando/better-preview

Improved preview size
This commit is contained in:
Hypolite Petovan 2023-05-09 03:43:58 -04:00 committed by GitHub
commit 4c40bc164d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 136 additions and 139 deletions

View file

@ -1148,7 +1148,7 @@ class Photo
return []; return [];
} }
return ['image' => $image, 'filename' => $filename]; return ['image' => $image, 'filename' => $filename, 'size' => $filesize];
} }
/** /**
@ -1182,8 +1182,7 @@ class Photo
$image = $data['image']; $image = $data['image'];
$filename = $data['filename']; $filename = $data['filename'];
$width = $image->getWidth(); $filesize = $data['size'];
$height = $image->getHeight();
$resource_id = $resource_id ?: self::newResource(); $resource_id = $resource_id ?: self::newResource();
$album = $album ?: DI::l10n()->t('Wall Photos'); $album = $album ?: DI::l10n()->t('Wall Photos');
@ -1193,30 +1192,12 @@ class Photo
$allow_gid = ''; $allow_gid = '';
} }
$smallest = 0; $preview = self::storeWithPreview($image, $user['uid'], $resource_id, $filename, $filesize, $album, $desc, $allow_cid, $allow_gid, $deny_cid, $deny_gid);
if ($preview < 0) {
$r = self::store($image, $user['uid'], 0, $resource_id, $filename, $album, 0, self::DEFAULT, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $desc);
if (!$r) {
Logger::warning('Photo could not be stored', ['uid' => $user['uid'], 'resource_id' => $resource_id, 'filename' => $filename, 'album' => $album]); Logger::warning('Photo could not be stored', ['uid' => $user['uid'], 'resource_id' => $resource_id, 'filename' => $filename, 'album' => $album]);
return []; return [];
} }
if ($width > 640 || $height > 640) {
$image->scaleDown(640);
$r = self::store($image, $user['uid'], 0, $resource_id, $filename, $album, 1, self::DEFAULT, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $desc);
if ($r) {
$smallest = 1;
}
}
if ($width > 320 || $height > 320) {
$image->scaleDown(320);
$r = self::store($image, $user['uid'], 0, $resource_id, $filename, $album, 2, self::DEFAULT, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $desc);
if ($r && ($smallest == 0)) {
$smallest = 2;
}
}
$condition = ['resource-id' => $resource_id]; $condition = ['resource-id' => $resource_id];
$photo = self::selectFirst(['id', 'datasize', 'width', 'height', 'type'], $condition, ['order' => ['width' => true]]); $photo = self::selectFirst(['id', 'datasize', 'width', 'height', 'type'], $condition, ['order' => ['width' => true]]);
if (empty($photo)) { if (empty($photo)) {
@ -1234,12 +1215,87 @@ class Photo
$picture['type'] = $photo['type']; $picture['type'] = $photo['type'];
$picture['albumpage'] = DI::baseUrl() . '/photos/' . $user['nickname'] . '/image/' . $resource_id; $picture['albumpage'] = DI::baseUrl() . '/photos/' . $user['nickname'] . '/image/' . $resource_id;
$picture['picture'] = DI::baseUrl() . '/photo/' . $resource_id . '-0.' . $image->getExt(); $picture['picture'] = DI::baseUrl() . '/photo/' . $resource_id . '-0.' . $image->getExt();
$picture['preview'] = DI::baseUrl() . '/photo/' . $resource_id . '-' . $smallest . '.' . $image->getExt(); $picture['preview'] = DI::baseUrl() . '/photo/' . $resource_id . '-' . $preview . '.' . $image->getExt();
Logger::info('upload done', ['picture' => $picture]); Logger::info('upload done', ['picture' => $picture]);
return $picture; return $picture;
} }
/**
* store photo metadata in db and binary with preview photos in default backend
*
* @param Image $image Image object with data
* @param integer $uid User ID
* @param string $resource_id Resource ID
* @param string $filename Filename
* @param integer $filesize Filesize
* @param string $album Album name
* @param string $description Photo caption
* @param string $allow_cid Permissions, allowed contacts
* @param string $allow_gid Permissions, allowed groups
* @param string $deny_cid Permissions, denied contacts
* @param string $deny_gid Permissions, denied group
*
* @return integer preview photo size
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public static function storeWithPreview(Image $image, int $uid, string $resource_id, string $filename, int $filesize, string $album, string $description, string $allow_cid, string $allow_gid, string $deny_cid, string $deny_gid): int
{
if ($filesize == 0) {
$filesize = strlen($image->asString());
}
$width = $image->getWidth();
$height = $image->getHeight();
$maximagesize = Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize'));
if ($maximagesize && $filesize > $maximagesize) {
// Scale down to multiples of 640 until the maximum size isn't exceeded anymore
foreach ([5120, 2560, 1280, 640, 320] as $pixels) {
if ($filesize > $maximagesize && max($width, $height) > $pixels) {
DI::logger()->info('Resize', ['size' => $filesize, 'width' => $width, 'height' => $height, 'max' => $maximagesize, 'pixels' => $pixels]);
$image->scaleDown($pixels);
$filesize = strlen($image->asString());
$width = $image->getWidth();
$height = $image->getHeight();
}
}
if ($filesize > $maximagesize) {
DI::logger()->notice('Image size is too big', ['size' => $filesize, 'max' => $maximagesize]);
return -1;
}
}
$width = $image->getWidth();
$height = $image->getHeight();
$preview = 0;
$result = self::store($image, $uid, 0, $resource_id, $filename, $album, 0, self::DEFAULT, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $description);
if (!$result) {
Logger::warning('Photo could not be stored', ['uid' => $uid, 'resource_id' => $resource_id, 'filename' => $filename, 'album' => $album]);
return -1;
}
if ($width > 640 || $height > 640) {
$image->scaleDown(640);
}
if ($width > 320 || $height > 320) {
$result = self::store($image, $uid, 0, $resource_id, $filename, $album, 1, self::DEFAULT, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $description);
if ($result) {
$preview = 1;
}
$image->scaleDown(320);
$result = self::store($image, $uid, 0, $resource_id, $filename, $album, 2, self::DEFAULT, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $description);
if ($result && ($preview == 0)) {
$preview = 2;
}
}
return $preview;
}
/** /**
* Upload a user avatar * Upload a user avatar
* *

View file

@ -463,7 +463,7 @@ class Media
*/ */
private static function isLinkToPhoto(string $page, string $preview): bool private static function isLinkToPhoto(string $page, string $preview): bool
{ {
return preg_match('#/photo/.*-0\.#ism', $page) && preg_match('#/photo/.*-[01]\.#ism', $preview); return preg_match('#/photo/.*-0\.#ism', $page) && preg_match('#/photo/.*-[012]\.#ism', $preview);
} }
/** /**
@ -475,7 +475,7 @@ class Media
*/ */
private static function isLinkToImagePage(string $page, string $preview): bool private static function isLinkToImagePage(string $page, string $preview): bool
{ {
return preg_match('#/photos/.*/image/#ism', $page) && preg_match('#/photo/.*-[01]\.#ism', $preview); return preg_match('#/photos/.*/image/#ism', $page) && preg_match('#/photo/.*-[012]\.#ism', $preview);
} }
/** /**
@ -489,7 +489,7 @@ class Media
if (preg_match_all("#\[url=([^\]]+?)\]\s*\[img=([^\[\]]*)\]([^\[\]]*)\[\/img\]\s*\[/url\]#ism", $body, $pictures, PREG_SET_ORDER)) { if (preg_match_all("#\[url=([^\]]+?)\]\s*\[img=([^\[\]]*)\]([^\[\]]*)\[\/img\]\s*\[/url\]#ism", $body, $pictures, PREG_SET_ORDER)) {
foreach ($pictures as $picture) { foreach ($pictures as $picture) {
if (self::isLinkToImagePage($picture[1], $picture[2])) { if (self::isLinkToImagePage($picture[1], $picture[2])) {
$body = str_replace($picture[0], '[url=' . str_replace('-1.', '-0.', $picture[2]) . '][img=' . $picture[2] . ']' . $picture[3] . '[/img][/url]', $body); $body = str_replace($picture[0], '[url=' . str_replace(['-1.', '-2.'], '-0.', $picture[2]) . '][img=' . $picture[2] . ']' . $picture[3] . '[/img][/url]', $body);
} }
} }
} }
@ -497,7 +497,7 @@ class Media
if (preg_match_all("#\[url=([^\]]+?)\]\s*\[img\]([^\[]+?)\[/img\]\s*\[/url\]#ism", $body, $pictures, PREG_SET_ORDER)) { if (preg_match_all("#\[url=([^\]]+?)\]\s*\[img\]([^\[]+?)\[/img\]\s*\[/url\]#ism", $body, $pictures, PREG_SET_ORDER)) {
foreach ($pictures as $picture) { foreach ($pictures as $picture) {
if (self::isLinkToImagePage($picture[1], $picture[2])) { if (self::isLinkToImagePage($picture[1], $picture[2])) {
$body = str_replace($picture[0], '[url=' . str_replace('-1.', '-0.', $picture[2]) . '][img]' . $picture[2] . '[/img][/url]', $body); $body = str_replace($picture[0], '[url=' . str_replace(['-1.', '-2.'], '-0.', $picture[2]) . '][img]' . $picture[2] . '[/img][/url]', $body);
} }
} }
} }
@ -525,7 +525,7 @@ class Media
foreach ($pictures as $picture) { foreach ($pictures as $picture) {
if (self::isLinkToImagePage($picture[1], $picture[2])) { if (self::isLinkToImagePage($picture[1], $picture[2])) {
$body = str_replace($picture[0], '', $body); $body = str_replace($picture[0], '', $body);
$image = str_replace('-1.', '-0.', $picture[2]); $image = str_replace(['-1.', '-2.'], '-0.', $picture[2]);
$attachments[$image] = [ $attachments[$image] = [
'uri-id' => $uriid, 'type' => self::IMAGE, 'url' => $image, 'uri-id' => $uriid, 'type' => self::IMAGE, 'url' => $image,
'preview' => $picture[2], 'description' => $picture[3] 'preview' => $picture[2], 'description' => $picture[3]
@ -557,7 +557,7 @@ class Media
foreach ($pictures as $picture) { foreach ($pictures as $picture) {
if (self::isLinkToImagePage($picture[1], $picture[2])) { if (self::isLinkToImagePage($picture[1], $picture[2])) {
$body = str_replace($picture[0], '', $body); $body = str_replace($picture[0], '', $body);
$image = str_replace('-1.', '-0.', $picture[2]); $image = str_replace(['-1.', '-2.'], '-0.', $picture[2]);
$attachments[$image] = [ $attachments[$image] = [
'uri-id' => $uriid, 'type' => self::IMAGE, 'url' => $image, 'uri-id' => $uriid, 'type' => self::IMAGE, 'url' => $image,
'preview' => $picture[2], 'description' => null 'preview' => $picture[2], 'description' => null

View file

@ -191,6 +191,7 @@ class Compose extends BaseModule
'editalic' => $this->l10n->t('Italic'), 'editalic' => $this->l10n->t('Italic'),
'eduline' => $this->l10n->t('Underline'), 'eduline' => $this->l10n->t('Underline'),
'edquote' => $this->l10n->t('Quote'), 'edquote' => $this->l10n->t('Quote'),
'$edemojis' => $this->l10n->t('Add emojis'),
'edcode' => $this->l10n->t('Code'), 'edcode' => $this->l10n->t('Code'),
'edimg' => $this->l10n->t('Image'), 'edimg' => $this->l10n->t('Image'),
'edurl' => $this->l10n->t('Link'), 'edurl' => $this->l10n->t('Link'),

View file

@ -164,34 +164,8 @@ class Upload extends \Friendica\BaseModule
$this->logger->info('File upload: Scaling picture to new size', ['max_length' => $max_length]); $this->logger->info('File upload: Scaling picture to new size', ['max_length' => $max_length]);
} }
$width = $image->getWidth();
$height = $image->getHeight();
$maximagesize = Strings::getBytesFromShorthand($this->config->get('system', 'maximagesize'));
if ($maximagesize && $filesize > $maximagesize) {
// Scale down to multiples of 640 until the maximum size isn't exceeded anymore
foreach ([5120, 2560, 1280, 640] as $pixels) {
if ($filesize > $maximagesize && max($width, $height) > $pixels) {
$this->logger->info('Resize', ['size' => $filesize, 'width' => $width, 'height' => $height, 'max' => $maximagesize, 'pixels' => $pixels]);
$image->scaleDown($pixels);
$filesize = strlen($image->asString());
$width = $image->getWidth();
$height = $image->getHeight();
}
}
if ($filesize > $maximagesize) {
@unlink($src);
$this->logger->notice('Image size is too big', ['size' => $filesize, 'max' => $maximagesize]);
$this->return(401, $this->t('Image exceeds size limit of %s', Strings::formatBytes($maximagesize)));
}
}
$resource_id = Photo::newResource(); $resource_id = Photo::newResource();
$smallest = 0;
// If we don't have an album name use the Wall Photos album // If we don't have an album name use the Wall Photos album
if (!strlen($album)) { if (!strlen($album)) {
$album = $this->t('Wall Photos'); $album = $this->t('Wall Photos');
@ -199,30 +173,14 @@ class Upload extends \Friendica\BaseModule
$allow_cid = '<' . $owner['id'] . '>'; $allow_cid = '<' . $owner['id'] . '>';
$result = Photo::store($image, $owner['uid'], 0, $resource_id, $filename, $album, 0, Photo::DEFAULT, $allow_cid); $preview = Photo::storeWithPreview($image, $owner['uid'], $resource_id, $filename, $filesize, $album, '', $allow_cid, '', '', '');
if (!$result) { if ($preview < 0) {
$this->logger->warning('Photo::store() failed', ['result' => $result]); $this->logger->warning('Photo::store() failed');
$this->return(401, $this->t('Image upload failed.')); $this->return(401, $this->t('Image upload failed.'));
} }
if ($width > 640 || $height > 640) {
$image->scaleDown(640);
$result = Photo::store($image, $owner['uid'], 0, $resource_id, $filename, $album, 1, Photo::DEFAULT, $allow_cid);
if ($result) {
$smallest = 1;
}
}
if ($width > 320 || $height > 320) {
$image->scaleDown(320);
$result = Photo::store($image, $owner['uid'], 0, $resource_id, $filename, $album, 2, Photo::DEFAULT, $allow_cid);
if ($result && ($smallest == 0)) {
$smallest = 2;
}
}
$this->logger->info('upload done'); $this->logger->info('upload done');
$this->return(200, "\n\n" . '[url=' . $this->baseUrl . '/photos/' . $owner['nickname'] . '/image/' . $resource_id . '][img=' . $this->baseUrl . "/photo/$resource_id-$smallest." . $image->getExt() . "][/img][/url]\n\n"); $this->return(200, "\n\n" . '[url=' . $this->baseUrl . '/photos/' . $owner['nickname'] . '/image/' . $resource_id . '][img=' . $this->baseUrl . "/photo/$resource_id-$preview." . $image->getExt() . "][/img][/url]\n\n");
} }
/** /**

View file

@ -229,33 +229,15 @@ class Photos extends \Friendica\Module\BaseProfile
$image->scaleDown($max_length); $image->scaleDown($max_length);
} }
$width = $image->getWidth();
$height = $image->getHeight();
$smallest = 0;
$resource_id = Photo::newResource(); $resource_id = Photo::newResource();
$r = Photo::store($image, $this->owner['uid'], 0, $resource_id, $filename, $album, 0 , Photo::DEFAULT, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny); $preview = Photo::storeWithPreview($image, $this->owner['uid'], $resource_id, $filename, $filesize, $album, '', $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny);
if ($preview < 0) {
if (!$r) {
$this->logger->warning('image store failed'); $this->logger->warning('image store failed');
$this->systemMessages->addNotice($this->t('Image upload failed.')); $this->systemMessages->addNotice($this->t('Image upload failed.'));
return; return;
} }
if ($width > 640 || $height > 640) {
$image->scaleDown(640);
Photo::store($image, $this->owner['uid'], 0, $resource_id, $filename, $album, 1, Photo::DEFAULT, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny);
$smallest = 1;
}
if ($width > 320 || $height > 320) {
$image->scaleDown(320);
Photo::store($image, $this->owner['uid'], 0, $resource_id, $filename, $album, 2, Photo::DEFAULT, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny);
$smallest = 2;
}
$uri = Item::newURI(); $uri = Item::newURI();
// Create item container // Create item container
@ -292,7 +274,7 @@ class Photos extends \Friendica\Module\BaseProfile
$arr['origin'] = 1; $arr['origin'] = 1;
$arr['body'] = '[url=' . $this->baseUrl . '/photos/' . $this->owner['nickname'] . '/image/' . $resource_id . ']' $arr['body'] = '[url=' . $this->baseUrl . '/photos/' . $this->owner['nickname'] . '/image/' . $resource_id . ']'
. '[img]' . $this->baseUrl . "/photo/{$resource_id}-{$smallest}.".$image->getExt() . '[/img]' . '[img]' . $this->baseUrl . "/photo/{$resource_id}-{$preview}.".$image->getExt() . '[/img]'
. '[/url]'; . '[/url]';
$item_id = Item::insert($arr); $item_id = Item::insert($arr);
@ -354,7 +336,7 @@ class Photos extends \Friendica\Module\BaseProfile
$sql_extra $sql_extra
GROUP BY `resource-id` GROUP BY `resource-id`
ORDER BY `created` DESC ORDER BY `created` DESC
LIMIT ? , ?", LIMIT ? , ?",
$this->owner['uid'], $this->owner['uid'],
Photo::DEFAULT, Photo::DEFAULT,
$pager->getStart(), $pager->getStart(),

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 2023.06-dev\n" "Project-Id-Version: 2023.06-dev\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-04 10:54+0000\n" "POT-Creation-Date: 2023-05-09 06:34+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"
@ -293,7 +293,7 @@ msgstr ""
#: mod/message.php:202 mod/message.php:358 mod/photos.php:1291 #: mod/message.php:202 mod/message.php:358 mod/photos.php:1291
#: src/Content/Conversation.php:390 src/Content/Conversation.php:734 #: src/Content/Conversation.php:390 src/Content/Conversation.php:734
#: src/Module/Item/Compose.php:204 src/Module/Post/Edit.php:145 #: src/Module/Item/Compose.php:205 src/Module/Post/Edit.php:145
#: src/Module/Profile/UnkMail.php:154 src/Object/Post.php:550 #: src/Module/Profile/UnkMail.php:154 src/Object/Post.php:550
msgid "Please wait" msgid "Please wait"
msgstr "" msgstr ""
@ -396,22 +396,22 @@ msgid "User not found."
msgstr "" msgstr ""
#: mod/photos.php:106 src/Module/BaseProfile.php:68 #: mod/photos.php:106 src/Module/BaseProfile.php:68
#: src/Module/Profile/Photos.php:399 #: src/Module/Profile/Photos.php:381
msgid "Photo Albums" msgid "Photo Albums"
msgstr "" msgstr ""
#: mod/photos.php:107 src/Module/Profile/Photos.php:400 #: mod/photos.php:107 src/Module/Profile/Photos.php:382
#: src/Module/Profile/Photos.php:420 #: src/Module/Profile/Photos.php:402
msgid "Recent Photos" msgid "Recent Photos"
msgstr "" msgstr ""
#: mod/photos.php:109 mod/photos.php:867 src/Module/Profile/Photos.php:402 #: mod/photos.php:109 mod/photos.php:867 src/Module/Profile/Photos.php:384
#: src/Module/Profile/Photos.php:422 #: src/Module/Profile/Photos.php:404
msgid "Upload New Photos" msgid "Upload New Photos"
msgstr "" msgstr ""
#: mod/photos.php:121 src/Module/BaseSettings.php:74 #: mod/photos.php:121 src/Module/BaseSettings.php:74
#: src/Module/Profile/Photos.php:383 #: src/Module/Profile/Photos.php:365
msgid "everybody" msgid "everybody"
msgstr "" msgstr ""
@ -445,7 +445,7 @@ msgid "%1$s was tagged in %2$s by %3$s"
msgstr "" msgstr ""
#: mod/photos.php:581 src/Module/Conversation/Community.php:188 #: mod/photos.php:581 src/Module/Conversation/Community.php:188
#: src/Module/Directory.php:48 src/Module/Profile/Photos.php:315 #: src/Module/Directory.php:48 src/Module/Profile/Photos.php:297
#: src/Module/Search/Index.php:65 #: src/Module/Search/Index.php:65
msgid "Public access denied." msgid "Public access denied."
msgstr "" msgstr ""
@ -514,7 +514,7 @@ msgstr ""
msgid "Show Oldest First" msgid "Show Oldest First"
msgstr "" msgstr ""
#: mod/photos.php:852 src/Module/Profile/Photos.php:370 #: mod/photos.php:852 src/Module/Profile/Photos.php:352
msgid "View Photo" msgid "View Photo"
msgstr "" msgstr ""
@ -607,7 +607,7 @@ msgstr ""
#: mod/photos.php:1139 mod/photos.php:1195 mod/photos.php:1269 #: mod/photos.php:1139 mod/photos.php:1195 mod/photos.php:1269
#: src/Content/Conversation.php:405 src/Module/Calendar/Event/Form.php:248 #: src/Content/Conversation.php:405 src/Module/Calendar/Event/Form.php:248
#: src/Module/Item/Compose.php:199 src/Module/Post/Edit.php:165 #: src/Module/Item/Compose.php:200 src/Module/Post/Edit.php:165
#: src/Object/Post.php:1075 #: src/Object/Post.php:1075
msgid "Preview" msgid "Preview"
msgstr "" msgstr ""
@ -649,11 +649,11 @@ msgstr ""
msgid "Map" msgid "Map"
msgstr "" msgstr ""
#: src/App.php:470 #: src/App.php:473
msgid "No system theme config value set." msgid "No system theme config value set."
msgstr "" msgstr ""
#: src/App.php:574 #: src/App.php:577
msgid "Apologies but the website is unavailable at the moment." msgid "Apologies but the website is unavailable at the moment."
msgstr "" msgstr ""
@ -1212,7 +1212,7 @@ msgstr[1] ""
msgid "Visible to <strong>everybody</strong>" msgid "Visible to <strong>everybody</strong>"
msgstr "" msgstr ""
#: src/Content/Conversation.php:329 src/Module/Item/Compose.php:198 #: src/Content/Conversation.php:329 src/Module/Item/Compose.php:199
#: src/Object/Post.php:1074 #: src/Object/Post.php:1074
msgid "Please enter a image/video/audio/webpage URL:" msgid "Please enter a image/video/audio/webpage URL:"
msgstr "" msgstr ""
@ -1277,27 +1277,27 @@ msgstr ""
msgid "Quote" msgid "Quote"
msgstr "" msgstr ""
#: src/Content/Conversation.php:368 src/Module/Post/Edit.php:175 #: src/Content/Conversation.php:368 src/Module/Item/Compose.php:194
#: src/Object/Post.php:1069 #: src/Module/Post/Edit.php:175 src/Object/Post.php:1069
msgid "Add emojis" msgid "Add emojis"
msgstr "" msgstr ""
#: src/Content/Conversation.php:369 src/Module/Item/Compose.php:194 #: src/Content/Conversation.php:369 src/Module/Item/Compose.php:195
#: src/Module/Post/Edit.php:176 src/Object/Post.php:1070 #: src/Module/Post/Edit.php:176 src/Object/Post.php:1070
msgid "Code" msgid "Code"
msgstr "" msgstr ""
#: src/Content/Conversation.php:370 src/Module/Item/Compose.php:195 #: src/Content/Conversation.php:370 src/Module/Item/Compose.php:196
#: src/Object/Post.php:1071 #: src/Object/Post.php:1071
msgid "Image" msgid "Image"
msgstr "" msgstr ""
#: src/Content/Conversation.php:371 src/Module/Item/Compose.php:196 #: src/Content/Conversation.php:371 src/Module/Item/Compose.php:197
#: src/Module/Post/Edit.php:177 src/Object/Post.php:1072 #: src/Module/Post/Edit.php:177 src/Object/Post.php:1072
msgid "Link" msgid "Link"
msgstr "" msgstr ""
#: src/Content/Conversation.php:372 src/Module/Item/Compose.php:197 #: src/Content/Conversation.php:372 src/Module/Item/Compose.php:198
#: src/Module/Post/Edit.php:178 src/Object/Post.php:1073 #: src/Module/Post/Edit.php:178 src/Object/Post.php:1073
msgid "Link or Media" msgid "Link or Media"
msgstr "" msgstr ""
@ -1306,7 +1306,7 @@ msgstr ""
msgid "Video" msgid "Video"
msgstr "" msgstr ""
#: src/Content/Conversation.php:374 src/Module/Item/Compose.php:200 #: src/Content/Conversation.php:374 src/Module/Item/Compose.php:201
#: src/Module/Post/Edit.php:141 #: src/Module/Post/Edit.php:141
msgid "Set your location" msgid "Set your location"
msgstr "" msgstr ""
@ -1323,17 +1323,17 @@ msgstr ""
msgid "clear location" msgid "clear location"
msgstr "" msgstr ""
#: src/Content/Conversation.php:379 src/Module/Item/Compose.php:205 #: src/Content/Conversation.php:379 src/Module/Item/Compose.php:206
#: src/Module/Post/Edit.php:157 #: src/Module/Post/Edit.php:157
msgid "Set title" msgid "Set title"
msgstr "" msgstr ""
#: src/Content/Conversation.php:381 src/Module/Item/Compose.php:206 #: src/Content/Conversation.php:381 src/Module/Item/Compose.php:207
#: src/Module/Post/Edit.php:159 #: src/Module/Post/Edit.php:159
msgid "Categories (comma-separated list)" msgid "Categories (comma-separated list)"
msgstr "" msgstr ""
#: src/Content/Conversation.php:386 src/Module/Item/Compose.php:222 #: src/Content/Conversation.php:386 src/Module/Item/Compose.php:223
msgid "Scheduled at" msgid "Scheduled at"
msgstr "" msgstr ""
@ -3272,7 +3272,7 @@ msgstr ""
msgid "[no subject]" msgid "[no subject]"
msgstr "" msgstr ""
#: src/Model/Photo.php:1189 src/Module/Media/Photo/Upload.php:197 #: src/Model/Photo.php:1188 src/Module/Media/Photo/Upload.php:171
msgid "Wall Photos" msgid "Wall Photos"
msgstr "" msgstr ""
@ -7227,21 +7227,21 @@ msgstr ""
msgid "Visibility" msgid "Visibility"
msgstr "" msgstr ""
#: src/Module/Item/Compose.php:201 #: src/Module/Item/Compose.php:202
msgid "Clear the location" msgid "Clear the location"
msgstr "" msgstr ""
#: src/Module/Item/Compose.php:202 #: src/Module/Item/Compose.php:203
msgid "Location services are unavailable on your device" msgid "Location services are unavailable on your device"
msgstr "" msgstr ""
#: src/Module/Item/Compose.php:203 #: src/Module/Item/Compose.php:204
msgid "" msgid ""
"Location services are disabled. Please check the website's permissions on " "Location services are disabled. Please check the website's permissions on "
"your device" "your device"
msgstr "" msgstr ""
#: src/Module/Item/Compose.php:209 #: src/Module/Item/Compose.php:210
msgid "" msgid ""
"You can make this page always open when you use the New Post button in the " "You can make this page always open when you use the New Post button in the "
"<a href=\"/settings/display\">Theme Customization settings</a>." "<a href=\"/settings/display\">Theme Customization settings</a>."
@ -7312,14 +7312,7 @@ msgstr ""
msgid "Unable to process image." msgid "Unable to process image."
msgstr "" msgstr ""
#: src/Module/Media/Photo/Upload.php:187 src/Module/Profile/Photos.php:164 #: src/Module/Media/Photo/Upload.php:179 src/Module/Profile/Photos.php:237
#: src/Module/Profile/Photos.php:167 src/Module/Profile/Photos.php:194
#: src/Module/Settings/Profile/Photo/Index.php:59
#, php-format
msgid "Image exceeds size limit of %s"
msgstr ""
#: src/Module/Media/Photo/Upload.php:205 src/Module/Profile/Photos.php:243
#: src/Module/Settings/Profile/Photo/Index.php:95 #: src/Module/Settings/Profile/Photo/Index.php:95
msgid "Image upload failed." msgid "Image upload failed."
msgstr "" msgstr ""
@ -8349,24 +8342,31 @@ msgstr ""
#: src/Module/Profile/Conversations.php:106 #: src/Module/Profile/Conversations.php:106
#: src/Module/Profile/Conversations.php:109 src/Module/Profile/Profile.php:351 #: src/Module/Profile/Conversations.php:109 src/Module/Profile/Profile.php:351
#: src/Module/Profile/Profile.php:354 src/Protocol/Feed.php:1032 #: src/Module/Profile/Profile.php:354 src/Protocol/Feed.php:1090
#: src/Protocol/OStatus.php:1007 #: src/Protocol/OStatus.php:1007
#, php-format #, php-format
msgid "%s's timeline" msgid "%s's timeline"
msgstr "" msgstr ""
#: src/Module/Profile/Conversations.php:107 src/Module/Profile/Profile.php:352 #: src/Module/Profile/Conversations.php:107 src/Module/Profile/Profile.php:352
#: src/Protocol/Feed.php:1036 src/Protocol/OStatus.php:1012 #: src/Protocol/Feed.php:1094 src/Protocol/OStatus.php:1012
#, php-format #, php-format
msgid "%s's posts" msgid "%s's posts"
msgstr "" msgstr ""
#: src/Module/Profile/Conversations.php:108 src/Module/Profile/Profile.php:353 #: src/Module/Profile/Conversations.php:108 src/Module/Profile/Profile.php:353
#: src/Protocol/Feed.php:1039 src/Protocol/OStatus.php:1016 #: src/Protocol/Feed.php:1097 src/Protocol/OStatus.php:1016
#, php-format #, php-format
msgid "%s's comments" msgid "%s's comments"
msgstr "" msgstr ""
#: src/Module/Profile/Photos.php:164 src/Module/Profile/Photos.php:167
#: src/Module/Profile/Photos.php:194
#: src/Module/Settings/Profile/Photo/Index.php:59
#, php-format
msgid "Image exceeds size limit of %s"
msgstr ""
#: src/Module/Profile/Photos.php:170 #: src/Module/Profile/Photos.php:170
msgid "Image upload didn't complete, please try again" msgid "Image upload didn't complete, please try again"
msgstr "" msgstr ""
@ -8385,7 +8385,7 @@ msgstr ""
msgid "Image file is empty." msgid "Image file is empty."
msgstr "" msgstr ""
#: src/Module/Profile/Photos.php:376 #: src/Module/Profile/Photos.php:358
msgid "View Album" msgid "View Album"
msgstr "" msgstr ""