worldwide 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -2
  3. data/Gemfile.lock +1 -1
  4. data/data/other/timezones/bg-BG.yml +1 -0
  5. data/data/other/timezones/cs.yml +1 -0
  6. data/data/other/timezones/da.yml +1 -0
  7. data/data/other/timezones/de.yml +1 -0
  8. data/data/other/timezones/el.yml +1 -0
  9. data/data/other/timezones/en.yml +1 -0
  10. data/data/other/timezones/es.yml +1 -0
  11. data/data/other/timezones/fi.yml +1 -0
  12. data/data/other/timezones/fr.yml +1 -0
  13. data/data/other/timezones/hi.yml +1 -0
  14. data/data/other/timezones/hr-HR.yml +1 -0
  15. data/data/other/timezones/hu.yml +1 -0
  16. data/data/other/timezones/id.yml +1 -0
  17. data/data/other/timezones/it.yml +1 -0
  18. data/data/other/timezones/ja.yml +1 -0
  19. data/data/other/timezones/ko.yml +1 -0
  20. data/data/other/timezones/lt-LT.yml +1 -0
  21. data/data/other/timezones/nb.yml +1 -0
  22. data/data/other/timezones/nl.yml +1 -0
  23. data/data/other/timezones/pl.yml +1 -0
  24. data/data/other/timezones/pt-BR.yml +1 -0
  25. data/data/other/timezones/pt-PT.yml +1 -0
  26. data/data/other/timezones/ro-RO.yml +1 -0
  27. data/data/other/timezones/ru.yml +1 -0
  28. data/data/other/timezones/sk-SK.yml +1 -0
  29. data/data/other/timezones/sl-SI.yml +1 -0
  30. data/data/other/timezones/sv.yml +1 -0
  31. data/data/other/timezones/th.yml +1 -0
  32. data/data/other/timezones/tr.yml +1 -0
  33. data/data/other/timezones/vi.yml +1 -0
  34. data/data/other/timezones/zh-CN.yml +1 -0
  35. data/data/other/timezones/zh-TW.yml +1 -0
  36. data/db/data/regions/AT.yml +1 -0
  37. data/db/data/regions/AW.yml +2 -0
  38. data/db/data/regions/AX.yml +3 -0
  39. data/db/data/regions/BL.yml +2 -0
  40. data/db/data/regions/BQ.yml +2 -0
  41. data/db/data/regions/CW.yml +2 -0
  42. data/db/data/regions/GF.yml +3 -0
  43. data/db/data/regions/GP.yml +4 -0
  44. data/db/data/regions/HK.yml +3 -0
  45. data/db/data/regions/IT.yml +4 -0
  46. data/db/data/regions/KR.yml +52 -2
  47. data/db/data/regions/MF.yml +2 -0
  48. data/db/data/regions/MO.yml +3 -0
  49. data/db/data/regions/MQ.yml +3 -0
  50. data/db/data/regions/NC.yml +2 -0
  51. data/db/data/regions/PF.yml +2 -0
  52. data/db/data/regions/PM.yml +2 -0
  53. data/db/data/regions/RE.yml +4 -0
  54. data/db/data/regions/SJ.yml +2 -0
  55. data/db/data/regions/SX.yml +2 -0
  56. data/db/data/regions/TF.yml +2 -0
  57. data/db/data/regions/TW.yml +3 -0
  58. data/db/data/regions/UM.yml +2 -0
  59. data/db/data/regions/US.yml +10 -0
  60. data/db/data/regions/WF.yml +2 -0
  61. data/db/data/regions/YT.yml +4 -0
  62. data/lib/worldwide/region.rb +11 -0
  63. data/lib/worldwide/regions_loader.rb +1 -0
  64. data/lib/worldwide/scripts.rb +4 -2
  65. data/lib/worldwide/version.rb +1 -1
  66. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4dca8f095b6020792ecd6186606db9cd6159d03414b735b0c2d4b30f0746b680
4
- data.tar.gz: 7e40cbbd862960354faf241a3320c03b1a081fa005f42063bf27951ca94f3c1d
3
+ metadata.gz: e6dab7ef2d9d926721d2ef41e8e81b947b7f0b4c053d7df98377f983797bc245
4
+ data.tar.gz: 9eaad39219ba9ddb74c963d97035b9222f5f82d604ca38fe7128a51ae53b9391
5
5
  SHA512:
6
- metadata.gz: 1c385197a1a3239d1d1251a0cb7b45fe3f04f4d9e75dc3ed02227fe9692184b12dc5754c4c5292bfbd24e4a079df48b2ea63689e63b11511ec1f7017627ac15a
7
- data.tar.gz: 666f0e760f82cfab270d47328a9600204e7c93c04bd16106b5f6d46cadefcd15f90dc64ea5663f0eeefc2827458aa2b47147468b45da059a57c37dd146893444
6
+ metadata.gz: ec3d8cbf74e6ec35195da2da959a5d104434f6f675bba2e8056a74338746dd01e82a3cd116a94f109be264e86b30a948631ef671967df94a07692e1e794588ce
7
+ data.tar.gz: '09f90b59ebdd15c7b7aa7b945defb11cfa544eec0cbcbdd5ba1faf7ae4b96ce16fc6a28ca830261bf834bca0bfc34b049fb511c1dc922beaf24df5ea7ce80619'
data/CHANGELOG.md CHANGED
@@ -1,10 +1,13 @@
1
1
  # Changelog
2
+
2
3
  All notable changes to this project will be documented in this file.
3
4
 
4
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
6
 
6
7
  ## How do I make a good changelog?
8
+
7
9
  ### Guiding Principles
10
+
8
11
  - Changelogs are for humans, not machines.
9
12
  - There should be an entry for every single version.
10
13
  - The same types of changes should be grouped.
@@ -24,16 +27,32 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
24
27
 
25
28
  ## [Unreleased]
26
29
 
27
- Nil.
30
+ - nil
28
31
 
29
32
  ---
30
33
 
34
+ [0.5.0] - 2023-11-20
35
+
36
+ - Add support for `Region#associated_continent` to return the containing continent of the region [#43](https://github.com/Shopify/worldwide/pull/43)
37
+ - Add more postal code prefixes for KR [#44](https://github.com/Shopify/worldwide/pull/44)
38
+ - Add name alternates for the zones of South Korea [#45](https://github.com/Shopify/worldwide/pull/45)
39
+ - Add support for Hangul and Arabic script detection, update Latn regexp [#46](https://github.com/Shopify/worldwide/pull/46)
40
+
41
+ [0.4.1] - 2023-11-10
42
+
43
+ - Add support for deprecated timezone Australia/Canberra [#35](https://github.com/Shopify/worldwide/pull/35)
44
+ - Add alternate codes for territories [#39](https://github.com/Shopify/worldwide/pull/39)
45
+ - Allow building numbers on address2 field for Austrian addresses [#40](https://github.com/Shopify/worldwide/pull/40)
46
+ - Add zone name alternates for Italy [#42](https://github.com/Shopify/worldwide/pull/35)
47
+
31
48
  [0.4.0] - 2023-11-08
49
+
32
50
  - Add region name alternates [#32](https://github.com/Shopify/worldwide/pull/32)
33
51
  - Cache `Region#parent_name` [#33](https://github.com/Shopify/worldwide/pull/33)
34
52
  - Use hash tables to look up regions by code [#36](https://github.com/Shopify/worldwide/pull/36)
35
53
 
36
54
  [0.3.0] - 2023-11-03
55
+
37
56
  - Add code alternates for Japan [#23](https://github.com/Shopify/worldwide/pull/23)
38
57
  - Add code alternates for Puerto Rico [#24](https://github.com/Shopify/worldwide/pull/24)
39
58
  - Record multiple parents per region [#27](https://github.com/Shopify/worldwide/pull/27)
@@ -42,7 +61,6 @@ Nil.
42
61
  [#29](https://github.com/Shopify/worldwide/pull/29)
43
62
  - Handle ISO_CODE only zones lookup [#26](https://github.com/Shopify/worldwide/pull/26)
44
63
 
45
-
46
64
  [0.2.0] - 2023-11-01
47
65
 
48
66
  - Add Region#group and Region#group_name [#15](https://github.com/Shopify/worldwide/pull/15)
data/Gemfile.lock CHANGED
@@ -13,7 +13,7 @@ GIT
13
13
  PATH
14
14
  remote: .
15
15
  specs:
16
- worldwide (0.4.0)
16
+ worldwide (0.5.0)
17
17
  activesupport (~> 7.0)
18
18
  i18n (~> 1.12.0)
19
19
  phonelib (~> 0.8)
@@ -121,6 +121,7 @@ bg-BG:
121
121
  Pacific/Guam: "(GMT+10:00) Гуам"
122
122
  Australia/Hobart: "(GMT+10:00) Хобарт"
123
123
  Australia/Melbourne: "(GMT+10:00) Канбера, Мелбърн"
124
+ Australia/Canberra: "(GMT+10:00) Канбера, Мелбърн"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Порт Морсби"
125
126
  Australia/Sydney: "(GMT+10:00) Сидни"
126
127
  Asia/Vladivostok: "(GMT+10:00) Владивосток"
@@ -121,6 +121,7 @@ cs:
121
121
  Pacific/Guam: "(GMT+10:00) Guam"
122
122
  Australia/Hobart: "(GMT+10:00) Hobart"
123
123
  Australia/Melbourne: "(GMT+10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT+10:00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Port Moresby"
125
126
  Australia/Sydney: "(GMT+10:00) Sydney"
126
127
  Asia/Vladivostok: "(GMT+10:00) Vladivostok"
@@ -121,6 +121,7 @@ da:
121
121
  Pacific/Guam: "(GMT+10:00) Guam"
122
122
  Australia/Hobart: "(GMT+10:00) Hobart"
123
123
  Australia/Melbourne: "(GMT+10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT+10:00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Port Moresby"
125
126
  Australia/Sydney: "(GMT+10:00) Sydney"
126
127
  Asia/Vladivostok: "(GMT+10:00) Vladivostok"
@@ -121,6 +121,7 @@ de:
121
121
  Pacific/Guam: "(GMT+10:00) Guam"
122
122
  Australia/Hobart: "(GMT+10:00) Hobart"
123
123
  Australia/Melbourne: "(GMT+10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT+10:00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Port Moresby"
125
126
  Australia/Sydney: "(GMT+10:00) Sydney"
126
127
  Asia/Vladivostok: "(GMT+10:00) Wladiwostok"
@@ -121,6 +121,7 @@ el:
121
121
  Pacific/Guam: "(GMT+10:00) Γκουάμ"
122
122
  Australia/Hobart: "(GMT+10:00) Χόμπαρτ"
123
123
  Australia/Melbourne: "(GMT+10:00) Καμπέρα, Μελβούρνη"
124
+ Australia/Canberra: "(GMT+10:00) Καμπέρα, Μελβούρνη"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Πορτ Μόρεσμπι"
125
126
  Australia/Sydney: "(GMT+10:00) Σίδνεϊ"
126
127
  Asia/Vladivostok: "(GMT+10:00) Βλαδιβοστόκ"
@@ -121,6 +121,7 @@ en:
121
121
  Pacific/Guam: "(GMT+10:00) Guam"
122
122
  Australia/Hobart: "(GMT+10:00) Hobart"
123
123
  Australia/Melbourne: "(GMT+10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT+10:00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Port Moresby"
125
126
  Australia/Sydney: "(GMT+10:00) Sydney"
126
127
  Asia/Vladivostok: "(GMT+10:00) Vladivostok"
@@ -121,6 +121,7 @@ es:
121
121
  Pacific/Guam: "(GMT+10:00) Guam"
122
122
  Australia/Hobart: "(GMT+10:00) Hobart"
123
123
  Australia/Melbourne: "(GMT+10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT+10:00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Puerto Moresby"
125
126
  Australia/Sydney: "(GMT+10:00) Sídney"
126
127
  Asia/Vladivostok: "(GMT+10:00) Vladivostok"
@@ -121,6 +121,7 @@ fi:
121
121
  Pacific/Guam: "(GMT+10:00) Guam"
122
122
  Australia/Hobart: "(GMT+10:00) Hobart"
123
123
  Australia/Melbourne: "(GMT+10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT+10:00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Port Moresby"
125
126
  Australia/Sydney: "(GMT+10:00) Sydney"
126
127
  Asia/Vladivostok: "(GMT+10:00) Vladivostok"
@@ -121,6 +121,7 @@ fr:
121
121
  Pacific/Guam: "(GMT + 10:00) Guam"
122
122
  Australia/Hobart: "(GMT + 10:00) Hobart"
123
123
  Australia/Melbourne: "(GMT + 10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT + 10:00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT + 10:00) Port Moresby"
125
126
  Australia/Sydney: "(GMT + 10:00) Sydney"
126
127
  Asia/Vladivostok: "(GMT + 10:00) Vladivostok"
@@ -121,6 +121,7 @@ hi:
121
121
  Pacific/Guam: "(GMT+10:00) गुआम"
122
122
  Australia/Hobart: "(GMT+10:00) होबार्ट"
123
123
  Australia/Melbourne: "(GMT+10:00) कैनबरा, मेलबर्न"
124
+ Australia/Canberra: "(GMT+10:00) कैनबरा, मेलबर्न"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) पोर्ट मोरेस्बी"
125
126
  Australia/Sydney: "(GMT+10:00) सिडनी"
126
127
  Asia/Vladivostok: "(GMT+10:00) व्लादिवोस्तोक"
@@ -121,6 +121,7 @@ hr-HR:
121
121
  Pacific/Guam: "(GMT+10:00) Guam"
122
122
  Australia/Hobart: "(GMT+10:00) Hobart"
123
123
  Australia/Melbourne: "(GMT+10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT+10:00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Port Moresby"
125
126
  Australia/Sydney: "(GMT+10:00) Sydney"
126
127
  Asia/Vladivostok: "(GMT+10:00) Vladivostok"
@@ -121,6 +121,7 @@ hu:
121
121
  Pacific/Guam: "(GMT + 10: 00) Guam"
122
122
  Australia/Hobart: "(GMT + 10: 00) Hobart"
123
123
  Australia/Melbourne: "(GMT + 10: 00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT + 10: 00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT + 10: 00) Port Moresby"
125
126
  Australia/Sydney: "(GMT + 10: 00) Sydney"
126
127
  Asia/Vladivostok: "(GMT + 10: 00) Vlagyivosztok"
@@ -121,6 +121,7 @@ id:
121
121
  Pacific/Guam: "(GMT+10:00) Guam"
122
122
  Australia/Hobart: "(GMT+10:00) Hobart"
123
123
  Australia/Melbourne: "(GMT+10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT+10:00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Port Moresby"
125
126
  Australia/Sydney: "(GMT+10:00) Sydney"
126
127
  Asia/Vladivostok: "(GMT+10:00) Vladivostok"
@@ -121,6 +121,7 @@ it:
121
121
  Pacific/Guam: "(UTC+10:00) Guam"
122
122
  Australia/Hobart: "(UTC+10:00) Hobart"
123
123
  Australia/Melbourne: "(UTC+10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(UTC+10:00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(UTC+10:00) Port Moresby"
125
126
  Australia/Sydney: "(UTC+10:00) Sydney"
126
127
  Asia/Vladivostok: "(UTC+10:00) Vladivostok"
@@ -121,6 +121,7 @@ ja:
121
121
  Pacific/Guam: "(GMT+10:00) グアム"
122
122
  Australia/Hobart: "(GMT+10:00) ホバート"
123
123
  Australia/Melbourne: "(GMT+10:00) キャンベラ、メルボルン"
124
+ Australia/Canberra: "(GMT+10:00) キャンベラ、メルボルン"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) ポートモレスビー"
125
126
  Australia/Sydney: "(GMT+10:00) シドニー"
126
127
  Asia/Vladivostok: "(GMT+10:00) ウラジオストク"
@@ -121,6 +121,7 @@ ko:
121
121
  Pacific/Guam: "(GMT + 10 : 00) 괌"
122
122
  Australia/Hobart: "(GMT + 10 : 00) 호바트"
123
123
  Australia/Melbourne: "(GMT + 10 : 00) 캔버라, 멜버른"
124
+ Australia/Canberra: "(GMT + 10 : 00) 캔버라, 멜버른"
124
125
  Pacific/Port_Moresby: "(GMT + 10 : 00) 포트모르즈비"
125
126
  Australia/Sydney: "(GMT + 10 : 00) 시드니"
126
127
  Asia/Vladivostok: "(GMT + 10 : 00) 블라디보스토크"
@@ -121,6 +121,7 @@ lt-LT:
121
121
  Pacific/Guam: "(GMT+10:00) Guamas"
122
122
  Australia/Hobart: "(GMT+10:00) Hobartas"
123
123
  Australia/Melbourne: "(GMT+10:00) Kanbera, Melburnas"
124
+ Australia/Canberra: "(GMT+10:00) Kanbera, Melburnas"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Port Morsbis"
125
126
  Australia/Sydney: "(GMT+10:00) Sidnėjus"
126
127
  Asia/Vladivostok: "(GMT+10:00) Vladivostokas"
@@ -121,6 +121,7 @@ nb:
121
121
  Pacific/Guam: "(GMT+10:00) Guam"
122
122
  Australia/Hobart: "(GMT+10:00) Hobart"
123
123
  Australia/Melbourne: "(GMT+10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT+10:00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Port Moresby"
125
126
  Australia/Sydney: "(GMT+10:00) Sydney"
126
127
  Asia/Vladivostok: "(GMT+10:00) Vladivostok"
@@ -121,6 +121,7 @@ nl:
121
121
  Pacific/Guam: "(GMT + 10: 00) Guam"
122
122
  Australia/Hobart: "(GMT + 10: 00) Hobart"
123
123
  Australia/Melbourne: "(GMT+10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT+10:00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Port Moresby"
125
126
  Australia/Sydney: "(GMT+10:00) Sydney"
126
127
  Asia/Vladivostok: "(GMT+10:00) Vladivostok"
@@ -121,6 +121,7 @@ pl:
121
121
  Pacific/Guam: "(GMT + 10: 00) Guam"
122
122
  Australia/Hobart: "(GMT + 10: 00) Hobart"
123
123
  Australia/Melbourne: "(GMT + 10: 00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT + 10: 00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT + 10: 00) Port Moresby"
125
126
  Australia/Sydney: "(GMT + 10: 00) Sydney"
126
127
  Asia/Vladivostok: "(GMT + 10: 00) Władywostok"
@@ -121,6 +121,7 @@ pt-BR:
121
121
  Pacific/Guam: "(GMT+10:00) Guam"
122
122
  Australia/Hobart: "(GMT+10:00) Hobart"
123
123
  Australia/Melbourne: "(GMT+10:00) Camberra, Melbourne"
124
+ Australia/Canberra: "(GMT+10:00) Camberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Port Moresby"
125
126
  Australia/Sydney: "(GMT+10:00) Sydney"
126
127
  Asia/Vladivostok: "(GMT+10:00) Vladivostok"
@@ -121,6 +121,7 @@ pt-PT:
121
121
  Pacific/Guam: "(GMT+10:00) Guam"
122
122
  Australia/Hobart: "(GMT+10:00) Hobart"
123
123
  Australia/Melbourne: "(GMT+10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT+10:00) Camberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Port Moresby"
125
126
  Australia/Sydney: "(GMT+10:00) Sydney"
126
127
  Asia/Vladivostok: "(GMT+10:00) Vladivostok"
@@ -121,6 +121,7 @@ ro-RO:
121
121
  Pacific/Guam: "(GMT+10:00) Guam"
122
122
  Australia/Hobart: "(GMT+10:00) Hobart"
123
123
  Australia/Melbourne: "(GMT+10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT+10:00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Port Moresby"
125
126
  Australia/Sydney: "(GMT+10:00) Sydney"
126
127
  Asia/Vladivostok: "(GMT+10:00) Vladivostok"
@@ -121,6 +121,7 @@ ru:
121
121
  Pacific/Guam: "(GMT+10:00) Гуам"
122
122
  Australia/Hobart: "(GMT+10:00) Хобарт"
123
123
  Australia/Melbourne: "(GMT+10:00) Канберра, Мельбурн"
124
+ Australia/Canberra: "(GMT+10:00) Канберра, Мельбурн"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Порт-Морсби"
125
126
  Australia/Sydney: "(GMT+10:00) Сидней"
126
127
  Asia/Vladivostok: "(GMT+10:00) Владивосток"
@@ -121,6 +121,7 @@ sk-SK:
121
121
  Pacific/Guam: "(GMT+10:00) Guam"
122
122
  Australia/Hobart: "(GMT+10:00) Hobart"
123
123
  Australia/Melbourne: "(GMT+10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT+10:00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Port Moresby"
125
126
  Australia/Sydney: "(GMT+10:00) Sydney"
126
127
  Asia/Vladivostok: "(GMT+10:00) Vladivostok"
@@ -121,6 +121,7 @@ sl-SI:
121
121
  Pacific/Guam: "(GMT+10:00) Guam"
122
122
  Australia/Hobart: "(GMT+10:00) Hobart"
123
123
  Australia/Melbourne: "(GMT+10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT+10:00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Port Moresby"
125
126
  Australia/Sydney: "(GMT+10:00) Sydney"
126
127
  Asia/Vladivostok: "(GMT+10:00) Vladivostok"
@@ -121,6 +121,7 @@ sv:
121
121
  Pacific/Guam: "(GMT+10:00) Guam"
122
122
  Australia/Hobart: "(GMT+10:00) Hobart"
123
123
  Australia/Melbourne: "(GMT+10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT+10:00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Port Moresby"
125
126
  Australia/Sydney: "(GMT+10:00) Sydney"
126
127
  Asia/Vladivostok: "(GMT+10:00) Vladivostok"
@@ -121,6 +121,7 @@ th:
121
121
  Pacific/Guam: "(GMT+10:00) กวม"
122
122
  Australia/Hobart: "(GMT+10:00) โฮบาร์ต"
123
123
  Australia/Melbourne: "(GMT+10:00) แคนเบอร์รา, เมลเบิร์น"
124
+ Australia/Canberra: "(GMT+10:00) แคนเบอร์รา, เมลเบิร์น"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) พอร์ตมอร์สบี"
125
126
  Australia/Sydney: "(GMT+10:00) ซิดนีย์"
126
127
  Asia/Vladivostok: "(GMT+10:00) วลาดีวอสตอค"
@@ -121,6 +121,7 @@ tr:
121
121
  Pacific/Guam: "(GMT+10:00) Guam"
122
122
  Australia/Hobart: "(GMT+10:00) Hobart"
123
123
  Australia/Melbourne: "(GMT+10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT+10:00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Port Moresby"
125
126
  Australia/Sydney: "(GMT+10:00) Sidney"
126
127
  Asia/Vladivostok: "(GMT+10:00) Vladivostok"
@@ -121,6 +121,7 @@ vi:
121
121
  Pacific/Guam: "(GMT+10:00) Guam"
122
122
  Australia/Hobart: "(GMT+10:00) Hobart"
123
123
  Australia/Melbourne: "(GMT+10:00) Canberra, Melbourne"
124
+ Australia/Canberra: "(GMT+10:00) Canberra, Melbourne"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) Port Moresby"
125
126
  Australia/Sydney: "(GMT+10:00) Sydney"
126
127
  Asia/Vladivostok: "(GMT+10:00) Vladivostok"
@@ -121,6 +121,7 @@ zh-CN:
121
121
  Pacific/Guam: "(GMT+10:00) 关岛"
122
122
  Australia/Hobart: "(GMT+10:00) 霍巴特"
123
123
  Australia/Melbourne: "(GMT+10:00) 堪培拉、墨尔本"
124
+ Australia/Canberra: "(GMT+10:00) 堪培拉、墨尔本"
124
125
  Pacific/Port_Moresby: "(GMT+10:00) 莫尔兹比港"
125
126
  Australia/Sydney: "(GMT+10:00) 悉尼"
126
127
  Asia/Vladivostok: "(GMT+10:00) 符拉迪沃斯托克"
@@ -121,6 +121,7 @@ zh-TW:
121
121
  Pacific/Guam: "(格林威治標準時間加 10 個小時)關島"
122
122
  Australia/Hobart: "(格林威治標準時間加 10 個小時)霍巴特"
123
123
  Australia/Melbourne: "(格林威治標準時間加 10 個小時)坎培拉,墨爾本"
124
+ Australia/Canberra: "(格林威治標準時間加 10 個小時)坎培拉,墨爾本"
124
125
  Pacific/Port_Moresby: "(格林威治標準時間加 10 個小時)莫爾斯貝港"
125
126
  Australia/Sydney: "(格林威治標準時間加 10 個小時)雪梨"
126
127
  Asia/Vladivostok: "(格林威治標準時間加 10 個小時)海參崴"
@@ -14,6 +14,7 @@ zip_example: '1010'
14
14
  zip_regex: "^((AT?( |-)?)?[1-9]\\d{3})$"
15
15
  phone_number_prefix: 43
16
16
  building_number_required: true
17
+ building_number_may_be_in_address2: true
17
18
  languages:
18
19
  - de
19
20
  - en
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: Aruba
3
3
  code: AW
4
+ code_alternates:
5
+ - NL-AW
4
6
  tax: 0.03
5
7
  currency: AWG
6
8
  unit_system: metric
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: Aland Islands
3
3
  code: AX
4
+ code_alternates:
5
+ - FI-AX
6
+ - FI-01
4
7
  tax: 0.0
5
8
  unit_system: metric
6
9
  tax_name: VAT
@@ -5,6 +5,8 @@ name: Saint Barthélemy
5
5
  group: Central American Countries
6
6
  group_name: Central America
7
7
  code: BL
8
+ code_alternates:
9
+ - FR-BL
8
10
  unit_system: metric
9
11
  tags:
10
12
  - EU-OCT
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: Caribbean Netherlands
3
3
  code: BQ
4
+ code_alternates:
5
+ - NL-BQ
4
6
  tax: 0.08
5
7
  currency: USD
6
8
  unit_system: metric
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: Curaçao
3
3
  code: CW
4
+ code_alternates:
5
+ - NL-CW
4
6
  tax: 0.06
5
7
  currency: ANG
6
8
  unit_system: metric
@@ -7,6 +7,9 @@ tax_name: VAT
7
7
  name_alternates:
8
8
  - French Guyana
9
9
  code: GF
10
+ code_alternates:
11
+ - FR-GF
12
+ - FR-973
10
13
  tags:
11
14
  - EU-OMR
12
15
  unit_system: metric
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: Guadeloupe
3
3
  code: GP
4
+ code_alternates:
5
+ - FR-GP
6
+ - FR-GUA
7
+ - FR-971
4
8
  tax: 0.085
5
9
  currency: EUR
6
10
  unit_system: metric
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: Hong Kong
3
3
  code: HK
4
+ code_alternates:
5
+ - CN-HK
6
+ - CN-91
4
7
  tax: 0.0
5
8
  currency: HKD
6
9
  unit_system: metric
@@ -788,6 +788,8 @@ zones:
788
788
  zip_prefixes:
789
789
  - '41'
790
790
  - name: Monza e Brianza
791
+ name_alternates:
792
+ - Monza e della Brianza
791
793
  code: MB
792
794
  tax: 0.0
793
795
  tax_name: VAT
@@ -1083,6 +1085,8 @@ zones:
1083
1085
  - '890'
1084
1086
  - '891'
1085
1087
  - name: Reggio Emilia
1088
+ name_alternates:
1089
+ - Reggion nell'Emilia
1086
1090
  code: RE
1087
1091
  tax: 0.0
1088
1092
  tax_name: VAT
@@ -26,6 +26,8 @@ languages:
26
26
  - ko
27
27
  zones:
28
28
  - name: Busan
29
+ name_alternates:
30
+ - 부산광역시
29
31
  code: KR-26
30
32
  iso_code: KR-26
31
33
  tax: 0.0
@@ -36,6 +38,8 @@ zones:
36
38
  - '48'
37
39
  - '49'
38
40
  - name: Chungbuk
41
+ name_alternates:
42
+ - 충청북도
39
43
  code: KR-43
40
44
  iso_code: KR-43
41
45
  tax: 0.0
@@ -45,6 +49,8 @@ zones:
45
49
  - '28'
46
50
  - '29'
47
51
  - name: Chungnam
52
+ name_alternates:
53
+ - 충청남도
48
54
  code: KR-44
49
55
  iso_code: KR-44
50
56
  tax: 0.0
@@ -54,6 +60,8 @@ zones:
54
60
  - '32'
55
61
  - '33'
56
62
  - name: Daegu
63
+ name_alternates:
64
+ - 대구광역시
57
65
  code: KR-27
58
66
  iso_code: KR-27
59
67
  tax: 0.0
@@ -63,6 +71,8 @@ zones:
63
71
  - '42'
64
72
  - '43'
65
73
  - name: Daejeon
74
+ name_alternates:
75
+ - 대전광역시
66
76
  code: KR-30
67
77
  iso_code: KR-30
68
78
  tax: 0.0
@@ -71,6 +81,8 @@ zones:
71
81
  - '34'
72
82
  - '35'
73
83
  - name: Gangwon
84
+ name_alternates:
85
+ - 강원도
74
86
  code: KR-42
75
87
  iso_code: KR-42
76
88
  tax: 0.0
@@ -80,6 +92,8 @@ zones:
80
92
  - '25'
81
93
  - '26'
82
94
  - name: Gwangju
95
+ name_alternates:
96
+ - 광주광역시
83
97
  code: KR-29
84
98
  iso_code: KR-29
85
99
  tax: 0.0
@@ -88,6 +102,8 @@ zones:
88
102
  - '61'
89
103
  - '62'
90
104
  - name: Gyeongbuk
105
+ name_alternates:
106
+ - 경상북도
91
107
  code: KR-47
92
108
  iso_code: KR-47
93
109
  tax: 0.0
@@ -99,13 +115,25 @@ zones:
99
115
  - '39'
100
116
  - '40'
101
117
  - name: Gyeonggi
118
+ name_alternates:
119
+ - 경기도
102
120
  code: KR-41
103
121
  iso_code: KR-41
104
122
  tax: 0.0
105
123
  tax_name: VAT
106
124
  zip_prefixes:
107
- - '1'
125
+ - '10'
126
+ - '11'
127
+ - '12'
128
+ - '13'
129
+ - '14'
130
+ - '15'
131
+ - '16'
132
+ - '17'
133
+ - '18'
108
134
  - name: Gyeongnam
135
+ name_alternates:
136
+ - 경상남도
109
137
  code: KR-48
110
138
  iso_code: KR-48
111
139
  tax: 0.0
@@ -116,6 +144,8 @@ zones:
116
144
  - '52'
117
145
  - '53'
118
146
  - name: Incheon
147
+ name_alternates:
148
+ - 인천광역시
119
149
  code: KR-28
120
150
  iso_code: KR-28
121
151
  tax: 0.0
@@ -125,6 +155,8 @@ zones:
125
155
  - '22'
126
156
  - '23'
127
157
  - name: Jeju
158
+ name_alternates:
159
+ - 제주특별자치도
128
160
  code: KR-49
129
161
  iso_code: KR-49
130
162
  tax: 0.0
@@ -132,6 +164,8 @@ zones:
132
164
  zip_prefixes:
133
165
  - '63'
134
166
  - name: Jeonbuk
167
+ name_alternates:
168
+ - 전라북도
135
169
  code: KR-45
136
170
  iso_code: KR-45
137
171
  tax: 0.0
@@ -141,6 +175,8 @@ zones:
141
175
  - '55'
142
176
  - '56'
143
177
  - name: Jeonnam
178
+ name_alternates:
179
+ - 전라남도
144
180
  code: KR-46
145
181
  iso_code: KR-46
146
182
  tax: 0.0
@@ -150,6 +186,8 @@ zones:
150
186
  - '58'
151
187
  - '59'
152
188
  - name: Sejong
189
+ name_alternates:
190
+ - 세종특별자치시
153
191
  code: KR-50
154
192
  iso_code: KR-50
155
193
  tax: 0.0
@@ -157,13 +195,25 @@ zones:
157
195
  zip_prefixes:
158
196
  - '30'
159
197
  - name: Seoul
198
+ name_alternates:
199
+ - 서울특별시
200
+ - 서울
160
201
  code: KR-11
161
202
  iso_code: KR-11
162
203
  tax: 0.0
163
204
  tax_name: VAT
164
205
  zip_prefixes:
165
- - '0'
206
+ - '01'
207
+ - '02'
208
+ - '03'
209
+ - '04'
210
+ - '05'
211
+ - '06'
212
+ - '07'
213
+ - '08'
166
214
  - name: Ulsan
215
+ name_alternates:
216
+ - 울산광역시
167
217
  code: KR-31
168
218
  iso_code: KR-31
169
219
  tax: 0.0
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: Saint Martin
3
3
  code: MF
4
+ code_alternates:
5
+ - FR-MF
4
6
  tax: 0.05
5
7
  currency: EUR
6
8
  unit_system: metric
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: Macao
3
3
  code: MO
4
+ code_alternates:
5
+ - CN-MO
6
+ - CN-92
4
7
  tax: 0.0
5
8
  currency: MOP
6
9
  unit_system: metric
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: Martinique
3
3
  code: MQ
4
+ code_alternates:
5
+ - FR-MQ
6
+ - FR-972
4
7
  tax: 0.085
5
8
  currency: EUR
6
9
  unit_system: metric
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: New Caledonia
3
3
  code: NC
4
+ code_alternates:
5
+ - FR-NC
4
6
  tax: 0.11
5
7
  currency: XPF
6
8
  unit_system: metric
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: French Polynesia
3
3
  code: PF
4
+ code_alternates:
5
+ - FR-PF
4
6
  tax: 0.16
5
7
  tax_name: VAT
6
8
  currency: XPF
@@ -4,6 +4,8 @@ name: Saint Pierre And Miquelon
4
4
  group: Central American Countries
5
5
  group_name: Central America
6
6
  code: PM
7
+ code_alternates:
8
+ - FR-PM
7
9
  unit_system: metric
8
10
  currency: EUR
9
11
  tags:
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: Reunion
3
3
  code: RE
4
+ code_alternates:
5
+ - FR-RE
6
+ - FR-LRE
7
+ - FR-974
4
8
  tax: 0.085
5
9
  tax_name: TVA
6
10
  tax_inclusive: true
@@ -5,6 +5,8 @@ name: Svalbard And Jan Mayen
5
5
  group: European Countries
6
6
  group_name: Europe
7
7
  code: SJ
8
+ code_alternates:
9
+ - "NO-SJ"
8
10
  unit_system: metric
9
11
  currency: NOK
10
12
  zip_example: '9170'
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: Sint Maarten
3
3
  code: SX
4
+ code_alternates:
5
+ - NL-SX
4
6
  tax: 0.05
5
7
  currency: ANG
6
8
  unit_system: metric
@@ -4,6 +4,8 @@ name: French Southern Territories
4
4
  group: Other Countries
5
5
  group_name: Other
6
6
  code: TF
7
+ code_alternates:
8
+ - FR-TF
7
9
  tags:
8
10
  - EU-OCT
9
11
  # There are military, research, and support staff in TF, but no permanently settled inhabitants.
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: Taiwan
3
3
  code: TW
4
+ code_alternates:
5
+ - CN-TW
6
+ - CN-71
4
7
  tax: 0.05
5
8
  currency: TWD
6
9
  unit_system: metric
@@ -4,6 +4,8 @@ name: United States Minor Outlying Islands
4
4
  group: Central American Countries
5
5
  group_name: Central America
6
6
  code: UM
7
+ code_alternates:
8
+ - US-UM
7
9
  inhabited: false
8
10
  unit_system: metric
9
11
  currency: USD
@@ -75,6 +75,8 @@ zones:
75
75
  example_city_zip: '96799'
76
76
  tax_name: State Tax
77
77
  code: AS
78
+ code_alternates:
79
+ - US-AS
78
80
  iso_code: AS
79
81
  zip_prefixes:
80
82
  - '96799'
@@ -395,6 +397,8 @@ zones:
395
397
  example_city_zip: '96929'
396
398
  tax_name: State Tax
397
399
  code: GU
400
+ code_alternates:
401
+ - US-GU
398
402
  iso_code: GU
399
403
  zip_prefixes:
400
404
  - '9691'
@@ -1167,6 +1171,8 @@ zones:
1167
1171
  example_city_zip: '96950'
1168
1172
  tax_name: State Tax
1169
1173
  code: MP
1174
+ code_alternates:
1175
+ - US-MP
1170
1176
  iso_code: MP
1171
1177
  zip_prefixes:
1172
1178
  # Valid postal codes in MP are 96950, 96951, 96952
@@ -1359,6 +1365,8 @@ zones:
1359
1365
  example_city_zip: '00717'
1360
1366
  tax_name: State Tax
1361
1367
  code: PR
1368
+ code_alternates:
1369
+ - US-PR
1362
1370
  iso_code: PR
1363
1371
  zip_prefixes:
1364
1372
  - '006'
@@ -1724,6 +1732,8 @@ zones:
1724
1732
  example_city_zip: '00802'
1725
1733
  tax_name: State Tax
1726
1734
  code: VI
1735
+ code_alternates:
1736
+ - US-VI
1727
1737
  iso_code: VI
1728
1738
  zip_prefixes:
1729
1739
  - '008'
@@ -6,6 +6,8 @@ name: Wallis And Futuna
6
6
  group: Oceanian Countries
7
7
  group_name: Oceania
8
8
  code: WF
9
+ code_alternates:
10
+ - FR-WF
9
11
  unit_system: metric
10
12
  tags:
11
13
  - EU-OCT
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: Mayotte
3
3
  code: YT
4
+ code_alternates:
5
+ - FR-YT
6
+ - FR-MAY
7
+ - FR-976
4
8
  tax: 0.0
5
9
  tax_inclusive: true
6
10
  currency: EUR
@@ -272,6 +272,17 @@ module Worldwide
272
272
  parent_country
273
273
  end
274
274
 
275
+ def associated_continent
276
+ return self if continent?
277
+
278
+ parents.each do |parent|
279
+ candidate = parent.associated_continent
280
+ return candidate unless candidate.nil?
281
+ end
282
+
283
+ nil
284
+ end
285
+
275
286
  # The value with which to autofill the zip, if this region has zip autofill active;
276
287
  # otherwise, nil.
277
288
  def autofill_zip
@@ -92,6 +92,7 @@ module Worldwide
92
92
  region.building_number_required = spec["building_number_required"] || true
93
93
  region.building_number_may_be_in_address2 = spec["building_number_may_be_in_address2"] || false
94
94
  currency_code = spec["currency"]
95
+ region.code_alternates = spec["code_alternates"] || []
95
96
  region.currency = Worldwide.currency(code: currency_code) unless currency_code.nil?
96
97
  region.flag = spec["emoji"]
97
98
  region.format = spec["format"]
@@ -10,10 +10,12 @@ module Worldwide
10
10
  discovered_scripts = []
11
11
 
12
12
  script_regexes = {
13
- "Latn": "[A-Za-z\uFF21-\uFF3A\uFF41-\uFF5A]",
13
+ "Arabic": "\\p{Arabic}",
14
+ "Latn": "\\p{Latin}",
14
15
  "Han": "\\p{Han}",
15
- "Katakana": "\\p{Katakana}",
16
+ "Hangul": "\\p{Hangul}",
16
17
  "Hiragana": "\\p{Hiragana}",
18
+ "Katakana": "\\p{Katakana}",
17
19
  }
18
20
 
19
21
  script_regexes.each do |script, regex|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Worldwide
4
- VERSION = "0.4.0"
4
+ VERSION = "0.5.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: worldwide
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-08 00:00:00.000000000 Z
11
+ date: 2023-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport