diff --git a/CHANGELOG.md b/CHANGELOG.md index c3f390a..a06d7ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +## [4.5.2] - 2022-03-15 + +### Added + +- Detection for "Bosnia & Herzegovina" as "BA" in English + +### Fixed + +- No longer find "IS" for countries with "island" in their names. ## [4.5.1] - 2022-03-11 diff --git a/geoconvert/__init__.py b/geoconvert/__init__.py index 35d6834..c9be4be 100644 --- a/geoconvert/__init__.py +++ b/geoconvert/__init__.py @@ -1,2 +1,2 @@ __author__ = "Jurismarches " -__version__ = "4.5.0" +__version__ = "4.5.2" diff --git a/geoconvert/data/countries.py b/geoconvert/data/countries.py index d32e2ae..ad4a5eb 100644 --- a/geoconvert/data/countries.py +++ b/geoconvert/data/countries.py @@ -32,6 +32,12 @@ "south sudan": "SS", # en "sudsudan": "SS", # de "sudan del sur": "SS", # es + # Make sure we never mistake some countries for IS (Iceland) + # We would mistake them because Iceland spells Island in German. + "bouvet island": "BV", # en + "christmas island": "CX", # en + "heard island": "HM", # en + "norfolk island": "NF", # en } @@ -334,6 +340,7 @@ "bolivia plurinational state of": "BO", "bonaire saint eustatius and saba": "BQ", "bosnia and herzegovina": "BA", + "bosnia & herzegovina": "BA", "botswana": "BW", "bouvet island": "BV", "brazil": "BR", diff --git a/tests/test_countries.py b/tests/test_countries.py index 50f68e5..e66db94 100644 --- a/tests/test_countries.py +++ b/tests/test_countries.py @@ -49,6 +49,16 @@ class TestCountries: ("sudan del sur", {}, "SS"), # es ("Soudan du Sud", {}, "SS"), # fr ("sudao do sul", {}, "SS"), # pt + # No confusion with Iceland, which spells "Island" in German ("IS") + ("Cayman islands", {}, "KY"), # en + ("Christmas island", {}, "CX"), #en + ("Bouvet Island", {}, "BV"), # en + ("Heard Island", {}, "HM"), # en + ("Norfolk Island", {}, "NF"), # en + ("Solomon Islands", {}, "SB"), # en + # However, in cases where island is singular instead of plural, + # there can be confusion. + ("Solomon Island Nationals", {}, "IS"), # en # Any capitalization for lang works ("Germany", {"lang": "en"}, "DE"), ("Germany", {"lang": "En"}, "DE"),