From 4ad33c220a8ef578e338154711bbe9c28bbbe135 Mon Sep 17 00:00:00 2001 From: andreapasotti Date: Wed, 29 Dec 2021 15:40:56 +0100 Subject: [PATCH 1/3] "Unable to verify ... submission" is translatable --- src/controllers/RecaptchaController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/RecaptchaController.php b/src/controllers/RecaptchaController.php index f99be4a..00c3d24 100644 --- a/src/controllers/RecaptchaController.php +++ b/src/controllers/RecaptchaController.php @@ -36,7 +36,7 @@ public function actionVerifySubmission() if ($verified) { return Controller::run('/' . $action, func_get_args()); // run the intended action (add / to force it's scope to be outside the plugin) with all the params passed to this controller action } else { - Craft::$app->getSession()->setError('Unable to verify your submission.'); + Craft::$app->getSession()->setError(Craft::t('site', 'Unable to verify your submission.')); return null; } } From 3ec44e7614abfd860973d6b48b555914c2bd4f60 Mon Sep 17 00:00:00 2001 From: andreapasotti Date: Wed, 29 Dec 2021 15:41:02 +0100 Subject: [PATCH 2/3] Italian translation --- src/translations/it/recaptcha.php | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/translations/it/recaptcha.php diff --git a/src/translations/it/recaptcha.php b/src/translations/it/recaptcha.php new file mode 100644 index 0000000..63f7372 --- /dev/null +++ b/src/translations/it/recaptcha.php @@ -0,0 +1,32 @@ + 'Plugin Craft reCAPTCHA caricato', + 'Site Key' => 'Chiave del sito', + 'Secret Key' => 'Chiave segreta', + 'Enter your reCAPTCHA site key.' => 'Inserisci la tua chiave del sito reCAPTCHA.', + 'Enter your reCAPTCHA secret key.' => 'Inserisci la tua chiave segreta reCAPTCHA.', + 'Validate contact forms?' => 'Convalida i form di contatto?', + 'Enable to automatically validate reCAPTCHAs when using the official [Craft CMS contact form plugin](https://github.com/craftcms/contact-form).' => 'Abilita per convalidare automaticamente i reCAPTCHA utilizzando [Craft CMS Contact Form Plugin](https://github.com/craftcms/contact-form)', + 'Please verify you are human.' => 'Per favore verifica di essere un umano.' +]; From 02fe33aa86ef6822a991cb0dae1f213a2d6fab02 Mon Sep 17 00:00:00 2001 From: Andrea Pasotti Date: Wed, 29 Dec 2021 15:46:44 +0100 Subject: [PATCH 3/3] Update Italian translations Docblock --- src/translations/it/recaptcha.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/translations/it/recaptcha.php b/src/translations/it/recaptcha.php index 63f7372..9cdce3b 100644 --- a/src/translations/it/recaptcha.php +++ b/src/translations/it/recaptcha.php @@ -9,14 +9,14 @@ */ /** - * Craft reCAPTCHA en Translation + * Craft reCAPTCHA italian Translation * * Returns an array with the string to be translated (as passed to `Craft::t('craft-recaptcha', '...')`) as * the key, and the translation as the value. * * http://www.yiiframework.com/doc-2.0/guide-tutorial-i18n.html * - * @author Matt West + * @author Andrea Pasotti (https://www.andreapasottiweb.com) * @package CraftRecaptcha * @since 1.0.0 */