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

Clean up Sark country code, add UN, remove some non-countries #1555

Merged
merged 2 commits into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 0 additions & 6 deletions js/src/defaultModel.json
Original file line number Diff line number Diff line change
Expand Up @@ -7154,7 +7154,6 @@
"dm": "Dominica",
"do": "Dominican Republic",
"dz": "Algeria",
"ea": "Ceuta & Melilla",
"ec": "Ecuador",
"ee": "Estonia",
"eg": "Egypt",
Expand All @@ -7163,7 +7162,6 @@
"es": "Spain",
"et": "Ethiopia",
"eu": "European Union",
"ez": "Eurozone",
"fi": "Finland",
"fj": "Fiji",
"fk": "Falkland Islands",
Expand All @@ -7180,7 +7178,6 @@
"ge-ab": "Abkhazia (Occupied Georgia)",
"gf": "French Guiana",
"gg": "Guernsey",
"gg-srk": "Sark",
"gh": "Ghana",
"gi": "Gibraltar",
"gl": "Greenland",
Expand Down Expand Up @@ -7290,7 +7287,6 @@
"pw": "Palau",
"py": "Paraguay",
"qa": "Qatar",
"qo": "Outlying Oceania",
"re": "Réunion",
"ro": "Romania",
"rs": "Serbia",
Expand Down Expand Up @@ -7356,8 +7352,6 @@
"wf": "Wallis & Futuna",
"ws": "Samoa",
"x-so": "South Ossetia (Occupied Georgia)",
"xa": "Pseudo-Accents",
"xb": "Pseudo-Bidi",
"xk": "Kosovo",
"ye": "Yemen",
"yt": "Mayotte",
Expand Down
Loading