Opened 7 years ago

Closed 7 years ago

Last modified 5 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: UI/UX:

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@… 7 years ago.
ticket_11972.diff (2.9 KB) - added by Randy Barlow 7 years ago.
Patch with unit test.

Download all attachments as: .zip

Change History (11)

Changed 7 years ago by schwank@…

comment:1 Changed 7 years ago by Gonzalo Saavedra

Cc: Gonzalo Saavedra added

comment:2 Changed 7 years ago by Randy Barlow

Owner: changed from nobody to Randy Barlow
Status: newassigned

comment:3 Changed 7 years ago by Randy Barlow

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

comment:4 Changed 7 years ago by Randy Barlow

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 Changed 7 years ago by Randy Barlow

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!

Changed 7 years ago by Randy Barlow

Attachment: ticket_11972.diff added

Patch with unit test.

comment:6 Changed 7 years ago by Randy Barlow

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 Changed 7 years ago by Karen Tracey

Resolution: fixed
Status: newclosed

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

comment:8 Changed 7 years ago by Karen Tracey

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

comment:9 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

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