Opened 18 years ago
Closed 18 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)
by , 18 years ago
| Attachment: | uklocalflavor.diff added |
|---|
comment:1 by , 18 years ago
| Has patch: | set |
|---|
comment:2 by , 18 years ago
| 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
gettextto 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 by , 18 years ago
| Patch needs improvement: | unset |
|---|
comment:4 by , 18 years ago
| 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 by , 18 years ago
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!
comment:6 by , 18 years ago
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 by , 18 years ago
| Owner: | changed from to |
|---|
by , 18 years ago
| Attachment: | ukcountieslocalflavor-5523.diff added |
|---|
adding in the form widgets as suggested.
comment:8 by , 18 years ago
| Keywords: | sprintdec01 added |
|---|
comment:9 by , 18 years ago
| Needs documentation: | unset |
|---|
comment:10 by , 18 years ago
| Patch needs improvement: | unset |
|---|---|
| Triage Stage: | Accepted → Ready for checkin |
comment:11 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Diff to add the localflavor for uk