[Django] #22886: Message wording when unique_together rises

2 views
Skip to first unread message

Django

unread,
Jun 23, 2014, 6:52:59 AM6/23/14
to django-...@googlegroups.com
#22886: Message wording when unique_together rises
--------------------------------------+--------------------
Reporter: Tuttle | Owner: nobody
Type: Bug | Status: new
Component: Internationalization | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 1
--------------------------------------+--------------------
This one is IMHO not bound exactly to i18n as I think the msgid itself
could be improved too.

db/models/base.py:991:

{{{#!python
# unique_together
else:
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."),
code='unique_together',
params=params,
)
}}}

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/22886>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 23, 2014, 10:30:33 AM6/23/14
to django-...@googlegroups.com
#22886: Message wording when unique_together rises
-------------------------------------+-------------------------------------

Reporter: Tuttle | Owner: nobody
Type: Bug | Status: new
Component: | Version: master
Internationalization | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by timo):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/22886#comment:1>

Django

unread,
Jun 28, 2014, 10:11:36 AM6/28/14
to django-...@googlegroups.com
#22886: Message wording when unique_together rises
-------------------------------------+-------------------------------------
Reporter: Tuttle | Owner: nobody
Type: Bug | Status: closed

Component: | Version: master
Internationalization | Resolution:
Severity: Normal | worksforme
Keywords: | Triage Stage:
Has patch: 0 | Unreviewed
Needs tests: 0 | Needs documentation: 0
Easy pickings: 1 | Patch needs improvement: 0

| UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by timo):

* status: new => closed
* resolution: => worksforme


--
Ticket URL: <https://code.djangoproject.com/ticket/22886#comment:2>

Reply all
Reply to author
Forward
0 new messages