Skip to content

Translate zxcvbn messages at least in French #70

Description

@fishilico

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions