aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/languages.rb193
-rw-r--r--lib/public_body_categories.rb79
-rw-r--r--lib/public_body_categories_en.rb93
3 files changed, 287 insertions, 78 deletions
diff --git a/lib/languages.rb b/lib/languages.rb
new file mode 100644
index 000000000..43212a777
--- /dev/null
+++ b/lib/languages.rb
@@ -0,0 +1,193 @@
+class LanguageNames
+ def self.get_language_name(locale)
+ language_names = {
+ 'ab' => 'аҧсуа',
+ 'aa' => 'Afaraf',
+ 'af' => 'Afrikaans',
+ 'ak' => 'Akan',
+ 'sq' => 'Shqip',
+ 'am' => 'አማርኛ',
+ 'ar' => 'العربية',
+ 'an' => 'Aragonés',
+ 'hy' => 'Հայերեն',
+ 'as' => 'অসমীয়া',
+ 'av' => 'авар мацӀ',
+ 'ae' => 'avesta',
+ 'ay' => 'aymar aru',
+ 'az' => 'azərbaycan dili',
+ 'bm' => 'bamanankan',
+ 'ba' => 'башҡорт теле',
+ 'eu' => 'euskara',
+ 'be' => 'Беларуская',
+ 'bn' => 'বাংলা',
+ 'bh' => 'भोजपुरी',
+ 'bi' => 'Bislama',
+ 'bs' => 'bosanski jezik',
+ 'br' => 'brezhoneg',
+ 'bg' => 'български език',
+ 'my' => 'ဗမာစာ',
+ 'ca' => 'Català',
+ 'ch' => 'Chamoru',
+ 'ce' => 'нохчийн мотт',
+ 'ny' => 'chiCheŵa',
+ 'zh' => '中文 (Zhōngwén)',
+ 'cv' => 'чӑваш чӗлхи',
+ 'kw' => 'Kernewek',
+ 'co' => 'corsu',
+ 'cr' => 'ᓀᐦᐃᔭᐍᐏᐣ',
+ 'hr' => 'hrvatski',
+ 'cs' => 'česky',
+ 'da' => 'dansk',
+ 'dv' => 'ދިވެހި',
+ 'nl' => 'Nederlands',
+ 'dz' => 'རྫོང་ཁ',
+ 'en' => 'English',
+ 'eo' => 'Esperanto',
+ 'et' => 'eesti',
+ 'ee' => 'Eʋegbe',
+ 'fo' => 'føroyskt',
+ 'fj' => 'vosa Vakaviti',
+ 'fi' => 'suomi',
+ 'fr' => 'français',
+ 'ff' => 'Fulfulde',
+ 'gl' => 'Galego',
+ 'ka' => 'ქართული',
+ 'de' => 'Deutsch',
+ 'el' => 'Ελληνικά',
+ 'gn' => 'Avañe\'ẽ',
+ 'gu' => 'ગુજરાતી',
+ 'ht' => 'Kreyòl ayisyen',
+ 'ha' => 'Hausa',
+ 'he' => 'עברית',
+ 'hz' => 'Otjiherero',
+ 'hi' => 'हिन्दी',
+ 'ho' => 'Hiri Motu',
+ 'hu' => 'Magyar',
+ 'ia' => 'Interlingua',
+ 'id' => 'Bahasa Indonesia',
+ 'ie' => 'Originally called Occidental; then Interlingue after WWII',
+ 'ga' => 'Gaeilge',
+ 'ig' => 'Asụsụ Igbo',
+ 'ik' => 'Iñupiaq',
+ 'io' => 'Ido',
+ 'is' => 'Íslenska',
+ 'it' => 'Italiano',
+ 'iu' => 'ᐃᓄᒃᑎᑐᑦ',
+ 'ja' => '日本語 (にほんご)',
+ 'jv' => 'basa Jawa',
+ 'kl' => 'kalaallisut',
+ 'kn' => 'ಕನ್ನಡ',
+ 'kr' => 'Kanuri',
+ 'ks' => 'कश्मीरी',
+ 'kk' => 'Қазақ тілі',
+ 'km' => 'ភាសាខ្មែរ',
+ 'ki' => 'Gĩkũyũ',
+ 'rw' => 'Ikinyarwanda',
+ 'ky' => 'кыргыз тили',
+ 'kv' => 'коми кыв',
+ 'kg' => 'KiKongo',
+ 'ko' => '한국어 (韓國語)',
+ 'ku' => 'Kurdî',
+ 'kj' => 'Kuanyama',
+ 'la' => 'latine',
+ 'lb' => 'Lëtzebuergesch',
+ 'lg' => 'Luganda',
+ 'li' => 'Limburgs',
+ 'ln' => 'Lingála',
+ 'lo' => 'ພາສາລາວ',
+ 'lt' => 'lietuvių kalba',
+ 'lu' => '',
+ 'lv' => 'latviešu valoda',
+ 'gv' => 'Gaelg',
+ 'mk' => 'македонски јазик',
+ 'mg' => 'Malagasy fiteny',
+ 'ms' => 'bahasa Melayu',
+ 'ml' => 'മലയാളം',
+ 'mt' => 'Malti',
+ 'mi' => 'te reo Māori',
+ 'mr' => 'मराठी',
+ 'mh' => 'Kajin M̧ajeļ',
+ 'mn' => 'монгол',
+ 'na' => 'Ekakairũ Naoero',
+ 'nv' => 'Diné bizaad',
+ 'nb' => 'Norsk bokmål',
+ 'nd' => 'isiNdebele',
+ 'ne' => 'नेपाली',
+ 'ng' => 'Owambo',
+ 'nn' => 'Norsk nynorsk',
+ 'no' => 'Norsk',
+ 'ii' => 'ꆈꌠ꒿ Nuosuhxop',
+ 'nr' => 'isiNdebele',
+ 'oc' => 'Occitan',
+ 'oj' => 'ᐊᓂᔑᓈᐯᒧᐎᓐ',
+ 'cu' => 'ѩзыкъ словѣньскъ',
+ 'om' => 'Afaan Oromoo',
+ 'or' => 'ଓଡ଼ିଆ',
+ 'os' => 'ирон æвзаг',
+ 'pa' => 'ਪੰਜਾਬੀ',
+ 'pi' => 'पाऴि',
+ 'fa' => 'فارسی',
+ 'pl' => 'polski',
+ 'ps' => 'پښتو',
+ 'pt' => 'Português',
+ 'qu' => 'Runa Simi',
+ 'rm' => 'rumantsch grischun',
+ 'rn' => 'Ikirundi',
+ 'ro' => 'română',
+ 'ru' => 'русский язык',
+ 'sa' => 'संस्कृतम्',
+ 'sc' => 'sardu',
+ 'sd' => 'सिन्धी',
+ 'se' => 'Davvisámegiella',
+ 'sm' => 'gagana fa\'a',
+ 'sg' => 'yângâ tî sängö',
+ 'sr' => 'српски језик',
+ 'gd' => 'Gàidhlig',
+ 'sn' => 'chiShona',
+ 'si' => 'සිංහල',
+ 'sk' => 'slovenčina',
+ 'sl' => 'slovenščina',
+ 'so' => 'Soomaaliga',
+ 'st' => 'Sesotho',
+ 'es' => 'español',
+ 'su' => 'Basa Sunda',
+ 'sw' => 'Kiswahili',
+ 'ss' => 'SiSwati',
+ 'sv' => 'svenska',
+ 'ta' => 'தமிழ்',
+ 'te' => 'తెలుగు',
+ 'tg' => 'тоҷикӣ',
+ 'th' => 'ไทย',
+ 'ti' => 'ትግርኛ',
+ 'bo' => 'བོད་ཡིག',
+ 'tk' => 'Türkmen',
+ 'tl' => 'Wikang Tagalog',
+ 'tn' => 'Setswana',
+ 'to' => 'faka Tonga',
+ 'tr' => 'Türkçe',
+ 'ts' => 'Xitsonga',
+ 'tt' => 'татарча',
+ 'tw' => 'Twi',
+ 'ty' => 'Reo Tahiti',
+ 'ug' => 'Uyƣurqə',
+ 'uk' => 'українська',
+ 'ur' => 'اردو',
+ 'uz' => 'O\'zbek',
+ 've' => 'Tshivenḓa',
+ 'vi' => 'Tiếng Việt',
+ 'vo' => 'Volapük',
+ 'wa' => 'Walon',
+ 'cy' => 'Cymraeg',
+ 'wo' => 'Wollof',
+ 'fy' => 'Frysk',
+ 'xh' => 'isiXhosa',
+ 'yi' => 'ייִדיש',
+ 'yo' => 'Yorùbá',
+ 'za' => 'Saɯ cueŋƅ',
+ 'zu' => 'isiZulu'
+ }
+
+ return language_names[locale]
+ end
+end
+
diff --git a/lib/public_body_categories.rb b/lib/public_body_categories.rb
index e30ce8707..844e14e67 100644
--- a/lib/public_body_categories.rb
+++ b/lib/public_body_categories.rb
@@ -8,84 +8,7 @@
module PublicBodyCategories
- CATEGORIES_WITH_HEADINGS = [
- "Miscellaneous",
- [ "other", "Miscellaneous", "miscellaneous" ],
- "Central government",
- [ "department", "Ministerial departments", "a ministerial department" ],
- [ "non_ministerial_department", "Non-ministerial departments", "a non-ministerial department" ],
- [ "executive_agency", "Executive agencies", "an executive agency" ],
- [ "government_office", "Government offices for the regions", "a government office for the regions" ],
- [ "advisory_committee", "Advisory committees", "an advisory committee" ],
- [ "awc", "Agricultural wages committees", "an agriculatural wages committee" ],
- [ "adhac", "Agricultural dwelling house advisory committees", "an agriculatural dwelling house advisory committee" ],
- [ "newdeal", "New Deal for Communities partnership", "a New Deal for Communities partnership" ],
- "Local and regional",
- [ "local_council", "Local councils", "a local council" ],
- [ "parish_council", "Town and Parish councils", "a town or parish council"],
- [ "housing_association", "Housing associations", "a housing association"],
- [ "almo", "Housing ALMOs", "a housing ALMO"],
- [ "municipal_bank", "Municipal bank", "a municipal bank"],
- [ "nsbody", "North/south bodies", "a north/south body"],
- [ "pbo", "Professional buying organisations", "a professional buying organisation"],
- [ "regional_assembly", "Regional assemblies", "a regional assembly"],
- [ "rda", "Regional development agencies", "a regional development agency" ],
- "Education",
- [ "university", "Universities", "a university" ],
- [ "university_college", "University colleges", "a university college" ],
- [ "cambridge_college", "Cambridge colleges", "a Cambridge college" ],
- [ "durham_college", "Durham colleges", "a Durham college" ],
- [ "oxford_college", "Oxford colleges", "an Oxford college or permanent private hall" ],
- [ "york_college", "York colleges", "a college of the University of York" ],
- [ "university_owned_company", "University owned companies", "a university owned company" ],
- [ "hei", "Higher education institutions", "a higher educational institution" ],
- [ "fei", "Further education institutions", "a further educational institution" ],
- [ "school", "Schools", "a school" ],
- [ "research_council", "Research councils", "a research council" ],
- [ "lib_board", "Education and library boards", "an education and library board" ],
- [ "rbc", "Regional Broadband Consortia", "a Regional Broadband Consortium" ],
- "Environment",
- [ "npa", "National park authorities", "a national park authority" ],
- [ "rpa", "Regional park authorities", "a regional park authority" ],
- [ "watercompanies", "Water companies", "a water company" ],
- [ "ifca", "Inshore fisheries and conservation authorities", "an inshore fisheries and conservation authority" ],
- [ "idb", "Internal drainage boards", "an internal drainage board" ],
- [ "wda", "Waste disposal authorities", "a waste disposal authority" ],
- [ "zoo", "Zoos", "a zoo" ],
- "Health",
- [ "nhstrust", "NHS trusts", "an NHS trust" ],
- [ "pct", "Primary care trusts", "a primary care trust" ],
- [ "nhswales", "NHS in Wales", "part of the NHS in Wales" ],
- [ "nhsni", "NHS in Northern Ireland", "part of the NHS in Northern Ireland" ],
- [ "hscr", "Health / social care", "Relating to health / social care" ],
- [ "pha", "Port health authorities", "a port health authority"],
- [ "sha", "Strategic health authorities", "a strategic health authority" ],
- [ "specialha", "Special health authorities", "a special health authority" ],
- "Media and culture",
- [ "media", "Media", "a media organisation" ],
- [ "rcc", "Cultural consortia", "a cultural consortium"],
- [ "museum", "Museums and galleries", "a museum or gallery" ],
- "Military and security services",
- [ "military_college", "Military colleges", "a military college" ],
- [ "security_services", "Security services", "a security services body" ],
- "Emergency services and the courts",
- [ "police", "Police forces", "a police force" ],
- [ "police_authority", "Police authorities", "a police authority" ],
- [ "dpp", "District policing partnerships", "a district policing partnership" ],
- [ "fire_service", "Fire and rescue services", "a fire and rescue service" ],
- [ "probation_trust", "Probation trusts", "a probation trust" ],
- [ "rules_committee", "Rules commitees", "a rules committee" ],
- [ "tribunal", "Tribunals", "a tribunal"],
- "Transport",
- [ "npte", "Passenger transport executives", "a passenger transport executive" ],
- [ "port_authority", "Port authorities", "a port authority" ],
- [ "scp", "Safety Camera Partnerships", "a safety camera partnership" ],
- [ "srp", "Safer Roads Partnership", "a safer roads partnership" ],
- "Defunct",
- [ "prob_board", "Probation boards", "a probation board" ],
- [ "rfdc", "Regional flood defence committees", "a regional flood defence committee" ],
- [ "sea_fishery_committee", "Sea fisheries committees", "a sea fisheries committee" ],
- ]
+ CATEGORIES_WITH_HEADINGS = []
# Arranged in different ways for different sorts of displaying
CATEGORIES_WITH_DESCRIPTION = CATEGORIES_WITH_HEADINGS.select() { |a| a.instance_of?(Array) }
diff --git a/lib/public_body_categories_en.rb b/lib/public_body_categories_en.rb
new file mode 100644
index 000000000..93183d397
--- /dev/null
+++ b/lib/public_body_categories_en.rb
@@ -0,0 +1,93 @@
+# lib/public_body_categories.rb:
+# Categorisations of public bodies.
+#
+# Copyright (c) 2009 UK Citizens Online Democracy. All rights reserved.
+# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
+#
+# $Id: public_body_categories.rb,v 1.1 2009-09-14 14:45:48 francis Exp $
+
+module PublicBodyCategories
+
+ CATEGORIES_WITH_HEADINGS = [
+ "Miscellaneous",
+ [ "other", "Miscellaneous", "miscellaneous" ],
+ _("Central government"),
+ [ "department", "Ministerial departments", "a ministerial department" ],
+ [ "non_ministerial_department", "Non-ministerial departments", "a non-ministerial department" ],
+ [ "executive_agency", "Executive agencies", "an executive agency" ],
+ [ "government_office", "Government offices for the regions", "a government office for the regions" ],
+ [ "advisory_committee", "Advisory committees", "an advisory committee" ],
+ [ "awc", "Agricultural wages committees", "an agriculatural wages committee" ],
+ [ "adhac", "Agricultural dwelling house advisory committees", "an agriculatural dwelling house advisory committee" ],
+ [ "newdeal", "New Deal for Communities partnership", "a New Deal for Communities partnership" ],
+ _("Local and regional"),
+ [ "local_council", "Local councils", "a local council" ],
+ [ "parish_council", "Town and Parish councils", "a town or parish council"],
+ [ "housing_association", "Housing associations", "a housing association"],
+ [ "almo", "Housing ALMOs", "a housing ALMO"],
+ [ "municipal_bank", "Municipal bank", "a municipal bank"],
+ [ "nsbody", "North/south bodies", "a north/south body"],
+ [ "pbo", "Professional buying organisations", "a professional buying organisation"],
+ [ "regional_assembly", "Regional assemblies", "a regional assembly"],
+ [ "rda", "Regional development agencies", "a regional development agency" ],
+ "Education",
+ [ "university", "Universities", "a university" ],
+ [ "university_college", "University colleges", "a university college" ],
+ [ "cambridge_college", "Cambridge colleges", "a Cambridge college" ],
+ [ "durham_college", "Durham colleges", "a Durham college" ],
+ [ "oxford_college", "Oxford colleges", "an Oxford college or permanent private hall" ],
+ [ "york_college", "York colleges", "a college of the University of York" ],
+ [ "university_owned_company", "University owned companies", "a university owned company" ],
+ [ "hei", "Higher education institutions", "a higher educational institution" ],
+ [ "fei", "Further education institutions", "a further educational institution" ],
+ [ "school", "Schools", "a school" ],
+ [ "research_council", "Research councils", "a research council" ],
+ [ "lib_board", "Education and library boards", "an education and library board" ],
+ [ "rbc", "Regional Broadband Consortia", "a Regional Broadband Consortium" ],
+ "Environment",
+ [ "npa", "National park authorities", "a national park authority" ],
+ [ "rpa", "Regional park authorities", "a regional park authority" ],
+ [ "sea_fishery_committee", "Sea fisheries committees", "a sea fisheries committee" ],
+ [ "watercompanies", "Water companies", "a water company" ],
+ [ "idb", "Internal drainage boards", "an internal drainage board" ],
+ [ "rfdc", "Regional flood defence committees", "a regional flood defence committee" ],
+ [ "wda", "Waste disposal authorities", "a waste disposal authority" ],
+ [ "zoo", "Zoos", "a zoo" ],
+ "Health",
+ [ "nhstrust", "NHS trusts", "an NHS trust" ],
+ [ "pct", "Primary care trusts", "a primary care trust" ],
+ [ "nhswales", "NHS in Wales", "part of the NHS in Wales" ],
+ [ "nhsni", "NHS in Northern Ireland", "part of the NHS in Northern Ireland" ],
+ [ "hscr", "Health / social care", "Relating to health / social care" ],
+ [ "pha", "Port health authorities", "a port health authority"],
+ [ "sha", "Strategic health authorities", "a strategic health authority" ],
+ [ "specialha", "Special health authorities", "a special health authority" ],
+ "Media and culture",
+ [ "media", "Media", "a media organisation" ],
+ [ "rcc", "Cultural consortia", "a cultural consortium"],
+ [ "museum", "Museums and galleries", "a museum or gallery" ],
+ "Military and security services",
+ [ "military_college", "Military colleges", "a military college" ],
+ [ "security_services", "Security services", "a security services body" ],
+ "Emergency services and the courts",
+ [ "police", "Police forces", "a police force" ],
+ [ "police_authority", "Police authorities", "a police authority" ],
+ [ "dpp", "District policing partnerships", "a district policing partnership" ],
+ [ "fire_service", "Fire and rescue services", "a fire and rescue service" ],
+ [ "prob_board", "Probation boards", "a probation board" ],
+ [ "rules_committee", "Rules commitees", "a rules committee" ],
+ [ "tribunal", "Tribunals", "a tribunal"],
+ "Transport",
+ [ "npte", "Passenger transport executives", "a passenger transport executive" ],
+ [ "port_authority", "Port authorities", "a port authority" ],
+ [ "scp", "Safety Camera Partnerships", "a safety camera partnership" ],
+ [ "srp", "Safer Roads Partnership", "a safer roads partnership" ]
+ ]
+
+ # Arranged in different ways for different sorts of displaying
+ CATEGORIES_WITH_DESCRIPTION = CATEGORIES_WITH_HEADINGS.select() { |a| a.instance_of?(Array) }
+ CATEGORIES = CATEGORIES_WITH_DESCRIPTION.map() { |a| a[0] }
+ CATEGORIES_BY_TAG = Hash[*CATEGORIES_WITH_DESCRIPTION.map() { |a| a[0..1] }.flatten]
+ CATEGORY_SINGULAR_BY_TAG = Hash[*CATEGORIES_WITH_DESCRIPTION.map() { |a| [a[0],a[2]] }.flatten]
+end
+