Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#12613 closed (fixed)

phone2numeric doesn't convert the letters 'Q' or 'Z'.

Reported by: Gabriel Hurley Owned by: Gabriel Hurley
Component: Template system Version: 1.1
Severity: Keywords: phone2numeric
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Discussion on the django developers group here: http://groups.google.com/group/django-developers/browse_frm/thread/49ee1863efa59901

There doesn't seem to be any good reason for the phone2numeric function not to convert the letters Q or Z, so I've created a small patch that remedies that.

Also, for readability's sake the patch puts the dictionary of letter-to-number conversions in alphabetical order.

Attachments (2)

phone2numeric_complete.diff (1.1 KB) - added by Gabriel Hurley 7 years ago.
Adds support for Q and Z in the phone2numeric function.
phone2numeric_complete_test.diff (1022 bytes) - added by Gabriel Hurley 7 years ago.
Adds test for phone2numeric that uses a full English pangram plus hyphen and exclamation point.

Download all attachments as: .zip

Change History (8)

Changed 7 years ago by Gabriel Hurley

Attachment: phone2numeric_complete.diff added

Adds support for Q and Z in the phone2numeric function.

comment:1 Changed 7 years ago by Gabriel Hurley

Owner: changed from nobody to Gabriel Hurley
Status: newassigned

comment:2 Changed 7 years ago by Eric Holscher

Needs tests: set
Triage Stage: UnreviewedAccepted

Could use a test that breaks currently and passes with the patch.

Changed 7 years ago by Gabriel Hurley

Adds test for phone2numeric that uses a full English pangram plus hyphen and exclamation point.

comment:3 Changed 7 years ago by Gabriel Hurley

Needs tests: unset

comment:4 Changed 7 years ago by Russell Keith-Magee

Resolution: fixed
Status: assignedclosed

(In [12427]) [1.1.X] Fixed #12613 -- Added Q and Z to the list of characters supported by the phone2numeric filter. Thanks to gabrielhurley for the report and patch.

Backport of r12425 from trunk.

comment:5 Changed 7 years ago by Russell Keith-Magee

(In [12425]) Fixed #12613 -- Added Q and Z to the list of characters supported by the phone2numeric filter. Thanks to gabrielhurley for the report and patch.

comment:6 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

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