Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

County ISO and translations for Cork County (Ireland) in invalid #594

Closed
lezwon opened this issue Sep 3, 2019 · 0 comments · Fixed by #596
Closed

County ISO and translations for Cork County (Ireland) in invalid #594

lezwon opened this issue Sep 3, 2019 · 0 comments · Fixed by #596

Comments

@lezwon
Copy link

lezwon commented Sep 3, 2019

The ISO and translation for Cork Country in Ireland seems invalid.
Cork ISO is CO not C.
And the english translation is not Connacht, it's Cork.
Connacht is a province in Ireland, not a county.
Reference: https://www.wikidata.org/wiki/Q162475
Github: IE.yaml
I am trying to populate my DB for Ireland states. Following is my code:

iso = 'IE'
country = ISO3166::Country.new(iso)
states = country.states.select { |_iso, data| data.name.present? }.map do |iso, s| 
   { iso: iso, name: s['translations']['en'] } 
end

Following is the response. My issue is that Connacht should not be present in this list as it is a province instead of a county. Please do correct me if I’m doing something wrong.

[
    [ 0] {
         :iso => "C",
        :name => "Connacht"
    },
    [ 1] {
         :iso => "CE",
        :name => "Clare"
    },
    [ 2] {
         :iso => "CN",
        :name => "Cavan"
    },
    [ 3] {
         :iso => "CW",
        :name => "Carlow"
    },
    [ 4] {
         :iso => "D",
        :name => "Dublin"
    },
    [ 5] {
         :iso => "DL",
        :name => "Donegal"
    },
    [ 6] {
         :iso => "G",
        :name => "Galway"
    },
    [ 7] {
         :iso => "KE",
        :name => "Kildare"
    },
    [ 8] {
         :iso => "KK",
        :name => "Kilkenny"
    },
    [ 9] {
         :iso => "KY",
        :name => "Kerry"
    },
    [10] {
         :iso => "LD",
        :name => "Longford"
    },
    [11] {
         :iso => "LH",
        :name => "Louth"
    },
    [12] {
         :iso => "LK",
        :name => "Limerick"
    },
    [13] {
         :iso => "LM",
        :name => "Leitrim"
    },
    [14] {
         :iso => "LS",
        :name => "Laois"
    },
    [15] {
         :iso => "MH",
        :name => "Meath"
    },
    [16] {
         :iso => "MN",
        :name => "Monaghan"
    },
    [17] {
         :iso => "MO",
        :name => "Mayo"
    },
    [18] {
         :iso => "OY",
        :name => "Offaly"
    },
    [19] {
         :iso => "RN",
        :name => "Roscommon"
    },
    [20] {
         :iso => "SO",
        :name => "Sligo"
    },
    [21] {
         :iso => "TA",
        :name => "Tipperary"
    },
    [22] {
         :iso => "WD",
        :name => "Waterford"
    },
    [23] {
         :iso => "WH",
        :name => "Westmeath"
    },
    [24] {
         :iso => "WW",
        :name => "Wicklow"
    },
    [25] {
         :iso => "WX",
        :name => "Wexford"
    }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant