Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#6774 closed (fixed)

Use ugettext_lazy instead of ugettext in contrib.auth.forms

Reported by: Honza_Kral Owned by: brosner
Component: Contrib apps Version: newforms-admin
Severity: Keywords: nfa-blocker auth ugettext
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Currently ugettext is used in form fields' definitions. this breaks when the module is being impoerted during initialization (before the language is properly set).

The patch corrects the issue by using ugettext_lazy where appropriate.

Attachments (1)

6774.nfa.diff (4.8 KB) - added by Honza_Kral 8 years ago.

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by Honza_Kral

comment:1 Changed 8 years ago by brosner

  • Component changed from Uncategorized to Contrib apps
  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to brosner
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

This seems to be the right thing to do. It worked before because oldforms did this in its __init__ which ran during view execution. Any particular reason for the usage of ugettext name over just _?

comment:2 Changed 8 years ago by brosner

  • Keywords nfa-blocker added

comment:3 Changed 8 years ago by brosner

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [7449]) newforms-admin: Fixed #6774, #7068 -- Use ugettext_lazy instead of ugettext in django/contrib/auth/ Marked a few strings for translation in the forms.

comment:4 Changed 8 years ago by Piotr Lewandowski <django@…>

In [7449] label "Email" was introduced but the documentation states that "E-mail" is the right way to write it.

Attached patch has the "E-mail" label. Is there a reason for not writing it that way?

comment:5 Changed 8 years ago by brosner

Ah, thanks. My bad will fix now.

Note: See TracTickets for help on using tickets.
Back to Top