Opened 15 years ago

Closed 14 years ago

#12379 closed New feature (fixed)

Simplified Chinese(CN) localflavor package

Reported by: Xia Kai(夏恺) Owned by: nobody
Component: contrib.localflavor Version:
Severity: Normal Keywords: CN localflavor
Cc: xiaket@… 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 attached patch contains:

  • CNProvinceSelect - Select widget for Chinese provinces
  • CNPostCodeField - Form field for Chinese post codes
  • CNIDCardField - Form field for Chinese ID Card numbers
  • CNPhoneNumberField - Form field for Chinese regular phone numbers
  • CNCellNumberField - Form field for Chinese cell phone numbers

Documentation and tests are included!

Attachments (4)

cn-localflavor-against-r11809.diff (19.1 KB ) - added by Xia Kai(夏恺) 15 years ago.
Chinese localflavor patch against current trunk, and it would work for version 1.1.1
cn_localflavor_r13230.diff (18.9 KB ) - added by Daniel Duan <DaNmarner@…> 15 years ago.
slightly modified.
cn_localflavor_1.3.diff (19.8 KB ) - added by Daniel Duan 14 years ago.
Tests rewritten with unittest
cn_localflavor_r15942.diff (18.4 KB ) - added by Łukasz Rekucki 14 years ago.
Last patch with cosmetic changes.

Download all attachments as: .zip

Change History (16)

by Xia Kai(夏恺), 15 years ago

Chinese localflavor patch against current trunk, and it would work for version 1.1.1

comment:1 by Cliff Dyer, 15 years ago

Triage Stage: UnreviewedDesign decision needed

comment:2 by Jannis Leidel, 15 years ago

Triage Stage: Design decision neededAccepted

comment:3 by xxxss@…, 15 years ago

The directory should be localflavor/zh_CN instead of localflavor/cn, right?

comment:4 by Jannis Leidel, 15 years ago

No, "cn" is correct because the localflavor contrib app organizes its content per country, not locale.

comment:5 by Russell Keith-Magee, 15 years ago

milestone: 1.2
Version: SVN

comment:6 by Daniel Duan <DaNmarner@…>, 15 years ago

I can verify that this looks like a sane patch. Couple of comments here:

  1. The select value shouldn't has space in it.
  2. IMO, the location code is too specific to be located in a standalone file(it is the ID Card checking algorithm detail, not in anyway reusable).

by Daniel Duan <DaNmarner@…>, 15 years ago

Attachment: cn_localflavor_r13230.diff added

slightly modified.

comment:7 by Matt McClanahan, 14 years ago

Severity: Normal
Type: New feature

comment:8 by Julien Phalip, 14 years ago

Patch needs improvement: set

Great work, thank you. Before we check this in, could you rewrite the tests using unittest?

by Daniel Duan, 14 years ago

Attachment: cn_localflavor_1.3.diff added

Tests rewritten with unittest

comment:9 by Daniel Duan, 14 years ago

Patch needs improvement: unset

The tests have been rewritten (with unittest) and run.

by Łukasz Rekucki, 14 years ago

Attachment: cn_localflavor_r15942.diff added

Last patch with cosmetic changes.

comment:10 by Łukasz Rekucki, 14 years ago

Triage Stage: AcceptedReady for checkin

Your last patch deletes ".../apps/test/static/test/backup~" (I presume it got there by accident), so I fixed that and some trailing whitespace.

comment:11 by Daniel Duan, 14 years ago

Thanks lrekucki, it must be my script for auto-cleaning ~ and pyc files. cn_localflavor_r15942.diff is the patch to apply.

comment:12 by Jannis Leidel, 14 years ago

Resolution: fixed
Status: newclosed

In [16070]:

Fixed #12379 -- Added Chinese (cn) localflavor package. Thanks, Xia Kai, Daniel Duan, DaNmarner and Łukasz Rekucki.

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