addressing 0.3.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +2 -2
- data/data/country/bn-IN.json +17 -17
- data/data/country/bn.json +16 -16
- data/data/country/ca.json +6 -6
- data/data/country/chr.json +258 -0
- data/data/country/da.json +2 -2
- data/data/country/de-CH.json +1 -1
- data/data/country/dsb.json +258 -0
- data/data/country/el.json +1 -1
- data/data/country/en-001.json +7 -7
- data/data/country/en-AU.json +258 -0
- data/data/country/en-CA.json +3 -3
- data/data/country/en-MV.json +258 -0
- data/data/country/gd.json +258 -0
- data/data/country/he.json +2 -2
- data/data/country/hi-Latn.json +258 -0
- data/data/country/hi.json +3 -3
- data/data/country/hr.json +2 -2
- data/data/country/hsb.json +258 -0
- data/data/country/ig.json +258 -0
- data/data/country/it.json +5 -5
- data/data/country/kk.json +4 -4
- data/data/country/ko-KP.json +1 -1
- data/data/country/ko.json +1 -1
- data/data/country/kok.json +258 -0
- data/data/country/mk.json +2 -2
- data/data/country/mr.json +2 -2
- data/data/country/ms.json +1 -1
- data/data/country/nn.json +1 -1
- data/data/country/pcm.json +258 -0
- data/data/country/pt-PT.json +1 -1
- data/data/country/qu.json +258 -0
- data/data/country/ru-UA.json +6 -6
- data/data/country/ru.json +7 -7
- data/data/country/sr-Cyrl-BA.json +17 -17
- data/data/country/sr-Latn-BA.json +17 -17
- data/data/country/sv.json +1 -1
- data/data/country/sw-KE.json +13 -13
- data/data/country/ta.json +1 -1
- data/data/country/uk.json +1 -1
- data/data/country/yue-Hans.json +258 -0
- data/data/country/zh-Hant-HK.json +2 -2
- data/data/country/zh.json +1 -1
- data/data/subdivision/CN--04f2bf92fa38c06607ad8a68fc36bdc1107ea6b1.json +6 -6
- data/data/subdivision/CN--4894d4f187cc75f7b048914fc0fa0408e18e8bad.json +3 -3
- data/data/subdivision/CN--68aa195ad83f0be79ef72d8679a88093deded0d1.json +3 -3
- data/data/subdivision/CN--c1a32ce65700c13ccf65888ece4a898d998dd58c.json +1 -1
- data/data/subdivision/CN--ee4adef9be42a1ffc9d772b091c203a1336d422f.json +3 -3
- data/data/subdivision/KR--73f130c4099bceaa0ba69e7e283a7265abe28670.json +1 -1
- data/data/subdivision/TW-9a2f374fb1c944b3c0d9451b91d5f1f72c74f003.json +1 -1
- data/lib/addressing/country.rb +14 -13
- data/lib/addressing/version.rb +1 -1
- metadata +14 -2
data/data/country/zh.json
CHANGED
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"MK": "北马其顿",
|
|
36
36
|
"BJ": "贝宁",
|
|
37
37
|
"BE": "比利时",
|
|
38
|
+
"PE": "秘鲁",
|
|
38
39
|
"IS": "冰岛",
|
|
39
40
|
"PR": "波多黎各",
|
|
40
41
|
"PL": "波兰",
|
|
@@ -148,7 +149,6 @@
|
|
|
148
149
|
"MN": "蒙古",
|
|
149
150
|
"MS": "蒙特塞拉特",
|
|
150
151
|
"BD": "孟加拉国",
|
|
151
|
-
"PE": "秘鲁",
|
|
152
152
|
"FM": "密克罗尼西亚",
|
|
153
153
|
"MM": "缅甸",
|
|
154
154
|
"MD": "摩尔多瓦",
|
|
@@ -7,12 +7,6 @@
|
|
|
7
7
|
],
|
|
8
8
|
"locale": "zh-Hans",
|
|
9
9
|
"subdivisions": {
|
|
10
|
-
"Chenbei Xinqu": {
|
|
11
|
-
"local_code": "沈北新区"
|
|
12
|
-
},
|
|
13
|
-
"Shenhe Qu": {
|
|
14
|
-
"local_code": "沈河区"
|
|
15
|
-
},
|
|
16
10
|
"Dadong Qu": {
|
|
17
11
|
"local_code": "大东区"
|
|
18
12
|
},
|
|
@@ -35,6 +29,12 @@
|
|
|
35
29
|
"Liaozhong Xian": {
|
|
36
30
|
"local_code": "辽中县"
|
|
37
31
|
},
|
|
32
|
+
"Chenbei Xinqu": {
|
|
33
|
+
"local_code": "沈北新区"
|
|
34
|
+
},
|
|
35
|
+
"Shenhe Qu": {
|
|
36
|
+
"local_code": "沈河区"
|
|
37
|
+
},
|
|
38
38
|
"Sujiatun Qu": {
|
|
39
39
|
"local_code": "苏家屯区"
|
|
40
40
|
},
|
|
@@ -7,9 +7,6 @@
|
|
|
7
7
|
],
|
|
8
8
|
"locale": "zh-Hans",
|
|
9
9
|
"subdivisions": {
|
|
10
|
-
"Shenqiu Xian": {
|
|
11
|
-
"local_code": "沈丘县"
|
|
12
|
-
},
|
|
13
10
|
"Chuanhui Qu": {
|
|
14
11
|
"local_code": "川汇区"
|
|
15
12
|
},
|
|
@@ -28,6 +25,9 @@
|
|
|
28
25
|
"Shangshui Xian": {
|
|
29
26
|
"local_code": "商水县"
|
|
30
27
|
},
|
|
28
|
+
"Shenqiu Xian": {
|
|
29
|
+
"local_code": "沈丘县"
|
|
30
|
+
},
|
|
31
31
|
"Taikang Xian": {
|
|
32
32
|
"local_code": "太康县"
|
|
33
33
|
},
|
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
"Chunhua Xian": {
|
|
14
14
|
"local_code": "淳化县"
|
|
15
15
|
},
|
|
16
|
-
"Qian Xian": {
|
|
17
|
-
"local_code": "乾县"
|
|
18
|
-
},
|
|
19
16
|
"Jingyang Xian": {
|
|
20
17
|
"local_code": "泾阳县"
|
|
21
18
|
},
|
|
22
19
|
"Liquan Xian": {
|
|
23
20
|
"local_code": "礼泉县"
|
|
24
21
|
},
|
|
22
|
+
"Qian Xian": {
|
|
23
|
+
"local_code": "乾县"
|
|
24
|
+
},
|
|
25
25
|
"Qindu Qu": {
|
|
26
26
|
"local_code": "秦都区"
|
|
27
27
|
},
|
|
@@ -10,9 +10,6 @@
|
|
|
10
10
|
"Fuyu Xian": {
|
|
11
11
|
"local_code": "扶余县"
|
|
12
12
|
},
|
|
13
|
-
"Qian'an Xian": {
|
|
14
|
-
"local_code": "乾安县"
|
|
15
|
-
},
|
|
16
13
|
"Ningjiang Qu": {
|
|
17
14
|
"local_code": "宁江区"
|
|
18
15
|
},
|
|
@@ -20,6 +17,9 @@
|
|
|
20
17
|
"local_code": "前郭尔罗斯蒙古族自治县",
|
|
21
18
|
"local_name": "前郭尔罗斯县"
|
|
22
19
|
},
|
|
20
|
+
"Qian'an Xian": {
|
|
21
|
+
"local_code": "乾安县"
|
|
22
|
+
},
|
|
23
23
|
"Changling Xian": {
|
|
24
24
|
"local_code": "长岭县"
|
|
25
25
|
}
|
data/lib/addressing/country.rb
CHANGED
|
@@ -7,19 +7,20 @@ module Addressing
|
|
|
7
7
|
|
|
8
8
|
@@available_locales = [
|
|
9
9
|
"af", "am", "ar", "ar-LY", "ar-SA", "as", "az", "be", "bg", "bn",
|
|
10
|
-
"bn-IN", "bs", "ca", "cs", "cy", "da", "de", "de-AT", "de-CH",
|
|
11
|
-
"en", "en-001", "en-
|
|
12
|
-
"es-BO", "es-CL", "es-CO", "es-CR", "es-DO", "es-EC", "es-GT",
|
|
13
|
-
"es-MX", "es-NI", "es-PA", "es-PE", "es-PR", "es-PY", "es-SV",
|
|
14
|
-
"es-VE", "et", "eu", "fa", "fa-AF", "fi", "fil", "fr",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
10
|
+
"bn-IN", "bs", "ca", "chr", "cs", "cy", "da", "de", "de-AT", "de-CH",
|
|
11
|
+
"dsb", "el", "en", "en-001", "en-AU", "en-CA", "en-MV", "es", "es-419",
|
|
12
|
+
"es-AR", "es-BO", "es-CL", "es-CO", "es-CR", "es-DO", "es-EC", "es-GT",
|
|
13
|
+
"es-HN", "es-MX", "es-NI", "es-PA", "es-PE", "es-PR", "es-PY", "es-SV",
|
|
14
|
+
"es-US", "es-VE", "et", "eu", "fa", "fa-AF", "fi", "fil", "fr",
|
|
15
|
+
"fr-BE", "fr-CA", "ga", "gd", "gl", "gu", "he", "hi", "hi-Latn", "hr",
|
|
16
|
+
"hsb", "hu", "hy", "id", "ig", "is", "it", "ja", "ka", "kk", "km",
|
|
17
|
+
"ko", "ko-KP", "kok", "ky", "lo", "lt", "lv", "mk", "ml", "mn", "mr",
|
|
18
|
+
"ms", "my", "ne", "nl", "nn", "no", "or", "pa", "pcm", "pl", "ps",
|
|
19
|
+
"ps-PK", "pt", "pt-PT", "qu", "ro", "ro-MD", "ru", "ru-UA", "si", "sk",
|
|
19
20
|
"sl", "so", "sq", "sr", "sr-Cyrl-BA", "sr-Cyrl-ME", "sr-Cyrl-XK",
|
|
20
21
|
"sr-Latn", "sr-Latn-BA", "sr-Latn-ME", "sr-Latn-XK", "sv", "sw",
|
|
21
22
|
"sw-CD", "sw-KE", "ta", "te", "th", "tk", "tr", "uk", "ur", "ur-IN",
|
|
22
|
-
"uz", "vi", "yue", "zh", "zh-Hant", "zh-Hant-HK", "zu"
|
|
23
|
+
"uz", "vi", "yue", "yue-Hans", "zh", "zh-Hant", "zh-Hant-HK", "zu",
|
|
23
24
|
]
|
|
24
25
|
|
|
25
26
|
def get(country_code, locale = "en", fallback_locale = "en")
|
|
@@ -185,7 +186,7 @@ module Addressing
|
|
|
185
186
|
"HK" => ["HKG", "344", "HKD"],
|
|
186
187
|
"HM" => ["HMD", "334", "AUD"],
|
|
187
188
|
"HN" => ["HND", "340", "HNL"],
|
|
188
|
-
"HR" => ["HRV", "191", "
|
|
189
|
+
"HR" => ["HRV", "191", "EUR"],
|
|
189
190
|
"HT" => ["HTI", "332", "USD"],
|
|
190
191
|
"HU" => ["HUN", "348", "HUF"],
|
|
191
192
|
"IC" => [nil, nil, "EUR"],
|
|
@@ -291,7 +292,7 @@ module Addressing
|
|
|
291
292
|
"SI" => ["SVN", "705", "EUR"],
|
|
292
293
|
"SJ" => ["SJM", "744", "NOK"],
|
|
293
294
|
"SK" => ["SVK", "703", "EUR"],
|
|
294
|
-
"SL" => ["SLE", "694", "
|
|
295
|
+
"SL" => ["SLE", "694", "SLE"],
|
|
295
296
|
"SM" => ["SMR", "674", "EUR"],
|
|
296
297
|
"SN" => ["SEN", "686", "XOF"],
|
|
297
298
|
"SO" => ["SOM", "706", "SOS"],
|
|
@@ -365,7 +366,7 @@ module Addressing
|
|
|
365
366
|
# Gets the timezones.
|
|
366
367
|
#
|
|
367
368
|
# Note that a country can span more than one timezone.
|
|
368
|
-
# For example, Germany has [
|
|
369
|
+
# For example, Germany has ["Europe/Berlin", "Europe/Busingen"].
|
|
369
370
|
def timezones
|
|
370
371
|
@timezones ||= TZInfo::Country.get(@country_code).zone_identifiers
|
|
371
372
|
end
|
data/lib/addressing/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: addressing
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Robin van der Vleuten
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-02-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description:
|
|
14
14
|
email: robinvdvleuten@gmail.com
|
|
@@ -34,16 +34,20 @@ files:
|
|
|
34
34
|
- data/country/bn.json
|
|
35
35
|
- data/country/bs.json
|
|
36
36
|
- data/country/ca.json
|
|
37
|
+
- data/country/chr.json
|
|
37
38
|
- data/country/cs.json
|
|
38
39
|
- data/country/cy.json
|
|
39
40
|
- data/country/da.json
|
|
40
41
|
- data/country/de-AT.json
|
|
41
42
|
- data/country/de-CH.json
|
|
42
43
|
- data/country/de.json
|
|
44
|
+
- data/country/dsb.json
|
|
43
45
|
- data/country/el.json
|
|
44
46
|
- data/country/en-001.json
|
|
47
|
+
- data/country/en-AU.json
|
|
45
48
|
- data/country/en-CA.json
|
|
46
49
|
- data/country/en-GB.json
|
|
50
|
+
- data/country/en-MV.json
|
|
47
51
|
- data/country/en.json
|
|
48
52
|
- data/country/es-419.json
|
|
49
53
|
- data/country/es-AR.json
|
|
@@ -75,14 +79,18 @@ files:
|
|
|
75
79
|
- data/country/fr-CA.json
|
|
76
80
|
- data/country/fr.json
|
|
77
81
|
- data/country/ga.json
|
|
82
|
+
- data/country/gd.json
|
|
78
83
|
- data/country/gl.json
|
|
79
84
|
- data/country/gu.json
|
|
80
85
|
- data/country/he.json
|
|
86
|
+
- data/country/hi-Latn.json
|
|
81
87
|
- data/country/hi.json
|
|
82
88
|
- data/country/hr.json
|
|
89
|
+
- data/country/hsb.json
|
|
83
90
|
- data/country/hu.json
|
|
84
91
|
- data/country/hy.json
|
|
85
92
|
- data/country/id.json
|
|
93
|
+
- data/country/ig.json
|
|
86
94
|
- data/country/is.json
|
|
87
95
|
- data/country/it.json
|
|
88
96
|
- data/country/ja.json
|
|
@@ -91,6 +99,7 @@ files:
|
|
|
91
99
|
- data/country/km.json
|
|
92
100
|
- data/country/ko-KP.json
|
|
93
101
|
- data/country/ko.json
|
|
102
|
+
- data/country/kok.json
|
|
94
103
|
- data/country/ky.json
|
|
95
104
|
- data/country/lo.json
|
|
96
105
|
- data/country/lt.json
|
|
@@ -107,11 +116,13 @@ files:
|
|
|
107
116
|
- data/country/no.json
|
|
108
117
|
- data/country/or.json
|
|
109
118
|
- data/country/pa.json
|
|
119
|
+
- data/country/pcm.json
|
|
110
120
|
- data/country/pl.json
|
|
111
121
|
- data/country/ps-PK.json
|
|
112
122
|
- data/country/ps.json
|
|
113
123
|
- data/country/pt-PT.json
|
|
114
124
|
- data/country/pt.json
|
|
125
|
+
- data/country/qu.json
|
|
115
126
|
- data/country/ro-MD.json
|
|
116
127
|
- data/country/ro.json
|
|
117
128
|
- data/country/ru-UA.json
|
|
@@ -144,6 +155,7 @@ files:
|
|
|
144
155
|
- data/country/ur.json
|
|
145
156
|
- data/country/uz.json
|
|
146
157
|
- data/country/vi.json
|
|
158
|
+
- data/country/yue-Hans.json
|
|
147
159
|
- data/country/yue.json
|
|
148
160
|
- data/country/zh-Hant-HK.json
|
|
149
161
|
- data/country/zh-Hant.json
|