#33985: ContentTypes and Permissions mix English with other languages in __str__
-----------------------------------------+------------------------
               Reporter:  Meiyer         |          Owner:  nobody
                   Type:  Uncategorized  |         Status:  new
              Component:  contrib.admin  |        Version:  3.0
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 The string representation of
 `django.contrib.contenttypes.models.ContentType` and
 `django.contrib.auth.models.Permission` was changed in commit
 
[https://github.com/django/django/commit/48c17807a99f7a4341c74db19e16a37b010827c2
 48c17807] to solve #16027. However, the `__str__` function mixes the
 model’s `app_label` (which is not localized) with the model’s
 `verbose_name` (which is localized). This results in weirdly looking
 strings, part of which is in English and part in a different language, and
 maybe even different alphabet.

 The comment https://code.djangoproject.com/ticket/16027#comment:21 does
 not clarify why the application’s `app_label` was chosen and not
 `verbose_name` (via
 `self._meta.apps.get_app_config(self.app_label).verbose_name`). In my
 opinion, either the whole of the ContentType’s representation should use
 localized labels or none of them should be localized.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33985>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701831372e1f6-8777dcd5-d220-4f54-8ad6-b60703d7bed6-000000%40eu-central-1.amazonses.com.

Reply via email to