Django

Code

Ticket #5523 (closed: fixed)

Opened 1 year ago

Last modified 10 months ago

Adding uk counties list to localflavor for uk

Reported by: DavidReynolds Assigned to: DavidReynolds
Milestone: Component: django.contrib.localflavor
Version: SVN Keywords: localization, sprintdec01
Cc: david@reynoldsfamily.org.uk Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

uklocalflavor.diff (4.2 kB) - added by DavidReynolds on 09/17/07 08:00:45.
Diff to add the localflavor for uk
uk-local-flavor-regions.diff (3.8 kB) - added by DavidReynolds on 09/25/07 06:20:23.
Putting county back in NI regions
ukcountieslocalflavor-5523.diff (1.3 kB) - added by DavidReynolds on 12/01/07 11:00:50.
adding in the form widgets as suggested.

Change History

09/17/07 08:00:45 changed by DavidReynolds

  • attachment uklocalflavor.diff added.

Diff to add the localflavor for uk

09/17/07 08:01:04 changed by DavidReynolds

  • needs_better_patch changed.
  • has_patch set to 1.
  • needs_tests changed.
  • needs_docs changed.

09/17/07 12:43:31 changed by frasern

  • needs_better_patch set to 1.

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.

09/21/07 07:53:21 changed by DavidReynolds

  • needs_better_patch deleted.

09/23/07 04:00:02 changed by ubernostrum

  • needs_better_patch set to 1.
  • stage changed from Unreviewed to Accepted.
  • needs_docs set to 1.

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).

09/25/07 05:47:00 changed 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!

09/25/07 06:20:23 changed by DavidReynolds

  • attachment uk-local-flavor-regions.diff added.

Putting county back in NI regions

09/25/07 06:43:04 changed 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.

10/19/07 11:24:33 changed by DavidReynolds

  • owner changed from nobody to DavidReynolds.

12/01/07 11:00:50 changed by DavidReynolds

  • attachment ukcountieslocalflavor-5523.diff added.

adding in the form widgets as suggested.

12/01/07 11:05:10 changed by DavidReynolds

  • keywords changed from localization to localization, sprintdec01.

12/01/07 11:20:00 changed by DavidReynolds

  • needs_docs deleted.

12/01/07 20:38:26 changed by Simon G <dev@simon.net.nz>

  • needs_better_patch deleted.
  • stage changed from Accepted to Ready for checkin.

12/02/07 18:35:31 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #5523 (Adding uk counties list to localflavor for uk)




Change Properties
Action