This 'might be ok' only if the field names are equal to label text and in
English
If the active language is not English, change message looks wired like
this:
عدل name (i.e. changed name)
You can see the cause of the issue here
https://github.com/django/django/blob/master/django/contrib/admin/options.py#L925-L926
And again with formsets 936
https://github.com/django/django/blob/master/django/contrib/admin/options.py#L936
Not sure how to write a test for this .
My Proposed Fix:
Instead of sending form.changed_data to get_text_list, send their labels
{{{
translated_changed_fields = [form.fields[f].label for f in
form.changed_data]
change_message.append(_('Changed %s.') %
get_text_list(translated_changed_fields, _('and')))
}}}
And again with formset
{{{
translated_changed_fields = [formset.fields[f].label for f in
changed_fields]
#...
% {'list': get_text_list(translated_changed_fields, _('and')),
}}}
Regards;
--
Ticket URL: <https://code.djangoproject.com/ticket/24990>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_docs: => 0
* resolution: => duplicate
* needs_tests: => 0
* needs_better_patch: => 0
Comment:
Duplicate of #12952
--
Ticket URL: <https://code.djangoproject.com/ticket/24990#comment:1>