Opened 14 years ago
Closed 12 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)
Changed 14 years ago by
Attachment: | cn-localflavor-against-r11809.diff added |
---|
comment:1 Changed 14 years ago by
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:2 Changed 14 years ago by
Triage Stage: | Design decision needed → Accepted |
---|
comment:3 Changed 14 years ago by
The directory should be localflavor/zh_CN instead of localflavor/cn, right?
comment:4 Changed 14 years ago by
No, "cn" is correct because the localflavor contrib app organizes its content per country, not locale.
comment:5 Changed 14 years ago by
milestone: | 1.2 |
---|---|
Version: | SVN |
comment:6 Changed 13 years ago by
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 Changed 13 years ago by
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:8 Changed 12 years ago by
Patch needs improvement: | set |
---|
Great work, thank you. Before we check this in, could you rewrite the tests using unittest?
comment:9 Changed 12 years ago by
Patch needs improvement: | unset |
---|
The tests have been rewritten (with unittest) and run.
Changed 12 years ago by
Attachment: | cn_localflavor_r15942.diff added |
---|
Last patch with cosmetic changes.
comment:10 Changed 12 years ago by
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 Changed 12 years ago by
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