Opened 16 years ago
Closed 16 years ago
#5523 closed (fixed)
Adding uk counties list to localflavor for uk
Reported by: | David Reynolds | Owned by: | David Reynolds |
---|---|---|---|
Component: | contrib.localflavor | Version: | dev |
Severity: | Keywords: | localization, sprintdec01 | |
Cc: | david@… | 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
Like the us_states list, but for the UK.
I'd like to point out that I got the lists of counties from various web based resources (listed in the file itself), so I can't vouch 100% for their accuracy.
Attachments (3)
Change History (14)
Changed 16 years ago by
Attachment: | uklocalflavor.diff added |
---|
comment:1 Changed 16 years ago by
Has patch: | set |
---|
comment:2 Changed 16 years ago by
Patch needs improvement: | set |
---|
A few comments/suggestions:
- Probably want each list to be in alphabetical order.
- I don't think the list of Scottish counties is correct; I think the regions listed on Wikipedia may be a better list (see below). Also, as these aren't technically counties, maybe we should use the term regions throughout for accuracy and consistency.
- Borders
- Central Scotland
- Dumfries and Galloway
- Fife
- Grampian
- Highland
- Lothian
- Orkney Islands
- Shetland Islands
- Strathclyde
- Tayside
- Western Isles
- The values for display should be wrapped using
gettext
to allow for translation (such as into Welsh or Gaelic). - Add a tuple of UK nations for completeness:
- England
- Northern Ireland
- Scotland
- Wales
- When #4412 (add support for
<optgroup>
) is completed, it would be good to have all the lists in a hierarchy, keyed by nation.
comment:3 Changed 16 years ago by
Patch needs improvement: | unset |
---|
comment:4 Changed 16 years ago by
Needs documentation: | set |
---|---|
Patch needs improvement: | set |
Triage Stage: | Unreviewed → Accepted |
For true parity with some of the other localflavor contributions, this should include Field
subclasses for the various options (e.g., django.contrib.localflavor.us.forms
provides a USStateField
which populates from the list of US states).
comment:5 Changed 16 years ago by
David, it looks like you've done a mass find and replace of "county" -> "REGION". This has had the unintended side effect of renaming the Northern Ireland counties, which should be called "County ...".
Other than that it looks good!
Changed 16 years ago by
Attachment: | uk-local-flavor-regions.diff added |
---|
Putting county back in NI regions
comment:6 Changed 16 years ago by
Ugh, well spotted frasern!
I've now fixed that.
Is a field actually required, since you can just use the choices from the file in the patch in a formfield.
comment:7 Changed 16 years ago by
Owner: | changed from nobody to David Reynolds |
---|
Changed 16 years ago by
Attachment: | ukcountieslocalflavor-5523.diff added |
---|
adding in the form widgets as suggested.
comment:8 Changed 16 years ago by
Keywords: | sprintdec01 added |
---|
comment:9 Changed 16 years ago by
Needs documentation: | unset |
---|
comment:10 Changed 16 years ago by
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
comment:11 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Diff to add the localflavor for uk