Download & Extend

Password strength message can't be translated

Project:Password policy
Version:7.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Password strength is not translatable and uses D6 string values.

Comments

#1

Status:active» needs review

Patch attached. Please review.

AttachmentSizeStatusTest resultOperations
password_policy-password_strength_message_translation-1406342-1.patch1.85 KBIgnored: Check issue status.NoneNone

#2

Status:needs review» needs work

Shouldn't we just be converting this to use Drupal.t() ? I'm not a JS guy, but I don't see this translate method recommended anywhere.

#3

Drupal core user.js file uses the same technique for translation: provide an already translated strings via settings. Don't know why Drupal.t() is not being used in this scenario.

Also, you may notice, that other strings are being transferred to JS in settings too. My patch just follows this pattern.

#4

Status:needs work» needs review

As long as the patch works, I'm okay with it for now. This module is in serious need of cleanup and that'll probably just wait until 7.x-2.x.

#5

Sorry, I've made a typo in previous patch (Weak and Good messages are mixed up).
Attached fixed version.

AttachmentSizeStatusTest resultOperations
password_policy-password_strength_message_translation-1406342-5.patch1.83 KBIgnored: Check issue status.NoneNone

#6

Version:7.x-1.0-beta3» 7.x-1.x-dev
Status:needs review» fixed

This works good to me. Fixed and committed.

http://drupalcode.org/project/password_policy.git/commit/802aa0c

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.