From 3a1164164791edbe30c7247b98585474867dd968 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Wed, 29 Aug 2018 22:05:38 +0200 Subject: Updated LegacyMiddleware to use Translator class --- src/Middleware/LegacyMiddleware.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/Middleware') diff --git a/src/Middleware/LegacyMiddleware.php b/src/Middleware/LegacyMiddleware.php index 78132815..233f66b2 100644 --- a/src/Middleware/LegacyMiddleware.php +++ b/src/Middleware/LegacyMiddleware.php @@ -83,9 +83,12 @@ class LegacyMiddleware implements MiddlewareInterface } if (empty($title) and empty($content)) { + /** @var Translator $translator */ + $translator = $this->container->get('translator'); + $page = 404; - $title = _('Page not found'); - $content = _('This page could not be found or you don\'t have permission to view it. You probably have to sign in or register in order to gain access!'); + $title = $translator->translate('Page not found'); + $content = $translator->translate('This page could not be found or you don\'t have permission to view it. You probably have to sign in or register in order to gain access!'); } return $this->renderPage($page, $title, $content); -- cgit v1.2.3-70-g09d2