Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#11972 closed (fixed)

Title filter should not capitalize ordinals

Reported by: schwank@… Owned by: Karen Tracey
Component: Template system Version: 1.1
Severity: Keywords: title filter
Cc: Gonzalo Saavedra Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The main problem I have with the title filter is that if you have, say, an address "555 WEST 53RD STREET", and you want to run it through a title filter, you get "555 West 53Rd Street". The letters coming after the digits should not be capitalized.

Just like the title filter special cases for apostrophes (making sure JOE'S CRAB SHACK doesn't turn into Joe'S Crab Shack), it should also lower letters coming directly after numbers.

Attachments (2)

title_filter_ordinal_patch.diff (536 bytes ) - added by schwank@… 15 years ago.
ticket_11972.diff (2.9 KB ) - added by Randy Barlow 15 years ago.
Patch with unit test.

Download all attachments as: .zip

Change History (11)

by schwank@…, 15 years ago

comment:1 by Gonzalo Saavedra, 15 years ago

Cc: Gonzalo Saavedra added

comment:2 by Randy Barlow, 15 years ago

Owner: changed from nobody to Randy Barlow
Status: newassigned

comment:3 by Randy Barlow, 15 years ago

This patch needs a unit test too. Working on it!

comment:4 by Randy Barlow, 15 years ago

Needs tests: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted

I've confirmed the problem, and have written a unit test. I'll submit a new patch that will include the test as well.

comment:5 by Randy Barlow, 15 years ago

Needs tests: unset
Patch needs improvement: unset

w00t. Here is a patch with a test.

schwank@…: Thanks for the patch! One thing to note, if you svn diff from the trunk directory, then the patch will contain the full path to the file(s) it patches, which makes it a little simpler to apply. Looks good!

by Randy Barlow, 15 years ago

Attachment: ticket_11972.diff added

Patch with unit test.

comment:6 by Randy Barlow, 15 years ago

Owner: changed from Randy Barlow to Karen Tracey
Status: assignednew
Triage Stage: AcceptedReady for checkin

Hey Karen, here's my first ever Django submission!

comment:7 by Karen Tracey, 15 years ago

Resolution: fixed
Status: newclosed

(In [11822]) Fixed #11972: Corrected title filter handling of numbers followed by letters. Thanks schwank@… and Randy Barlow.

comment:8 by Karen Tracey, 15 years ago

(In [11823]) [1.1.X] Fixed #11972: Corrected title filter handling of numbers followed by letters. Thanks schwank@… and Randy Barlow.

comment:9 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

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