#16803: Unicode representation of ContentType instances is not translated -------------------------------------+------------------------------------- Reporter: bronger | Owner: nobody Type: Bug | Status: new Milestone: | Component: Version: 1.3 | contrib.contenttypes Resolution: | Severity: Normal Triage Stage: Design | Keywords: decision needed | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | -------------------------------------+------------------------------------- Changes (by isagalaev):
* stage: Unreviewed => Design decision needed Comment: First, I was wrong that the field {{{name}}} is technical. Quite the opposite, it's intended to be a human-readable representation. So the simplest solution to your use-case is changing the {{{name}}} to whatever you want. However this won't work in a multilingual environment since the field's content cannot be translated (at the moment). I've conducted a little research. {{{ContentType.name}}} is initialized with model's untranslated verbose name — {{{verbose_name_raw}}}, a property which was introduced in [5225] specifically for the purpose of using for content types. I don't know why it was done this way. It might be a good idea to change this to using a usual translated verbose names of a model but it's technically backwards incompatible. I'm marking this as DDN to get an opinion of a core developer. To summarize: * {{{ContentType}}} uses a dedicated field for its human-readable representation. The idea is to use real verbose names of models. * Good: {{{ContentType}}}s will become translatable * Good: code around {{{verbose_name_raw}}} will go away * Bad: it's technically backwards incompatible: users might be changing and relying on {{{ContentType.name}}} My own take would be to go for a change since I doubt {{{ContentType.name}} is widely used **and** is different from {{{verbose_name}}} of a model. Most probably we will even save maintenance for people who routinely change names of content type according to model's verbose names. -- Ticket URL: <https://code.djangoproject.com/ticket/16803#comment:3> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.