flask-wtf icon indicating copy to clipboard operation
flask-wtf copied to clipboard

i18n to RECAPTCHA_ERROR_CODES

Open ar-anvd opened this issue 9 years ago • 9 comments

It will be helpful if these messages could be translated without modify locally this file:

flask_wtf/recaptcha/validators.py

RECAPTCHA_ERROR_CODES = { 'missing-input-secret': 'The secret parameter is missing.', 'invalid-input-secret': 'The secret parameter is invalid or malformed.', 'missing-input-response': 'The response parameter is missing.', 'invalid-input-response': 'The response parameter is invalid or malformed.' }

ar-anvd avatar Sep 15 '15 15:09 ar-anvd

I can make a PR, just fixed it for myself.

sobolevn avatar Jul 13 '16 13:07 sobolevn

@sobolevn that would be great. I was trying to, but I'm not very familiar with i18n. :confounded: If you come across any other strings that need to be translatable, go ahead and mark them as well if you want.

davidism avatar Jul 13 '16 13:07 davidism

Any plans to support https://www.transifex.com/ ?

sobolevn avatar Jul 13 '16 13:07 sobolevn

I don't think we have the resources for transifex/crowdin/etc. Or does support not involve buying a plan? That would be a separate issue though.

davidism avatar Jul 13 '16 13:07 davidism

I'd imagine this would just be slurping in some localized JSON blob in a constructor (e.g. validators_en.json, validators_ru.json) -- 3rd party stuff seems like overkill.

tristanfisher avatar Jul 13 '16 13:07 tristanfisher

I have done it using babel. I have used the same approach as wtform. Is it fine by everyone?

I guess I will be able to submit it for review pretty soon.

sobolevn avatar Jul 17 '16 11:07 sobolevn

Sorry, forgot to mention this issue: https://github.com/lepture/flask-wtf/pull/253

sobolevn avatar Jul 17 '16 13:07 sobolevn

An approach such as https://github.com/wtforms/wtforms/tree/master/src/wtforms/locale is welcome.

PanderMusubi avatar Jan 08 '24 23:01 PanderMusubi

I don't think we have the resources for transifex/crowdin/etc. Or does support not involve buying a plan? That would be a separate issue though.

Weblate is free for FOSS. See the Libre plan at the bottom of https://weblate.org/en/hosting/ and use the same account for all repos under wtforms organization.

PanderMusubi avatar Jan 08 '24 23:01 PanderMusubi