Skip to content

Commit

Permalink
Merge pull request #31 from andreapasotti/translation
Browse files Browse the repository at this point in the history
Translations
  • Loading branch information
matt-west authored Jan 3, 2022
2 parents 24f3156 + 02fe33a commit d311dab
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/RecaptchaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
32 changes: 32 additions & 0 deletions src/translations/it/recaptcha.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
/**
* Craft reCAPTCHA plugin for Craft CMS 3.x
*
* Integrate Google’s reCAPTCHA into your forms.
*
* @link https://mattwest.io
* @copyright Copyright (c) 2018 Matt West
*/

/**
* 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 Andrea Pasotti (https://www.andreapasottiweb.com)
* @package CraftRecaptcha
* @since 1.0.0
*/
return [
'Craft reCAPTCHA plugin loaded' => '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.'
];

0 comments on commit d311dab

Please sign in to comment.