-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
localized DonateHelpPage recaptcha box #11450
localized DonateHelpPage recaptcha box #11450
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @danielfmiranda ,
I'm wondering if FA supports all languages our site supports? If not, we will need to fallback to en
so that the script file can be properly loaded (e.g., using our custom fa_locale_code
tag)
Hi @mmmavis!! Thanks for the review 👍 The external script that this PR updates is actually not directly related to form assembly, but instead a google script that is used the render the recaptcha box. Taking a look at the recaptcha docs here, it appears that they support all of the languages that we support, and after testing I can confirm they do. For example, the screenshots above show a localized recaptcha box for every language in our supported languages list. Taking a look at the code for However, I do see the benefit in sharing one tag. Do you think we should stick with Thanks! |
@danielfmiranda ah apologies! From my quick review yesterday I didn't realize we were talking about a script from Google. Thank you for your detailed explanation! In that case I would say sticking to your current implementation (using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @danielfmiranda !
Description
Link to sample test page:
Related PRs/issues: #11448
This PR updates the
src
of the script<script src='https://www.google.com/recaptcha/enterprise.js?onload=gCaptchaReadyCallback&render=explicit&hl=en_US' nonce="{{ request.csp_nonce }}" async defer></script>
to includehl={{ LANGUAGE_CODE }}
instead of being hardcoded toen_US
. That way the recaptcha box renders with the users active locale.Screenshots
EN (English):
ES (Spanish):
DE (German):
FR (French):
fy-NL (Frisian):
NL (Dutch):
PL (Polish):
pt-BR (Portuguese (Brazil)):
SW (Swahili):