Opened 4 years ago

Closed 4 years ago

#22886 closed Bug (worksforme)

Message wording when unique_together rises

Reported by: Vlada Macek Owned by: nobody
Component: Internationalization Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: yes


This one is IMHO not bound exactly to i18n as I think the msgid itself could be improved too.


# unique_together
    field_labels = [capfirst(opts.get_field(f).verbose_name) for f in unique_check]
    params['field_labels'] = six.text_type(get_text_list(field_labels, _('and')))
    return ValidationError(
        message=_("%(model_name)s with this %(field_labels)s already exists."),

For single field_label (one unique field constraint) there is a different msgid.

This one is used for the unique_together constraint so I'd expect 'these ... exist' or my favorite 'this combination of fields ... exists' would be better.

Change History (2)

comment:1 Changed 4 years ago by Tim Graham

I think the current version makes sense, e.g. "Book with this Title and Author already exists.".

As for your alternative suggestions:

"Book with these Title and Author exist." isn't correct.

"Book with this combination of Title and Author exists." seems okay, but I'm not sure it's much of an upgrade over the existing text.

comment:2 Changed 4 years ago by Tim Graham

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top