Opened 7 years ago

Closed 7 years ago

#27952 closed Cleanup/optimization (fixed)

core.validators.validate_slug doesn't mention that only latin letters are accepted.

Reported by: Serhiy Owned by: Paul Sajna
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: yes

Description (last modified by Tim Graham)

Just adding "latin" to

"Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens."

from https://github.com/django/django/blob/66bbde6819586cc3a75630e12e569dc8ae72f211/django/core/validators.py#L237

will fix this.

Change History (11)

comment:1 by Tim Graham, 7 years ago

Description: modified (diff)

I'm not sure about the suggested wording. At least for English speakers, I think "letters" is less confusing than "latin letters".

comment:2 by Serhiy, 7 years ago

It could be fixed in translations only, yes. Maybe a note to translators?
In current state translators and users have no hint that it's only Latin letters. Cyrillic and other completely different alphabets aside, I guess this regex doesn't even include German umlauts, isn't it?

comment:3 by Paul Sajna, 7 years ago

What about ASCII letters?

comment:4 by Paul Sajna, 7 years ago

Owner: changed from nobody to Paul Sajna
Status: newassigned

comment:5 by Paul Sajna, 7 years ago

Has patch: set
Last edited 7 years ago by Tim Graham (previous) (diff)

comment:7 by Tim Graham, 7 years ago

I doubt many non-technical users know what ASCII is.

comment:8 by Tim Graham, 7 years ago

Has patch: unset
Triage Stage: UnreviewedAccepted

A hint to translators may be best, but I'm not sure how that works. Someone could start a thread on the DevelopersMailingList to propose another solution.

comment:11 by Serhiy, 7 years ago

Hinting translators with
https://docs.djangoproject.com/en/1.10/topics/i18n/translation/#comments-for-translators looks best to me too. Paul, would you like to do it?

comment:14 by Paul Sajna, 7 years ago

Owner: set to Paul Sajna

comment:15 by Paul Sajna, 7 years ago

Has patch: set

comment:16 by Tim Graham <timograham@…>, 7 years ago

Resolution: fixed
Status: assignedclosed

In 001cf53:

Fixed #27952 -- Added translation hint for RegexValidator error message.

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