Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#4346 closed (invalid)

Model names are not translateable

Reported by: Marc Fargas <telenieko@…> Owned by: Malcolm Tredinnick
Component: Internationalization Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

From my POV a model name is not translateable so it should not be called with _(...) on def str()
Happens with AnonymousUser in contrib/auth/models.py

Attachments (1)

modelclass.diff (380 bytes ) - added by Marc Fargas <telenieko@…> 17 years ago.
Strips _()

Download all attachments as: .zip

Change History (4)

by Marc Fargas <telenieko@…>, 17 years ago

Attachment: modelclass.diff added

Strips _()

comment:1 by Marc Fargas <telenieko@…>, 17 years ago

Has patch: set

comment:2 by Malcolm Tredinnick, 17 years ago

Resolution: invalid
Status: newclosed

The {{{str}} method is not returning the model name. It's returning a string representation of the model that just happens to be the same as the model name and string representations are often translated. Plus, model names can be translated (they aren't by default, but they are if you specify verbose_name and mark it as translatable). So I don't think this is a bug.

comment:3 by Marc Fargas <telenieko@…>, 17 years ago

Ok! Thanks for the explanation :)

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