Re: [Django] #36884: Translation of admin log messages fails due to case inconsistency in field names

1 view
Skip to first unread message

Django

unread,
Jan 28, 2026, 10:23:32 AMJan 28
to django-...@googlegroups.com
#36884: Translation of admin log messages fails due to case inconsistency in field
names
-------------------------------+------------------------------------------
Reporter: Meiyer | Owner: Thrishagowdabl
Type: Bug | Status: assigned
Component: contrib.admin | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------------
Changes (by Jacob Walls):

* needs_better_patch: 0 => 1

Comment:

Linters are failing.
--
Ticket URL: <https://code.djangoproject.com/ticket/36884#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 3, 2026, 1:33:04 AMFeb 3
to django-...@googlegroups.com
#36884: Translation of admin log messages fails due to case inconsistency in field
names
-------------------------------+------------------------------------------
Reporter: Meiyer | Owner: Thrishagowdabl
Type: Bug | Status: assigned
Component: contrib.admin | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------------
Comment (by jaffar Khan):

Want to work on this ticket if the current assignee is no longer
interested
--
Ticket URL: <https://code.djangoproject.com/ticket/36884#comment:4>

Django

unread,
Feb 3, 2026, 1:33:18 AMFeb 3
to django-...@googlegroups.com
#36884: Translation of admin log messages fails due to case inconsistency in field
names
-------------------------------+------------------------------------------
Reporter: Meiyer | Owner: Thrishagowdabl
Type: Bug | Status: assigned
Component: contrib.admin | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------------
Changes (by jaffar Khan):

* cc: jaffar Khan (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/36884#comment:5>

Django

unread,
Feb 9, 2026, 10:02:01 AM (9 days ago) Feb 9
to django-...@googlegroups.com
#36884: Translation of admin log messages fails due to case inconsistency in field
names
-------------------------------+------------------------------------------
Reporter: Meiyer | Owner: Thrishagowdabl
Type: Bug | Status: assigned
Component: contrib.admin | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------------
Comment (by master):

I confirm the issue.
The capitalisation is probably done in `db\models\fields\__init__.py` with
`"label": capfirst(self.verbose_name),`.

For example, this column content: `[{'changed': {'fields': ['Status']}}]`
is rendered in French str as: `Modification de « t2>t2:90 » — Modification
de Status.`
According to the app .po file, the end of the text should be `état.`, or
maybe `État.`
--
Ticket URL: <https://code.djangoproject.com/ticket/36884#comment:6>

Django

unread,
Feb 10, 2026, 5:38:55 AM (8 days ago) Feb 10
to django-...@googlegroups.com
#36884: Translation of admin log messages fails due to case inconsistency in field
names
-------------------------------+------------------------------------------
Reporter: Meiyer | Owner: Thrishagowdabl
Type: Bug | Status: assigned
Component: contrib.admin | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------------
Comment (by master):

Here is a proposed patch of `contrib/admin/utils.py`:

{{{
--- C:/D/tmp/utils_old.py Tue Feb 10 11:20:50 2026
+++ C:/D/tmp/utils_new.py Tue Feb 10 11:21:01 2026
@@ -1,8 +1,10 @@
def _get_changed_field_labels_from_form(form, changed_data):
changed_field_labels = []
+ opts = form.instance._meta
for field_name in changed_data:
try:
- verbose_field_name = form.fields[field_name].label or
field_name
+ # can't use form.fields[field_name].label because it is
wrapped in capfirst()
+ verbose_field_name = opts.get_field(field_name).verbose_name
or field_name
except KeyError:
verbose_field_name = field_name
changed_field_labels.append(str(verbose_field_name))
}}}

Now, my example is:
column content: `[{"changed": {"fields": ["status"]}}]`
str of logentry: `Modification de « t2>t2:90 » — Modification de état.`
--
Ticket URL: <https://code.djangoproject.com/ticket/36884#comment:7>
Reply all
Reply to author
Forward
0 new messages