#14311: Improve django.template.defaultfilters.title
---------------------------+------------------------------------------------
 Reporter:  mlissner       |       Owner:  nobody    
   Status:  new            |   Milestone:            
Component:  Uncategorized  |     Version:  1.2       
 Keywords:                 |       Stage:  Unreviewed
Has_patch:  0              |  
---------------------------+------------------------------------------------
 The title case function is a bit naively implemented, and could be vastly
 improved by pulling in some functionality from other titlecase tools.

 Some things (I think) it doesn't cover:
  - small words shouldn't be capitalized (a, an, the, and, etc.), except
 when they are the first word in the string ("A Walk in the Park")
  - words like "Q&A" and "AT&T" should work
  - apostrophes: "AT&T's Network", "O'Donnell", "Don't"
  - hyphenated words: "Dangerously-Endowed"
  - Mc: "McDonald's"

 It would also be great if it had a variable that could contain words that
 should be uppercase, such as:
 TITLE_BIG_WORDS = ("FBI", "CIA", "SEC", "EFF",)

 There are some good reference implementations of this, but probably the
 best is this one: https://bugs.launchpad.net/titlecase.py

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to