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.
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-passworddoes not internationalize zxcvbn.js in https://github.com/Pawamoy/django-zxcvbn-password/tree/v2.0.1/src/zxcvbn_password/static/zxcvbn_password/jsA 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.jsitself 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:django_password_strengthif it works with recent Django releases (or make it work if not) ;django_password_strengthindirection code ins/password_strength.jsand add it to the static files so that it overwrites the file provided bydjango-zxcvbn-password;zxcvbn.jsby 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.