Skip to content

Fix flag and name resolution for non-ISO FIFA members (England, Scotland, Wales, Kosovo) - #33

Merged
kilgor-trout-c22 merged 2 commits into
masterfrom
fix/team-name-localization
Jun 5, 2026
Merged

Fix flag and name resolution for non-ISO FIFA members (England, Scotland, Wales, Kosovo)#33
kilgor-trout-c22 merged 2 commits into
masterfrom
fix/team-name-localization

Conversation

@kilgor-trout-c22

Copy link
Copy Markdown
Contributor

What

Fixes flag and name resolution for FIFA members without an ISO 3166-1 identity:

  • England (ENG) no longer resolves to GB — it previously displayed as "United Kingdom" / "Vereinigtes Königreich" with the Union Jack 🇬🇧. England, Scotland and Wales now resolve to their Unicode subdivision tag-sequence flags (🏴󠁧󠁢󠁥󠁮󠁧󠁿 🏴󠁧󠁢󠁳󠁣󠁴󠁿 🏴󠁧󠁢󠁷󠁬󠁳󠁿) with the stored team name.
  • Kosovo (KVX) → user-assigned XK — localized name via ICU/CLDR ("Kosovo" in de/en/fr) and 🇽🇰 flag.
  • Northern Ireland (NIR) intentionally falls back to the neutral initials badge: it has no ISO code and no emoji flag (Unicode declined the politically contested Ulster Banner).

How

  • New TeamNameLocalizer::flagCodepoints() returns the Unicode codepoint sequence of a team's flag (regional-indicator pair for countries, tag sequence for home nations). The sequence doubles as the Twemoji asset filename, so the upcoming bundled-SVG branch (fix/flag-emoji-fallback-chrome-issue) derives its filenames from the same source.
  • New TeamNameLocalizer::flagEmoji() builds the emoji string; _team_badge.php shrinks to a single call.
  • 'ENG' => 'GB' removed from the alias map; 'KVX' => 'XK' added (GBR kept — formally correct ISO-3 for the UK).
  • Unit tests extended: non-ISO FIFA members, codepoint shapes for countries and home nations, emoji output, name fallbacks.

Notes

  • Tag-sequence flag rendering by native emoji fonts is spotty (Windows shows a plain black flag; Chrome/Linux nothing) — full visual consistency arrives with the bundled Twemoji SVGs in fix/flag-emoji-fallback-chrome-issue, which builds on this API and should be merged after this PR.
  • Home-nation team names are not localized ("Schottland", "Écosse") — analysis and options in Home-nation team names are not localized (England, Scotland, Wales, Northern Ireland) #32.

@kilgor-trout-c22
kilgor-trout-c22 merged commit 7097fe1 into master Jun 5, 2026
17 checks passed
@kilgor-trout-c22
kilgor-trout-c22 deleted the fix/team-name-localization branch June 5, 2026 14:39
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 this pull request may close these issues.

1 participant