|
5 | 5 | namespace PhpList\Core\Domain\Identity\Service; |
6 | 6 |
|
7 | 7 | use PhpList\Core\Domain\Common\I18n\Messages; |
8 | | -use PhpList\Core\Domain\Common\I18n\TranslatorInterface; |
| 8 | +use Symfony\Contracts\Translation\TranslatorInterface; |
9 | 9 | use PhpList\Core\Domain\Configuration\Service\Manager\EventLogManager; |
10 | 10 | use PhpList\Core\Domain\Identity\Model\AdministratorToken; |
11 | 11 | use PhpList\Core\Domain\Identity\Repository\AdministratorRepository; |
@@ -35,16 +35,16 @@ public function createSession(string $loginName, string $password): Administrato |
35 | 35 | { |
36 | 36 | $administrator = $this->administratorRepository->findOneByLoginCredentials($loginName, $password); |
37 | 37 | if ($administrator === null) { |
38 | | - $entry = $this->translator->translate(Messages::AUTH_LOGIN_FAILED, ['login' => $loginName]); |
| 38 | + $entry = $this->translator->trans(Messages::AUTH_LOGIN_FAILED, ['login' => $loginName]); |
39 | 39 | $this->eventLogManager->log('login', $entry); |
40 | | - $message = $this->translator->translate(Messages::AUTH_NOT_AUTHORIZED); |
| 40 | + $message = $this->translator->trans(Messages::AUTH_NOT_AUTHORIZED); |
41 | 41 | throw new UnauthorizedHttpException('', $message, null, 1500567098); |
42 | 42 | } |
43 | 43 |
|
44 | 44 | if ($administrator->isDisabled()) { |
45 | | - $entry = $this->translator->translate(Messages::AUTH_LOGIN_DISABLED, ['login' => $loginName]); |
| 45 | + $entry = $this->translator->trans(Messages::AUTH_LOGIN_DISABLED, ['login' => $loginName]); |
46 | 46 | $this->eventLogManager->log('login', $entry); |
47 | | - $message = $this->translator->translate(Messages::AUTH_NOT_AUTHORIZED); |
| 47 | + $message = $this->translator->trans(Messages::AUTH_NOT_AUTHORIZED); |
48 | 48 | throw new UnauthorizedHttpException('', $message, null, 1500567099); |
49 | 49 | } |
50 | 50 |
|
|
0 commit comments