Opened 17 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)

uklocalflavor.diff (4.2 KB ) - added by David Reynolds 17 years ago.
Diff to add the localflavor for uk
uk-local-flavor-regions.diff (3.8 KB ) - added by David Reynolds 16 years ago.
Putting county back in NI regions
ukcountieslocalflavor-5523.diff (1.3 KB ) - added by David Reynolds 16 years ago.
adding in the form widgets as suggested.

Download all attachments as: .zip

Change History (14)

by David Reynolds, 17 years ago

Attachment: uklocalflavor.diff added

Diff to add the localflavor for uk

comment:1 by David Reynolds, 17 years ago

Has patch: set

comment:2 by Fraser Nevett, 17 years ago

Patch needs improvement: set

A few comments/suggestions:

  1. Probably want each list to be in alphabetical order.
  2. 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
  3. The values for display should be wrapped using gettext to allow for translation (such as into Welsh or Gaelic).
  4. Add a tuple of UK nations for completeness:
    • England
    • Northern Ireland
    • Scotland
    • Wales
  5. 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 David Reynolds, 17 years ago

Patch needs improvement: unset

comment:4 by James Bennett, 16 years ago

Needs documentation: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted

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 Fraser Nevett, 16 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!

by David Reynolds, 16 years ago

Putting county back in NI regions

comment:6 by David Reynolds, 16 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 David Reynolds, 16 years ago

Owner: changed from nobody to David Reynolds

by David Reynolds, 16 years ago

adding in the form widgets as suggested.

comment:8 by David Reynolds, 16 years ago

Keywords: sprintdec01 added

comment:9 by David Reynolds, 16 years ago

Needs documentation: unset

comment:10 by Simon G <dev@…>, 16 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:11 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: newclosed

(In [6855]) Fixed #5523 -- Added counties and regions for the United Kingdom to
localflavors. Thanks, David Reynolds.

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