summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
35e4301)
Use bundle alias as translation domain
* {@inheritdoc}
*/
class AuthenticationFailureHandler extends DefaultAuthenticationFailureHandler {
* {@inheritdoc}
*/
class AuthenticationFailureHandler extends DefaultAuthenticationFailureHandler {
+ /**
+ * Alias string
+ */
+ protected string $alias;
+
parent::__construct($httpKernel, $httpUtils, $options, $logger);
//Set config
parent::__construct($httpKernel, $httpUtils, $options, $logger);
//Set config
- $this->config = $container->getParameter(RapsysUserBundle::getAlias());
+ $this->config = $container->getParameter($this->alias = RapsysUserBundle::getAlias());
//With not enabled user
} elseif ($parent instanceof DisabledException) {
//Add error message account is not enabled
//With not enabled user
} elseif ($parent instanceof DisabledException) {
//Add error message account is not enabled
- $this->addFlash('error', $this->translator->trans('Account not enabled'));
+ $this->addFlash('error', $this->translator->trans('Account not enabled', [], $this->alias));
//Redirect on the same route with sent=1 to cleanup form
return new RedirectResponse($this->router->generate($request->get('_route'), $request->get('_route_params')), 302);
//Redirect on the same route with sent=1 to cleanup form
return new RedirectResponse($this->router->generate($request->get('_route'), $request->get('_route_params')), 302);
} while(next($keys));
//Set translation
} while(next($keys));
//Set translation
- $current = $this->translator->trans($current);
+ $current = $this->translator->trans($current, [], $this->alias);
//Remove reference
unset($current);
//Remove reference
unset($current);
$context['subject'] = $subject = ucfirst(
$this->translator->trans(
$this->config['register']['mail']['subject'],
$context['subject'] = $subject = ucfirst(
$this->translator->trans(
$this->config['register']['mail']['subject'],
- $this->slugger->flatten($context, null, '.', '%', '%')
+ $this->slugger->flatten($context, null, '.', '%', '%'),
+ $this->alias
//Catch obvious transport exception
} catch(TransportExceptionInterface $e) {
//Add error message mail unreachable
//Catch obvious transport exception
} catch(TransportExceptionInterface $e) {
//Add error message mail unreachable
- $this->addFlash('error', $this->translator->trans('Unable to reach account'));
+ $this->addFlash('error', $this->translator->trans('Unable to reach account', [], $this->alias));
- $this->addFlash('notice', $this->translator->trans('Your verification mail has been sent, to activate your account follow the confirmation link inside'));
+ $this->addFlash('notice', $this->translator->trans('Your verification mail has been sent, to activate your account follow the confirmation link inside', [], $this->alias));
- $this->addFlash('warning', $this->translator->trans('If you did not receive a verification mail, check your Spam or Junk mail folder'));
+ $this->addFlash('warning', $this->translator->trans('If you did not receive a verification mail, check your Spam or Junk mail folder', [], $this->alias));
//Redirect on the same route with sent=1 to cleanup form
return new RedirectResponse($this->router->generate($request->get('_route'), $request->get('_route_params')), 302);
//Redirect on the same route with sent=1 to cleanup form
return new RedirectResponse($this->router->generate($request->get('_route'), $request->get('_route_params')), 302);