diff --git a/src/Altcha/Form/AltchaType.php b/src/Altcha/Form/AltchaType.php index 1a314d1..66e99c4 100644 --- a/src/Altcha/Form/AltchaType.php +++ b/src/Altcha/Form/AltchaType.php @@ -38,6 +38,15 @@ class AltchaType extends AbstractType public function buildView(FormView $view, FormInterface $form, array $options) { + $translations = [ + 'label' => $this->translator->trans('altcha.widget.label', [], 'form'), + 'verified' => $this->translator->trans('altcha.widget.verified', [], 'form'), + 'verifying' => $this->translator->trans('altcha.widget.verifying', [], 'form'), + 'waitAlert' => $this->translator->trans('altcha.widget.waitalert', [], 'form'), + 'error' => $this->translator->trans('altcha.widget.error', [], 'form'), + 'expired' => $this->translator->trans('altcha.widget.expired', [], 'form'), + ]; + $view->vars['translations'] = json_encode($translations); $view->vars['challengeJson'] = $this->requestChallenge(); $view->vars['debug'] = $this->altchaDebug; $view->vars['workers'] = $this->altchaWorkers; diff --git a/templates/altcha.html.twig b/templates/altcha.html.twig index a61a39d..a2bcdf5 100644 --- a/templates/altcha.html.twig +++ b/templates/altcha.html.twig @@ -2,6 +2,7 @@ altcha.validator.server_validation_error Verification failed. Try again later. + + altcha.widget.error + Verification failed. Try again later. + + + altcha.widget.expired + Verification expired. Try again. + + + altcha.widget.label + I'm not a robot + + + altcha.widget.verified + Verified + + + altcha.widget.verifying + Verifying... + + + altcha.widget.waitalert + Verifying... please wait. + altcha.widget.title Verification * + + altcha.widget.info + Please check the box above to validate that you are not a robot. If you encounter any problem while doing this, please update your browser. + diff --git a/translations/form.fr.xlf b/translations/form.fr.xlf index e424496..137fe4f 100644 --- a/translations/form.fr.xlf +++ b/translations/form.fr.xlf @@ -21,10 +21,38 @@ altcha.validator.server_validation_error Échec de la vérification. Réessayez plus tard. + + altcha.widget.error + Échec de la vérification. Réesayez plus tard. + + + altcha.widget.expired + Vérification expirée. Réessayez. + + + altcha.widget.label + Je ne suis pas un robot + + + altcha.widget.verified + Vérifié + + + altcha.widget.verifying + Vérification en cours... + + + altcha.widget.waitalert + Vérification en cours... veuillez patienter. + altcha.widget.title Vérification * + + altcha.widget.info + Veuillez cocher la case ci dessus afin de valider que vous n'êtes pas un robot. Si vous rencontrez un problème lors de cette action, mettez à jour votre navigateur. +