Code

Opened 5 years ago

Closed 4 years ago

Last modified 3 years ago

#11972 closed (fixed)

Title filter should not capitalize ordinals

Reported by: schwank@… Owned by: kmtracey
Component: Template system Version: 1.1
Severity: Keywords: title filter
Cc: gonz 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@… 5 years ago.
ticket_11972.diff (2.9 KB) - added by rpbarlow 4 years ago.
Patch with unit test.

Download all attachments as: .zip

Change History (11)

Changed 5 years ago by schwank@…

comment:1 Changed 5 years ago by gonz

  • Cc gonz added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 4 years ago by rpbarlow

  • Owner changed from nobody to rpbarlow
  • Status changed from new to assigned

comment:3 Changed 4 years ago by rpbarlow

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

comment:4 Changed 4 years ago by rpbarlow

  • Needs tests set
  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to Accepted

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 4 years ago by rpbarlow

  • 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 4 years ago by rpbarlow

Patch with unit test.

comment:6 Changed 4 years ago by rpbarlow

  • Owner changed from rpbarlow to kmtracey
  • Status changed from assigned to new
  • Triage Stage changed from Accepted to Ready for checkin

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

comment:7 Changed 4 years ago by kmtracey

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:8 Changed 4 years ago by kmtracey

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

comment:9 Changed 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.