Fix flag and name resolution for non-ISO FIFA members (England, Scotland, Wales, Kosovo) - #33
Merged
Merged
Conversation
…o XK instead of mismapping to GB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes flag and name resolution for FIFA members without an ISO 3166-1 identity:
ENG) no longer resolves toGB— 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.KVX) → user-assignedXK— localized name via ICU/CLDR ("Kosovo" in de/en/fr) and 🇽🇰 flag.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
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.TeamNameLocalizer::flagEmoji()builds the emoji string;_team_badge.phpshrinks to a single call.'ENG' => 'GB'removed from the alias map;'KVX' => 'XK'added (GBRkept — formally correct ISO-3 for the UK).Notes
fix/flag-emoji-fallback-chrome-issue, which builds on this API and should be merged after this PR.