Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#25073 closed Cleanup/optimization (fixed)

The field "content_type" in model Permission has no translation

Reported by: Grigoriy Kramarenko Owned by: Szilveszter Farkas
Component: Internationalization Version: 1.8
Severity: Normal Keywords: auth permission contenttype
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Need append verbose_name to the field

@python_2_unicode_compatible
class Permission(models.Model):
    ...
    content_type = models.ForeignKey(ContentType, verbose_name=_('content type'))
    ...

Change History (7)

comment:1 by Grigoriy Kramarenko, 9 years ago

Summary: The object "contenttype" in model Permission has no translationThe field "content_type" in model Permission has no translation

comment:2 by Baptiste Mispelon, 9 years ago

Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

Hi,

I agree, I don't see why we wouldn't mark it for translation.
We should also check if there are other ForeignKey fields that need an explicit verbose_name.

Thanks.

comment:3 by Grigoriy Kramarenko, 9 years ago

List:

./contrib/auth/models.py:    content_type = models.ForeignKey(ContentType)
./contrib/admin/models.py:    user = models.ForeignKey(settings.AUTH_USER_MODEL)
./contrib/admin/models.py:    content_type = models.ForeignKey(ContentType, blank=True, null=True)
./contrib/redirects/models.py:    site = models.ForeignKey(Site)
./contrib/flatpages/models.py:    sites = models.ManyToManyField(Site)

comment:4 by Szilveszter Farkas, 9 years ago

Owner: changed from nobody to Szilveszter Farkas
Status: newassigned

comment:5 by Szilveszter Farkas, 9 years ago

Has patch: set

comment:6 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: assignedclosed

In f576b23a:

Fixed #25073 -- Added verbose_name to contrib's model fields that were missing it.

comment:7 by Tim Graham <timograham@…>, 9 years ago

In e25ba6e:

Refs #25073 -- Copied recently added verbose_names to migrations.

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