Opened 6 years ago

Closed 9 months ago

#13427 closed Bug (fixed)

verbose_name and verbose_name_plural is untranslated on autogenerated m2m models

Reported by: russellm Owned by: ramiro
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords: verbose_name
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


When Django adds an autogenerated m2m model, it uses the literal string "A-B relationship" for the verbose_name. This verbose name is then used by the admin if the m2m model is used in an inline. Because the string isn't marked for translation, the title "A-B relationships" on the inline block and the "Add another A-B relationship" button are not translatable.

r13029 included translation, but for some reason, having a ugettext_lazy() with string interpolated arguments caused the fixtures modeltest to fail.

Change History (6)

comment:1 Changed 6 years ago by russellm

(In [13031]) Refs #13427 -- Removed translation from verbose_name and verbose_name_plural on autogenerated m2m models.

comment:2 Changed 6 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 5 years ago by julien

  • Severity set to Normal
  • Type set to Bug

comment:4 Changed 5 years ago by ramiro

  • Easy pickings unset
  • Keywords verbose_name added
  • Owner changed from nobody to ramiro
  • UI/UX unset

comment:5 Changed 9 months ago by claudep

  • Has patch set

I've re-added the translatable strings, and encountered no failures locally. Let's see...

comment:6 Changed 9 months ago by Claude Paroz <claude@…>

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

In 68554d16:

Fixed #13427 -- Made auto-m2m verbose names translatable

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