Skip to content

Patch CLDR subdivisions for IT-OT and IT-CI, bump v1.24.2#458

Open
DominiqueFlaaa wants to merge 1 commit intomainfrom
cx-fix-it-province-gap
Open

Patch CLDR subdivisions for IT-OT and IT-CI, bump v1.24.2#458
DominiqueFlaaa wants to merge 1 commit intomainfrom
cx-fix-it-province-gap

Conversation

@DominiqueFlaaa
Copy link
Copy Markdown
Contributor

@DominiqueFlaaa DominiqueFlaaa commented Apr 27, 2026

Summary

Italy restored two Sardinian provinces in June 2025 with new names. PR #451 updated data/regions/IT.yml accordingly, but data/cldr/locales/*/subdivisions.yml still carried the old names. Atlas (and any other consumer that resolves province labels through CLDR via ShopifyI18n::Zone#nameI18n.t("subdivisions.itXX")) silently overrode the corrected country_db values, so the country GraphQL endpoint kept returning "Olbia-Tempio" and "Carbonia-Iglesias". This PR unblocks Italy by patching CLDR data so the new names flow through to atlas's admin/buyer surfaces.

Changes

Province Old New
IT-OT Olbia-Tempio Gallura Nord-Est Sardegna
IT-CI Carbonia-Iglesias Sulcis Iglesiente

Patches applied per-locale in rake/cldr/patch.rb (so future cldr:data:import runs re-apply on top of upstream):

  • :en — source string for downstream English UIs.
  • :it — Italian-speaking merchants on IT addresses.
  • :de — largest non-en/it consumer of IT addresses; prefix-preserving form ("Provinz Gallura Nord-Est Sardegna", "Provinz Sulcis Iglesiente").

Why only en/it/de

The translation-platform[bot] does not propagate CLDR subdivision data. Its translation.yml config only covers data/regions/, data/other/hand_translated/, and data/other/timezones/ — every translation-platform[bot] commit on this repo confirms it. So we cannot lean on the automation to fan this out to the other 30+ target locales.

Choosing en/it/de targets the locales where:

  1. We have a confident, locale-correct rendering (the existing prefix conventions are clear).
  2. The merchant population most likely to read IT addresses is concentrated.

For all other locales, the old names remain. A TODO comment + reference to the upstream Unicode CLDR ticket pattern (CLDR-14092-style) is left in patch.rb. Once upstream ships the rename, the patches can be removed.

Verification

Tophatted with atlas pinned to this branch (gem "worldwide", path: ...):

[en] OT="Gallura Nord-Est Sardegna"          CI="Sulcis Iglesiente"
[it] OT="Gallura Nord-Est Sardegna"          CI="Sulcis Iglesiente"
[de] OT="Provinz Gallura Nord-Est Sardegna"  CI="Provinz Sulcis Iglesiente"

Both the direct path (ShopifyI18n::Territories.find_by_code("IT").zone(...).name) and the full country endpoint path (Types::CountryFormatter.build_formatted_country) return the expected names.

Test plan

  • bundle exec rake test (region + locale tests) — green
  • bundle exec rubocop rake/cldr/patch.rb — clean
  • Tophat atlas with local worldwide path: en/it/de all return new names from country GraphQL endpoint
  • Bumped to v1.24.2 + CHANGELOG entry

Follow-ups

  • Bump worldwide in shopify-i18n (separate PR).
  • Report upstream to Unicode CLDR; remove these patches when upstream ships.

🤖 Generated with Claude Code

@DominiqueFlaaa DominiqueFlaaa force-pushed the cx-fix-it-province-gap branch from 45eb8bb to daeed80 Compare April 27, 2026 20:36
@DominiqueFlaaa DominiqueFlaaa changed the title Patch CLDR subdivisions for IT-OT and IT-CI Patch CLDR subdivisions for IT-OT and IT-CI, bump v1.24.2 Apr 27, 2026
@DominiqueFlaaa DominiqueFlaaa force-pushed the cx-fix-it-province-gap branch from daeed80 to e96119c Compare April 28, 2026 13:34
PR #451 updated `data/regions/IT.yml` to reflect Italy's June 2025
restoration of two Sardinian provinces, but left
`data/cldr/locales/<locale>/subdivisions.yml` carrying the old names.
Consumers that resolve province labels through CLDR (e.g. atlas's
`country_formatter.rb` via `ShopifyI18n::Zone#name` ->
`I18n.t("subdivisions.itXX")`) silently overrode the corrected
country_db names with stale CLDR translations, so admin/buyer surfaces
in atlas continued to display "Olbia-Tempio" and "Carbonia-Iglesias".

This commit patches CLDR data so the new names propagate:
  IT-OT: Olbia-Tempio       -> Gallura Nord-Est Sardegna
  IT-CI: Carbonia-Iglesias  -> Sulcis Iglesiente

- :en (source) and :it (locale) patched -- corrects the language used
  by Italian-speaking merchants and the English source string.
- :de patched -- largest non-en/it consumer of IT addresses;
  prefix-preserving form ("Provinz Gallura Nord-Est Sardegna" /
  "Provinz Sulcis Iglesiente").
- All other locales remain on stale upstream CLDR. Shopify's
  translation-platform[bot] only fans out files under data/regions/,
  data/other/hand_translated/, and data/other/timezones/ -- it does
  not touch data/cldr/, so it cannot propagate this fix. Tracking via
  TODO in patch.rb pending an upstream Unicode CLDR update.

- rake/cldr/patch.rb: static :it/:en/:de patches so future
  cldr:data:import runs re-apply the fix.
- data/cldr/locales/{en,it,de}/subdivisions.yml: updated.
- Bumped to v1.24.2 + CHANGELOG entry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@DominiqueFlaaa DominiqueFlaaa force-pushed the cx-fix-it-province-gap branch from e96119c to 29cc9fb Compare April 28, 2026 13:46
@DominiqueFlaaa DominiqueFlaaa requested a review from a team April 28, 2026 16:27
Copy link
Copy Markdown
Member

@ananyaneogi ananyaneogi left a comment

Choose a reason for hiding this comment

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

Change makes sense 👍

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