Skip to content

fix(data): adopt ISO short names — Czechia, Cabo Verde - #170

Merged
dmythro merged 3 commits into
mainfrom
fix/iso-country-names
Jul 8, 2026
Merged

fix(data): adopt ISO short names — Czechia, Cabo Verde#170
dmythro merged 3 commits into
mainfrom
fix/iso-country-names

Conversation

@dmythro

@dmythro dmythro commented Jun 14, 2026

Copy link
Copy Markdown
Member

What

Updates two countries to their official ISO 3166 / UN short English names, and aligns the Czech native to its matching short form:

Code name (before → after) native (before → after)
CZ Czech Republic → Czechia Česká republika → Česko
CV Cape Verde → Cabo Verde already Cabo Verde (no change)

Why

Consistency with the short-name policy already applied to Türkiye, Kyiv, Eswatini, and North Macedonia. "Czechia" (ISO/UN since 2016) and "Cabo Verde" (ISO/UN since 2013) are the current official English short names.

ISO 3166 defines names only in English and French — it has no native-language field — so native is the dataset's own field. Česko is the official Czech short form (the native equivalent of "Czechia"), chosen to match the short English name and the dataset's short-native convention (e.g. Germany/Deutschland). CV native was already the short, untranslated Cabo Verde.

⚠️ Behavior change (reverse name lookup)

getCountryCode() matches on name/native, so the old strings no longer resolve:

getCountryCode('Czech Republic')   // false (was 'CZ')
getCountryCode('Česká republika')  // false (was 'CZ')
getCountryCode('Cape Verde')       // false (was 'CV')

getCountryCode('Czechia')          // 'CZ'
getCountryCode('Česko')            // 'CZ'
getCountryCode('Cabo Verde')       // 'CV'

Worth a changelog note. Shipping in the same minor as the currency data updates.

Sources

Official ISO 3166 / UN short names — not arbitrary edits, and consistent with names the dataset already uses for the same reason (e.g. Türkiye per ISO 3166).

CZ → "Czechia" / "Česko" — "Czechia" registered in UN UNTERM/UNGEGN (5 Jul 2016) and added to ISO 3166 (Sep 2016), alongside the formal "the Czech Republic". ISO carries only the English/French name; the UN recognises Česko (short) / Česká republika (formal) as the Czech names:

CV → "Cabo Verde" — the Republic of Cabo Verde asked the UN (24 Oct 2013) to use "Cabo Verde" in all official languages, untranslated; ISO 3166 follows UN usage:

Copilot AI review requested due to automatic review settings June 14, 2026 19:38
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0e98e6a2-8c0c-4ee3-8749-6612e018c279

📥 Commits

Reviewing files that changed from the base of the PR and between d0168ef and 7f09f3e.

📒 Files selected for processing (1)
  • packages/test-js/getCountryCode.test.ts

📝 Walkthrough

Walkthrough

Two country entries are updated in packages/countries/src/data/countries.ts: CV changes from “Cape Verde” to “Cabo Verde”, and CZ changes from “Czech Republic” to “Czechia” with native changing from “Česká republika” to “Česko”. A new getCountryCode() test case covers the updated short-name lookups and checks that the former long-form names now return false.

Poem

🐇 I nibbled the names and set them aright,
Cabo Verde and Czechia now read just right.
Short names hop in, old names hop out,
The code and the test now agree, no doubt.
Hoppity-hoppity, data shines bright!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: updating country names to ISO short names for CZ and CV.
Description check ✅ Passed The description covers what changed, why, behavior impact, and cites source URLs, with no required section obviously missing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/iso-country-names

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates country metadata in the packages/countries dataset to align English name fields with current ISO/UN short forms, which impacts reverse name lookup via getCountryCode().

Changes:

  • Change CV.name from Cape Verde to Cabo Verde.
  • Change CZ.name from Czech Republic to Czechia.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/countries/src/data/countries.ts
Comment thread packages/countries/src/data/countries.ts

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@dmythro
dmythro merged commit cbe3513 into main Jul 8, 2026
4 checks passed
@dmythro
dmythro deleted the fix/iso-country-names branch July 8, 2026 13:29
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.

2 participants