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)
Change History (16)
by , 15 years ago
Attachment: | cn-localflavor-against-r11809.diff added |
---|
comment:1 by , 15 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:2 by , 15 years ago
Triage Stage: | Design decision needed → Accepted |
---|
comment:3 by , 15 years ago
The directory should be localflavor/zh_CN instead of localflavor/cn, right?
comment:4 by , 15 years ago
No, "cn" is correct because the localflavor contrib app organizes its content per country, not locale.
comment:5 by , 15 years ago
milestone: | 1.2 |
---|---|
Version: | SVN |
comment:6 by , 14 years ago
I can verify that this looks like a sane patch. Couple of comments here:
- The select value shouldn't has space in it.
- 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).
comment:7 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:8 by , 14 years ago
Patch needs improvement: | set |
---|
Great work, thank you. Before we check this in, could you rewrite the tests using unittest?
comment:9 by , 14 years ago
Patch needs improvement: | unset |
---|
The tests have been rewritten (with unittest) and run.
comment:10 by , 14 years ago
Triage Stage: | Accepted → Ready 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 , 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.
Chinese localflavor patch against current trunk, and it would work for version 1.1.1