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)

uklocalflavor.diff (4.2 KB) - added by David Reynolds 16 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)

Changed 16 years ago by David Reynolds

Attachment: uklocalflavor.diff added

Diff to add the localflavor for uk

comment:1 Changed 16 years ago by David Reynolds

Has patch: set

comment:2 Changed 16 years ago by Fraser Nevett

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 Changed 16 years ago by David Reynolds

Patch needs improvement: unset

comment:4 Changed 16 years ago by James Bennett

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 Changed 16 years ago by Fraser Nevett

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 David Reynolds

Putting county back in NI regions

comment:6 Changed 16 years ago by David Reynolds

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 David Reynolds

Owner: changed from nobody to David Reynolds

Changed 16 years ago by David Reynolds

adding in the form widgets as suggested.

comment:8 Changed 16 years ago by David Reynolds

Keywords: sprintdec01 added

comment:9 Changed 16 years ago by David Reynolds

Needs documentation: unset

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

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:11 Changed 16 years ago by Malcolm Tredinnick

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