Skip to content
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

Message internationalization #11

Open
Aure77 opened this issue Jul 23, 2014 · 5 comments
Open

Message internationalization #11

Aure77 opened this issue Jul 23, 2014 · 5 comments

Comments

@Aure77
Copy link

Aure77 commented Jul 23, 2014

Support different language for users messages (like "Wrong Captcha" toast).
I can help you for French translation if you want.

@akhoury
Copy link
Owner

akhoury commented Jul 23, 2014

Well, currently the Captcha language settings will attempt to use the NodeBB language settings. see this line here, however, if the language is not natively supported by the Google Captcha, (see list here: https://developers.google.com/recaptcha/docs/customization#i18n) it will default back to English.

But now I think about it, I can add advanced language settings to customize the messages.

@akhoury
Copy link
Owner

akhoury commented Jul 23, 2014

from that recaptcha google link above:

<script type="text/javascript">
        var RecaptchaOptions = {
                custom_translations : {
                        instructions_visual : "Scrivi le due parole:",
                        instructions_audio : "Trascrivi ci\u00f2 che senti:",
                        play_again : "Riascolta la traccia audio",
                        cant_hear_this : "Scarica la traccia in formato MP3",
                        visual_challenge : "Modalit\u00e0 visiva",
                        audio_challenge : "Modalit\u00e0 auditiva",
                        refresh_btn : "Chiedi due nuove parole",
                        help_btn : "Aiuto",
                        incorrect_try_again : "Scorretto. Riprova.",
                },
                lang : 'it', // Unavailable while writing this code (just for audio challenge)
                theme : 'red' // Make sure there is no trailing ',' at the end of the RecaptchaOptions dictionary
        };
</script>

so yea, it's possible

@akhoury
Copy link
Owner

akhoury commented Jul 23, 2014

till then, just set your NodeBB language to fr and you should get a the french captcha version, since it is supported.

@Aure77
Copy link
Author

Aure77 commented Jul 23, 2014

reCaptcha language works fine.
I was talking about error message on register if captcha is wrong.
Message is hardcoded https://github.com/akhoury/nodebb-plugin-spam-be-gone/blob/master/library.js#L194
and displayed to user...

@akhoury
Copy link
Owner

akhoury commented Jul 23, 2014

touche. I'll try and fix that tonight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants