Django

Code

root/django/trunk/django/contrib/localflavor/uk/uk_regions.py

Revision 7689, 3.4 kB (checked in by russellm, 2 months ago)

Fixed #7554 -- Modified contrib.localflavor to make use of ugettext, rather than ugettext. Thanks to msaelices for the report and patch.

  • Property svn:eol-style set to native
Line 
1 """
2 Sources:
3     English regions: http://www.statistics.gov.uk/geography/downloads/31_10_01_REGION_names_and_codes_12_00.xls
4     Northern Ireland regions: http://en.wikipedia.org/wiki/List_of_Irish_counties_by_area
5     Welsh regions: http://en.wikipedia.org/wiki/Preserved_counties_of_Wales
6     Scottish regions: http://en.wikipedia.org/wiki/Regions_and_districts_of_Scotland
7 """
8 from django.utils.translation import ugettext_lazy as _
9
10 ENGLAND_REGION_CHOICES = (
11     ("Bedfordshire", _("Bedfordshire")),
12     ("Buckinghamshire", _("Buckinghamshire")),
13     ("Cambridgeshire", ("Cambridgeshire")),
14     ("Cheshire", _("Cheshire")),
15     ("Cornwall and Isles of Scilly", _("Cornwall and Isles of Scilly")),
16     ("Cumbria", _("Cumbria")),
17     ("Derbyshire", _("Derbyshire")),
18     ("Devon", _("Devon")),
19     ("Dorset", _("Dorset")),
20     ("Durham", _("Durham")),
21     ("East Sussex", _("East Sussex")),
22     ("Essex", _("Essex")),
23     ("Gloucestershire", _("Gloucestershire")),
24     ("Greater London", _("Greater London")),
25     ("Greater Manchester", _("Greater Manchester")),
26     ("Hampshire", _("Hampshire")),
27     ("Hertfordshire", _("Hertfordshire")),
28     ("Kent", _("Kent")),
29     ("Lancashire", _("Lancashire")),
30     ("Leicestershire", _("Leicestershire")),
31     ("Lincolnshire", _("Lincolnshire")),
32     ("Merseyside", _("Merseyside")),
33     ("Norfolk", _("Norfolk")),
34     ("North Yorkshire", _("North Yorkshire")),
35     ("Northamptonshire", _("Northamptonshire")),
36     ("Northumberland", _("Northumberland")),
37     ("Nottinghamshire", _("Nottinghamshire")),
38     ("Oxfordshire", _("Oxfordshire")),
39     ("Shropshire", _("Shropshire")),
40     ("Somerset", _("Somerset")),
41     ("South Yorkshire", _("South Yorkshire")),
42     ("Staffordshire", _("Staffordshire")),
43     ("Suffolk", _("Suffolk")),
44     ("Surrey", _("Surrey")),
45     ("Tyne and Wear", _("Tyne and Wear")),
46     ("Warwickshire", _("Warwickshire")),
47     ("West Midlands", _("West Midlands")),
48     ("West Sussex", _("West Sussex")),
49     ("West Yorkshire", _("West Yorkshire")),
50     ("Wiltshire", _("Wiltshire")),
51     ("Worcestershire", _("Worcestershire")),
52 )
53
54 NORTHERN_IRELAND_REGION_CHOICES = (
55     ("County Antrim", _("County Antrim")),
56     ("County Armagh", _("County Armagh")),
57     ("County Down", _("County Down")),
58     ("County Fermanagh", _("County Fermanagh")),
59     ("County Londonderry", _("County Londonderry")),
60     ("County Tyrone", _("County Tyrone")),
61 )
62
63 WALES_REGION_CHOICES = (
64     ("Clwyd", _("Clwyd")),
65     ("Dyfed", _("Dyfed")),
66     ("Gwent", _("Gwent")),
67     ("Gwynedd", _("Gwynedd")),
68     ("Mid Glamorgan", _("Mid Glamorgan")),
69     ("Powys", _("Powys")),
70     ("South Glamorgan", _("South Glamorgan")),
71     ("West Glamorgan", _("West Glamorgan")),
72 )
73
74 SCOTTISH_REGION_CHOICES = (
75     ("Borders", _("Borders")),
76     ("Central Scotland", _("Central Scotland")),
77     ("Dumfries and Galloway", _("Dumfries and Galloway")),
78     ("Fife", _("Fife")),
79     ("Grampian", _("Grampian")),
80     ("Highland", _("Highland")),
81     ("Lothian", _("Lothian")),
82     ("Orkney Islands", _("Orkney Islands")),
83     ("Shetland Islands", _("Shetland Islands")),
84     ("Strathclyde", _("Strathclyde")),
85     ("Tayside", _("Tayside")),
86     ("Western Isles", _("Western Isles")),
87 )
88
89 UK_NATIONS_CHOICES = (
90     ("England", _("England")),
91     ("Northern Ireland", _("Northern Ireland")),
92     ("Scotland", _("Scotland")),
93     ("Wales", _("Wales")),
94 )
95
96 UK_REGION_CHOICES = ENGLAND_REGION_CHOICES + NORTHERN_IRELAND_REGION_CHOICES + WALES_REGION_CHOICES + SCOTTISH_REGION_CHOICES
Note: See TracBrowser for help on using the browser.