Repository navigation
Widen a thin country to its language before giving up - #80
Merged
Merged
Conversation
27% of countries with stations have no voice radio on file at all, and refusing was the only answer. Where a language clearly speaks for the country, look for that language elsewhere first. The guard matters more than the fallback. Tiny territories carry one relayed Quran channel each, so the most common language in Tuvalu, Nauru and Liberia reads as Arabic. A language now has to carry three stations and a quarter of the country's list before it counts, so most territories keep the honest refusal. The UI names the language and the country rather than swapping quietly. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
raj-khan
added a commit
that referenced
this pull request
Sep 19, 2026
27% of countries with stations have no voice radio on file at all, and refusing was the only answer. Where a language clearly speaks for the country, look for that language elsewhere first. The guard matters more than the fallback. Tiny territories carry one relayed Quran channel each, so the most common language in Tuvalu, Nauru and Liberia reads as Arabic. A language now has to carry three stations and a quarter of the country's list before it counts, so most territories keep the honest refusal. The UI names the language and the country rather than swapping quietly.
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.
Why
Pinned to one country, asking for Voices either finds something or refuses. Refusing is right (quietly handing over music would hide the gap), but it happens a lot: measured across all 241 countries that have stations, 66 of them (27%) return nothing for Voices.
Where a language clearly speaks for the country, there is a better answer than a dead end.
The guard matters more than the fallback
My first instinct was to take the country's most common declared language. That fails badly. Tiny territories carry one or two entries each, often a relayed Quran channel, so the single most common language in Tuvalu, Nauru, Liberia, Djibouti, Sierra Leone, Papua New Guinea and a dozen others comes out as Arabic. Offering Arabic talk radio to someone who asked for Tuvalu is worse than telling them there is none.
So a language has to genuinely dominate: at least 3 stations and 25% of the country's list. There is a test for the Tuvalu case specifically.
Measured
Of 53 empty countries sampled:
Saying so
The listener asked for one place and is hearing another, so the UI says it. Surprise me already named the country it landed in; the home dial now adds "Nothing on air there, so this is french radio from France."
Checks
npm run lint,npm run format:check,npm run typecheck,npm test(443 passed) andnpm run buildpass, and the full Playwright suite (34 tests) passes locally.