Skip to content

Widen a thin country to its language before giving up - #80

Merged
raj-khan merged 2 commits into
mainfrom
task-76-language-fallback
Sep 19, 2026
Merged

raj-khan merged 2 commits into
mainfrom
task-76-language-fallback

Conversation

@raj-khan

@raj-khan raj-khan commented Sep 19, 2026 •

Copy link
Copy Markdown
Owner

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:

  • 11 get a real station: Burkina Faso to French, Kosovo to Albanian, San Marino to Italian, Syria to Arabic, Suriname to Hindi, and Bermuda / Bahamas / Fiji / Falklands / French Guiana / Antarctica to English or French.
  • 41 keep the honest refusal, because no language speaks for them clearly enough.
  • 1 (Azerbaijan) has a dominant language but no voice radio in it anywhere.

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) and npm run build pass, and the full Playwright suite (34 tests) passes locally.

raj-khan and others added 2 commits September 19, 2026 11:37
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
raj-khan merged commit fd1a1e2 into main Sep 19, 2026
3 checks passed
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.
@raj-khan
raj-khan deleted the task-76-language-fallback branch September 19, 2026 04:44
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