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

China provinces are not in the ISO 3166 standard #44

Open
mociepka opened this issue May 7, 2020 · 0 comments
Open

China provinces are not in the ISO 3166 standard #44

mociepka opened this issue May 7, 2020 · 0 comments

Comments

@mociepka
Copy link
Member

mociepka commented May 7, 2020

At some point in time google replace ISO 3166 province code by full names for China and Russia: https://www.iso.org/obp/ui/#iso:code:3166:CN
https://github.com/mirumee/google-i18n-address/blob/master/i18naddress/data/cn.json

This is problematic and requires mapping like:

CHINA_PROVINCE_MAP = (
    ("AH", "安徽省"),
    ("MO", "澳门"),
    ("BJ", "北京市"),
    ("CQ", "重庆市"),
    ("FJ", "福建省"),
    ("GS", "福建省"),
    ("GD", "福建省"),
    ("GX", "广西壮族自治区"),
    ("GZ", "贵州省"),
    ("HI", "海南省"),
    ("HE", "河北省"),
    ("HA", "河南省"),
    ("HL", "黑龙江省"),
    ("HB", "湖北省"),
    ("HN", "湖南省"),
    ("JL", "吉林省"),
    ("JS", "江苏省"),
    ("JX", "江西省"),
    ("LN", "辽宁省"),
    ("NM", "内蒙古自治区"),
    ("NX", "宁夏回族自治区"),
    ("QH", "青海省"),
    ("SD", "山东省"),
    ("SX", "山西省"),
    ("SN", "陕西省"),
    ("SH", "上海市"),
    ("SC", "四川省"),
    ("TW", "台湾"),
    ("TJ", "天津市"),
    ("XZ", "西藏自治区"),
    ("HK", "香港"),
    ("XJ", "新疆维吾尔自治区"),
    ("YN", "云南省"),
    ("ZJ", "浙江省"),
)

We could add those maps to the lib it self.

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

No branches or pull requests

1 participant