Skip to content

Update IT Sardinian zones, release v1.24.0#451

Merged
DominiqueFlaaa merged 1 commit intomainfrom
df.update-it-provinces
Apr 15, 2026
Merged

Update IT Sardinian zones, release v1.24.0#451
DominiqueFlaaa merged 1 commit intomainfrom
df.update-it-provinces

Conversation

@DominiqueFlaaa
Copy link
Copy Markdown
Contributor

Update Italy's Sardinian provinces to reflect 2025 administrative restoration

Summary

Italy restored several Sardinian provinces in June 2025 that had been consolidated in 2019. This PR updates IT.yml to reflect the current administrative boundaries, verified against tuttitalia.it and poste.it postal code data.

Problem

Three Sardinian province zones were out of date:

  • OT (Olbia-Tempio / Gallura) was marked deprecated: true with no zip_prefixes. All Gallura postcodes (07020–07029, 07038, 07051, 07052) resolved to Sassari (SS) instead.
  • OG (Ogliastra) had only one prefix (09064). Its core postcodes (08040–08049) resolved to Nuoro (NU) because NU held a competing '0804' prefix.
  • CI (Carbonia-Iglesias) used an outdated name — the province was renamed Sulcis Iglesiente upon restoration.

When assigning zone from zip, this would result in incorrect province assignments for addresses in these territories.

Changes

data/regions/IT.yml

OT — Un-deprecate and restore as Gallura Nord-Est Sardegna

  • Removed deprecated: true
  • Added 14 zip_prefixes (07020–07029, 07030, 07038, 07051, 07052)
  • Renamed from "Olbia-Tempio" to "Gallura Nord-Est Sardegna" with "Olbia-Tempio" as name_alternates
  • Moved to alphabetical position (between Frosinone and Genova)

OG — Expand with correct Ogliastra postcodes

  • Added 08040, 08042, 08044–08049 to OG's zip_prefixes
  • Removed NU's competing '0804' prefix (no current Nuoro municipality uses an 0804x postcode)

SS — Disambiguate from OT

  • Replaced broad '07' prefix with 11 specific prefixes (0701, 0703107037, 07039, 0704, 07100) to avoid overlap with OT's 070xx prefixes, which is required by the zip_prefixes_are_unambiguous consistency test

CI — Rename to Sulcis Iglesiente

  • Updated name from "Carbonia-Iglesias" to "Sulcis Iglesiente"
  • Added "Carbonia-Iglesias" as name_alternates
  • Moved to alphabetical position (between Sondrio and Taranto)

Crossings

  • Added 07030 as OT+SS crossing (shared between 3 OT and 11 SS municipalities)
  • Removed 8 NU+OG crossing entries for 08040–08049 (these postcodes are now exclusively OG)

Comments

  • Removed stale comments

test/worldwide/region_data_consistency_test.rb

  • Removed the OT carve-out that exempted it from the "every non-deprecated zone must have zip_prefixes" check

Validation

  • All 1,387 existing tests pass (1,975,599 assertions, 0 failures)
  • Verified 4,104 Italian province+postcode pairs from official postal data sources — 100% resolve to the correct province via zone(zip:)
  • Spot-checked major cities (Roma, Milano, Napoli, Torino, Firenze, etc.) — all unaffected
  • Confirmed all zips_crossing_provinces entries satisfy the first-match and neighbour constraints

Checklist

  • I have added a CHANGELOG entry for this change (or determined that it isn't needed)

@DominiqueFlaaa DominiqueFlaaa force-pushed the df.update-it-provinces branch 2 times, most recently from c0f469d to 13503e5 Compare April 13, 2026 16:06
@DominiqueFlaaa DominiqueFlaaa marked this pull request as draft April 13, 2026 16:24
@DominiqueFlaaa DominiqueFlaaa force-pushed the df.update-it-provinces branch from 13503e5 to 01ce909 Compare April 13, 2026 17:57
@DominiqueFlaaa DominiqueFlaaa marked this pull request as ready for review April 13, 2026 17:57
@DominiqueFlaaa DominiqueFlaaa merged commit be74f8e into main Apr 15, 2026
6 checks passed
@DominiqueFlaaa DominiqueFlaaa deleted the df.update-it-provinces branch April 15, 2026 13:25
DominiqueFlaaa added a commit that referenced this pull request Apr 27, 2026
PR #451 updated `data/regions/IT.yml` to reflect Italy's 2025
restoration of 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.

This commit patches CLDR data so the new names propagate for the source
locales (en, it):
  IT-OT: Olbia-Tempio -> Gallura Nord-Est Sardegna
  IT-CI: Carbonia-Iglesias -> Sulcis Iglesiente

Other locales are handled by Shopify's translation platform automations.

- rake/cldr/patch.rb: extended the static :it patch and added a static
  :en patch (so future cldr:data:import runs re-apply this fix).
- data/cldr/locales/{en,it}/subdivisions.yml: regenerated.
- Bumped to v1.24.2 + CHANGELOG entry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
DominiqueFlaaa added a commit that referenced this pull request Apr 28, 2026
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 added a commit that referenced this pull request Apr 28, 2026
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>
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