Problem/Motivation
We've been using the module in a multi-language client site. It features a custom error message now. This message unfortunately is not translatable, so it's not of much use for our purpose.
Proposed resolution
Allow to leave the message empty, so no error message about the failed V3 verification will be shown additionally to the generic Captcha module's message, and/or allow to translate the message to all available languages of the site.
We took the captcha error message as an example to allow for translations and adapted it according to the reCAPTCHA V3 module's needs and the optional empty message.
Remaining tasks
Community review.
User interface changes
Additional text fields per language are provided for the error message within the administrative settings form. If left empty, no additional message about a failed V3 verification is shown to the site's visitors. If properly filled per language, the visitors will see the error message localized according to their current FE language.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3089890-3.patch | 3.46 KB | dench0 |
Comments
Comment #2
mario steinitzAn according patch for review.
Comment #3
semiaddict commentedThis also affects the 8.x version of the module.
Comment #4
dench0I don't think that we should reinvent the wheel and here the patch which will allow you to translate error message using internationalization module.
Comment #6
dench0