#4365 closed (fixed)
[unicode] slug generation can be enhanced
Reported by: | Malcolm Tredinnick | Owned by: | Malcolm Tredinnick |
---|---|---|---|
Component: | Internationalization | Version: | unicode |
Severity: | Keywords: | slug unicode i18n | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
It is worthwhile enhancing both the slugify filter and admin/media/js/admin/urlify.js to handle some foreign letters a bit better. We aren't looking to create a transliteration function, but some lightweight improvements are certainly possible.
A start was made by Bill de hÓra in this thread (django-developers) and there is also some good data in #2716.
Attachments (4)
Change History (12)
comment:1 by , 18 years ago
Triage Stage: | Unreviewed → Accepted |
---|
by , 18 years ago
Attachment: | greek.2.js added |
---|
comment:2 by , 18 years ago
Attached the GREEK_MAP, as requested from Bill de hÓra. Sorry for the double attachment, Trac barfed. They are the same. Note that it is encoded in UTF-8, you have to download the original and open it with an UTF-8 aware editor to see the greek characters.
comment:3 by , 18 years ago
Has patch: | set |
---|---|
Keywords: | slug unicode i18n added |
I found a solution for characters with accents, and anothers used on Europe.
Got from http://www.djangosnippets.org/snippets/98/ (_string_to_slug method) that points to http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/251871 (Aaron Bentley)
E.g: It translates: Á È ï ô ü ñ to: A E i o u n
so it's very usefull for a lot of languages.
A patch is added.
comment:4 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [5608]) unicode: Added unicode-aware slugify filter (in Python) and better non-ASCII
handling for the Javascript slug creator in admin. Can never be perfect here,
but this is more tolerant in many cases. Fixed #4365. Thanks, Bill de h?\195?\147ra,
Baptiste, orestis@…, Ahmet and Jonas for contributions to this.
comment:5 by , 17 years ago
Has patch: | unset |
---|---|
Needs tests: | set |
Resolution: | fixed |
Status: | closed → reopened |
Version: | other branch → unicode |
Slug don't work with Opera-9.20 browser.
comment:7 by , 17 years ago
Needs tests: | unset |
---|---|
Resolution: | → fixed |
Status: | reopened → closed |
Added to LittleEasyImprovements