Skip to content

Commit

Permalink
Clean up Sark country code, add UN, remove some non-countries
Browse files Browse the repository at this point in the history
  • Loading branch information
pudo committed Oct 5, 2024
1 parent 8c3aecf commit 4208a82
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion followthemoney/types/country.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def _locale_names(self, locale: Locale) -> EnumValues:
names = {
"zz": gettext("Global"),
"eu": gettext("European Union"),
"un": gettext("United Nations"),
"zr": gettext("Zaire"),
# Overwrite "Czechia" label:
"cz": gettext("Czech Republic"),
Expand All @@ -46,7 +47,7 @@ def _locale_names(self, locale: Locale) -> EnumValues:
"cy-trnc": gettext("Northern Cyprus"),
"az-nk": gettext("Nagorno-Karabakh"),
"cn-xz": gettext("Tibet"),
"gg-srk": gettext("Sark"),
"cq": gettext("Sark"),
"gb-wls": gettext("Wales"),
"gb-sct": gettext("Scotland"),
"gb-nir": gettext("Northern Ireland"),
Expand All @@ -61,6 +62,12 @@ def _locale_names(self, locale: Locale) -> EnumValues:
int(code)
except ValueError:
names[code] = label
# Remove some ISO-3611 codes that are not countries:
names.pop("xa", None)
names.pop("xb", None)
names.pop("qo", None)
names.pop("ea", None)
names.pop("ez", None)
return names

def clean_text(
Expand Down

0 comments on commit 4208a82

Please sign in to comment.