diff --git a/CHANGELOG.md b/CHANGELOG.md index 15ce33780..434a107f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +- Prefer "SAR" over "SAR China" in Chinese-language names for regions `HK` and `MO`. [#79](https://github.com/Shopify/worldwide/pull/79). - Add Worldwide::Field.valid_key? method. [#80](https://github.com/Shopify/worldwide/pull/80) --- diff --git a/data/cldr/locales/zh/territories.yml b/data/cldr/locales/zh/territories.yml index 1124ef978..9590b5941 100644 --- a/data/cldr/locales/zh/territories.yml +++ b/data/cldr/locales/zh/territories.yml @@ -132,7 +132,7 @@ zh: GU: 关岛 GW: 几内亚比绍 GY: 圭亚那 - HK: 中国香港特别行政区 + HK: 香港特别行政区 HM: 赫德岛和麦克唐纳群岛 HN: 洪都拉斯 HR: 克罗地亚 @@ -186,7 +186,7 @@ zh: ML: 马里 MM: 缅甸 MN: 蒙古 - MO: 中国澳门特别行政区 + MO: 澳门特别行政区 MP: 北马里亚纳群岛 MQ: 马提尼克 MR: 毛里塔尼亚 diff --git a/rake/cldr/patch.rb b/rake/cldr/patch.rb index a10f94d12..a3c678ac6 100644 --- a/rake/cldr/patch.rb +++ b/rake/cldr/patch.rb @@ -555,6 +555,12 @@ def perform [:CI, "Côte d’Ivoire", "आयव्हरी कोस्ट"], ]) + # Prefer the phrasing "Hong Kong SAR" and "Macau SAR" + patch_territories(:zh, [ + [:HK, "中国香港特别行政区", "香港特别行政区"], + [:MO, "中国澳门特别行政区", "澳门特别行政区"], + ]) + # Should use capitalized letters for territories in UI list context, by default. # https://github.com/Shopify/shopify-i18n/issues/1551 patch_file(:root, "context_transforms.yml", [:context_transforms, :territory, :ui_list_or_menu], nil, "titlecase_first_word", allow_file_creation: true) diff --git a/test/worldwide/address_formatting_test.rb b/test/worldwide/address_formatting_test.rb index f859d5ec9..0403fb8cb 100644 --- a/test/worldwide/address_formatting_test.rb +++ b/test/worldwide/address_formatting_test.rb @@ -733,7 +733,7 @@ class AddressFormattingTest < ActiveSupport::TestCase zip: "999077", # this code is assigned by China Post for all of HK; it's not recognized by HK Post } - expected = "中国香港特别行政区九龙马里兰法院" + expected = "香港特别行政区九龙马里兰法院" I18n.with_locale(:"zh-CN") do actual = Worldwide.address(**address).single_line