Fix DisplayNotFound page

- Add another condition earlier in Module\Item\Display
- Separate reasons in individual translation strings
This commit is contained in:
Hypolite Petovan 2023-07-17 22:55:46 -04:00
parent 96d2cddb54
commit 63f5d94a02
3 changed files with 22 additions and 12 deletions

View file

@ -31,18 +31,20 @@ class DisplayNotFound extends \Friendica\BaseModule
{
protected function content(array $request = []): string
{
$reasons = [
$this->t("The top-level post isn't visible."),
$this->t('The top-level post was deleted.'),
$this->t('This node has blocked the top-level author or the author of the shared post.'),
$this->t('You have ignored or blocked the top-level author or the author of the shared post.'),
];
$tpl = Renderer::getMarkupTemplate('special/displaynotfound.tpl');
return Renderer::replaceMacros($tpl, [
'$l10n' => [
'title' => $this->t('Not Found'),
'message' => $this->t("<p>Unfortunately, the requested conversation isn't available to you.</p>
<p>Possible reasons include:</p>
<ul>
<li>The top-level post isn't visible.</li>
<li>The top-level post was deleted.</li>
<li>The node has blocked the top-level author or the author of the shared post.</li>
<li>You have ignored or blocked the top-level author or the author of the shared post.</li>
</ul>"),
'title' => $this->t('Conversation Not Found'),
'desc1' => $this->t("Unfortunately, the requested conversation isn't available to you."),
'desc2' => $this->t('Possible reasons include:'),
'reasons' => $reasons,
]
]);
}