Repository navigation
Fix Catalan names of Spain's provinces - #651
Merged
Merged
Conversation
CLDR's Catalan names for Spanish provinces mix "província de" and "Província de", and use ² markers to tell provinces apart from autonomous communities with the same name (e.g. "Illes Balears²"). Patch them to plain names, as we already do for Spanish. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
DominiqueFlaaa
approved these changes
Oct 20, 2026
1 task done
This branch was successfully deployed
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 are you trying to accomplish?
In Catalan (
ca), the names of Spain's provinces come straight from CLDR. Three problems make them look broken in a province picker:²marker CLDR uses for duplicate names:Illes Balears²,Navarra²,Cantàbria².Upstream CLDR still has these names: every Catalan subdivision name is marked
draft="provisional", so updating CLDR won't fix it.What approach did you choose and why?
I added a
patch_subdivisions(:ca, ...)block torake/cldr/patch.rb, the same way we already patch Spanish names (see CLDR-14034) and Portuguese²names. It rewrites the same 46 province codes as the Spanish patch to their plain names, e.g.província d’Alacant→Alacant,Illes Balears²→Illes Balears.data/cldr/locales/ca/subdivisions.ymlwas regenerated by running the new block through the existingpatch_subdivisionshelper. The helper checks each expected existing value, so every "before" string in the patch matches the data exactly. Only those 46 lines changed.What should reviewers focus on?
escbecomesLa Corunya. Standard Catalan lowercases the article inside a sentence ("la Corunya"). I capitalized it because it stands alone in a list, matchingLa Coruñain the Spanish patch.esri,La Rioja²) are left alone because they aren't zones of Spain indata/regions/ES.yml.The impact of these changes
Only
Region#full_name(locale: :ca)changes, and only for Spain's provinces. No other locales or countries are affected.Testing
I added a test that checks no Catalan name for a Spanish zone contains "província" or
². The test fails without the data change.To try it out:
Checklist
🤖 Generated with Claude Code