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

Translate zxcvbn messages at least in French #70

Open
fishilico opened this issue Feb 8, 2018 · 0 comments
Open

Translate zxcvbn messages at least in French #70

fishilico opened this issue Feb 8, 2018 · 0 comments

Comments

@fishilico
Copy link
Member

When a user changes her password, the zxcvbn feedback is kept in English even though the website is in French. This is because django-zxcvbn-password does not internationalize zxcvbn.js in https://github.com/Pawamoy/django-zxcvbn-password/tree/v2.0.1/src/zxcvbn_password/static/zxcvbn_password/js

A similar project, django_password_strength, seems to internationalize the feedback in https://github.com/aj-may/django-password-strength/blob/1.2.1/django_password_strength/static/django_password_strength/js/password_strength.js but the project has not got any release since 2015.

As zxcvbn.js itself comes from coffescript project https://github.com/dropbox/zxcvbn, this file cannot be easily modified (internationalized) without some hacky tricks. I see 3 options to get French zxcvbn feedback messages:

  • use django_password_strength if it works with recent Django releases (or make it work if not) ;
  • copy django_password_strength indirection code in s/password_strength.js and add it to the static files so that it overwrites the file provided by django-zxcvbn-password ;
  • translate zxcvbn.js by hand and provide it in a localized directory loaded through some Django-urls magic related to internationalization.

Choosing which option to take requires some work.

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

1 participant