Improved messages

This commit is contained in:
Michael 2022-05-24 17:33:10 +00:00
parent f16cb13dc7
commit f764ab7429
2 changed files with 13 additions and 13 deletions

View file

@ -89,26 +89,26 @@ HELP;
echo ++$count . '/' . $total . "\t" . $contact['id'] . "\t" . $contact['url'] . "\t"; echo ++$count . '/' . $total . "\t" . $contact['id'] . "\t" . $contact['url'] . "\t";
$resourceid = Photo::ridFromURI($contact['photo']); $resourceid = Photo::ridFromURI($contact['photo']);
if (empty($resourceid)) { if (empty($resourceid)) {
echo $this->l10n->t('no resource') . "\n"; echo $this->l10n->t('no resource in photo %1', $contact['photo']) . "\n";
continue; continue;
} }
echo '1'; echo '1';
$photo = Photo::selectFirst([], ['resource-id' => $resourceid], ['order' => ['scale']]); $photo = Photo::selectFirst([], ['resource-id' => $resourceid], ['order' => ['scale']]);
if (empty($photo)) { if (empty($photo)) {
echo $this->l10n->t('no photo') . "\n"; echo $this->l10n->t('no photo with id %1', $resourceid) . "\n";
continue; continue;
} }
echo '2'; echo '2';
$imgdata = Photo::getImageDataForPhoto($photo); $imgdata = Photo::getImageDataForPhoto($photo);
if (empty($imgdata)) { if (empty($imgdata)) {
echo $this->l10n->t('no image data') . "\n"; echo $this->l10n->t('no image data for photo with id %1', $resourceid) . "\n";
continue; continue;
} }
echo '3'; echo '3';
$image = new Image($imgdata, Images::getMimeTypeByData($imgdata)); $image = new Image($imgdata, Images::getMimeTypeByData($imgdata));
if (!$image->isValid()) { if (!$image->isValid()) {
echo $this->l10n->t('invalid image') . "\n"; echo $this->l10n->t('invalid image for id %1', $resourceid) . "\n";
continue; continue;
} }

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-23 12:12+0000\n" "POT-Creation-Date: 2022-05-24 17:32+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"
@ -1641,20 +1641,20 @@ 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:94 #: src/Console/MoveToAvatarCache.php:92
msgid "no resource" msgid "no resource in photo %1"
msgstr "" msgstr ""
#: src/Console/MoveToAvatarCache.php:100 #: src/Console/MoveToAvatarCache.php:98
msgid "no photo" msgid "no photo with id %1"
msgstr "" msgstr ""
#: src/Console/MoveToAvatarCache.php:107 #: src/Console/MoveToAvatarCache.php:105
msgid "no image data" msgid "no image data for photo with id %1"
msgstr "" msgstr ""
#: src/Console/MoveToAvatarCache.php:113 #: src/Console/MoveToAvatarCache.php:111
msgid "invalid image" msgid "invalid image for id %1"
msgstr "" msgstr ""
#: src/Console/PostUpdate.php:87 #: src/Console/PostUpdate.php:87