diff --git a/config/packages/security.yaml b/config/packages/security.yaml index 1732fdb..58a5c8e 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -36,7 +36,7 @@ security: # Easy way to control access for large sections of your site # Note: Only the *first* access control that matches will be used access_control: - # - { path: ^/admin, roles: ROLE_ADMIN } + - { path: ^/admin, roles: ROLE_ADMIN } # - { path: ^/profile, roles: ROLE_USER } when@test: diff --git a/src/Controller/QuizController.php b/src/Controller/QuizController.php index b5882e5..9b6c241 100644 --- a/src/Controller/QuizController.php +++ b/src/Controller/QuizController.php @@ -95,7 +95,7 @@ final class QuizController extends AbstractController $candidate = $candidateRepository->getCandidateByHash($season, $nameHash); if (!$candidate instanceof Candidate) { - $this->addFlash(FlashType::Danger, 'Candidate not found'); + $this->addFlash(FlashType::Danger, $this->translator->trans('Candidate not found')); return $this->redirectToRoute('app_quiz_entername', ['seasonCode' => $season->getSeasonCode()]); } @@ -117,7 +117,7 @@ final class QuizController extends AbstractController $question = $questionRepository->findNextQuestionForCandidate($candidate); if (!$question instanceof Question) { - $this->addFlash(FlashType::Success, 'Quiz completed'); + $this->addFlash(FlashType::Success, $this->translator->trans('Quiz completed')); return $this->redirectToRoute('app_quiz_entername', ['seasonCode' => $season->getSeasonCode()]); } diff --git a/src/Controller/RegistrationController.php b/src/Controller/RegistrationController.php index 0575940..212eea4 100644 --- a/src/Controller/RegistrationController.php +++ b/src/Controller/RegistrationController.php @@ -86,7 +86,7 @@ final class RegistrationController extends AbstractController return $this->redirectToRoute('app_register'); } - $this->addFlash('success', 'Your email address has been verified.'); + $this->addFlash('success', $this->translator->trans('Your email address has been verified.')); return $this->redirectToRoute('app_backoffice_index'); } diff --git a/translations/messages+intl-icu.nl.yaml b/translations/messages+intl-icu.nl.yaml index b8c4a9c..c4c8eb8 100644 --- a/translations/messages+intl-icu.nl.yaml +++ b/translations/messages+intl-icu.nl.yaml @@ -2,6 +2,7 @@ 'All Seasons': 'Alle seizoenen' 'Already have an account? Log in': 'Heb je al een account? Log in' Candidate: Kandidaat +'Candidate not found': 'Kandidaat niet gevonden' Candidates: Kandidaten 'Correct Answers': 'Goede antwoorden' Corrections: Jokers @@ -22,6 +23,7 @@ Password: Wachtwoord 'Prepare Custom Elimination': 'Bereid aangepaste eliminatie voor' Questions: Vragen Quiz: Test +'Quiz completed': 'Test voltooid' Quizzes: Tests Register: Registreren 'Remember me': 'Onthoud mij' @@ -34,3 +36,4 @@ Seasons: Seizoenen 'There are no answers for this question': 'Er zijn geen antwoorden voor deze vraag' Time: Tijd 'Your Seasons': 'Jouw seizoenen' +'Your email address has been verified.': 'Je e-mailadres is geverifieerd.'