Code

Opened 7 years ago

Closed 7 years ago

#5523 closed (fixed)

Adding uk counties list to localflavor for uk

Reported by: DavidReynolds Owned by: DavidReynolds
Component: contrib.localflavor Version: master
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: UI/UX:

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 DavidReynolds 7 years ago.
Diff to add the localflavor for uk
uk-local-flavor-regions.diff (3.8 KB) - added by DavidReynolds 7 years ago.
Putting county back in NI regions
ukcountieslocalflavor-5523.diff (1.3 KB) - added by DavidReynolds 7 years ago.
adding in the form widgets as suggested.

Download all attachments as: .zip

Change History (14)

Changed 7 years ago by DavidReynolds

Diff to add the localflavor for uk

comment:1 Changed 7 years ago by DavidReynolds

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 7 years ago by frasern

  • 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 7 years ago by DavidReynolds

  • Patch needs improvement unset

comment:4 Changed 7 years ago by ubernostrum

  • Needs documentation set
  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to 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 7 years ago by frasern

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 7 years ago by DavidReynolds

Putting county back in NI regions

comment:6 Changed 7 years ago by DavidReynolds

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 7 years ago by DavidReynolds

  • Owner changed from nobody to DavidReynolds

Changed 7 years ago by DavidReynolds

adding in the form widgets as suggested.

comment:8 Changed 7 years ago by DavidReynolds

  • Keywords localization, sprintdec01 added; localization removed

comment:9 Changed 7 years ago by DavidReynolds

  • Needs documentation unset

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

  • Patch needs improvement unset
  • Triage Stage changed from Accepted to Ready for checkin

comment:11 Changed 7 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.