twitter_cldr 6.11.0 → 6.11.3
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/README.md +5 -5
- data/lib/twitter_cldr/formatters/numbers/rbnf/rule_set.rb +1 -1
- data/lib/twitter_cldr/resources/cldr_document_set.rb +9 -1
- data/lib/twitter_cldr/resources/loader.rb +3 -1
- data/lib/twitter_cldr/shared/currencies.rb +1 -1
- data/lib/twitter_cldr/version.rb +1 -1
- data/resources/locales/bo/calendars.yml +56 -56
- data/resources/locales/en/calendars.yml +75 -69
- data/resources/locales/en-001/calendars.yml +65 -59
- data/resources/locales/en-150/calendars.yml +65 -59
- data/resources/locales/en-AU/calendars.yml +4 -4
- data/resources/locales/en-CA/calendars.yml +61 -59
- data/resources/locales/en-GB/calendars.yml +7 -3
- data/resources/locales/en-IE/calendars.yml +65 -59
- data/resources/locales/en-IN/calendars.yml +65 -59
- data/resources/locales/en-NZ/calendars.yml +65 -59
- data/resources/locales/en-SG/calendars.yml +65 -59
- data/resources/locales/en-US/calendars.yml +75 -69
- data/resources/locales/en-ZA/calendars.yml +65 -59
- data/resources/locales/eo/calendars.yml +82 -82
- data/resources/locales/ga/calendars.yml +4 -4
- data/resources/locales/pt/calendars.yml +33 -33
- data/resources/locales/pt-PT/calendars.yml +19 -19
- data/resources/locales/ru/calendars.yml +7 -7
- data/resources/locales/xh/calendars.yml +14 -14
- data/resources/locales/zh-Hant/calendars.yml +4 -4
- data/resources/locales/zu/calendars.yml +1 -1
- data/spec/shared/calendar_spec.rb +17 -0
- data/spec/shared/currencies_spec.rb +2 -2
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca1b74d4a8067791e225230be2411329646c788634134e49ff94492a385e6687
|
4
|
+
data.tar.gz: 921204eea1fb84bcc4c469b3be205498419447d20b379eb5840ffcf19b5cfc7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fcb16b98a4c4348cf4edb718d4a970aa80f800993f5bdf7062bfda9e70a9f6a23eb9f1286bdb34c0c017a4f2903e4cd24caad418d0554a6f9f1e0c30f67214d
|
7
|
+
data.tar.gz: 1e87d5ad77478304b4fa2b1b87c41fc95b1546dfa7a3a30205af51f8bb9d53c15085c761dc43de91c7cf3059d9217e061943ddb0cf7fd44681f05c9e099c7c9f
|
data/README.md
CHANGED
@@ -71,7 +71,7 @@ If you're looking for a list of supported currencies, use the `TwitterCldr::Shar
|
|
71
71
|
TwitterCldr::Shared::Currencies.currency_codes # ["ADP", "AED", "AFA", "AFN", ... ]
|
72
72
|
|
73
73
|
# data for a specific currency code
|
74
|
-
TwitterCldr::Shared::Currencies.for_code("CAD") # {:currency=>:CAD, :name=>"Canadian
|
74
|
+
TwitterCldr::Shared::Currencies.for_code("CAD") # {:currency=>:CAD, :name=>"Canadian Dollar", :cldr_symbol=>"CA$", :symbol=>"$", :code_points=>[36]}
|
75
75
|
```
|
76
76
|
|
77
77
|
#### Short / Long Decimals
|
@@ -247,7 +247,7 @@ It's important to know that, even though any given format may not be available a
|
|
247
247
|
| Hmv | 12:20 GMT |
|
248
248
|
| M | 2 |
|
249
249
|
| MEd | Fri, 2/14 |
|
250
|
-
| MMM |
|
250
|
+
| MMM | Feb |
|
251
251
|
| MMMEd | Fri, Feb 14 |
|
252
252
|
| MMMMW | week 3 of February |
|
253
253
|
| MMMMd | February 14 |
|
@@ -602,7 +602,7 @@ postal_code.regexp # /(\d{5})(?:[ \-](\d{4}))?/
|
|
602
602
|
Get a sample of valid postal codes with the `#sample` method:
|
603
603
|
|
604
604
|
```ruby
|
605
|
-
postal_code.sample(5) # ["
|
605
|
+
postal_code.sample(5) # ["32934", "29974", "17881-2274", "67896", "26121"]
|
606
606
|
```
|
607
607
|
|
608
608
|
### Phone Codes
|
@@ -1073,7 +1073,7 @@ TwitterCldr.locale # will return :ru
|
|
1073
1073
|
|
1074
1074
|
## Compatibility
|
1075
1075
|
|
1076
|
-
TwitterCLDR is fully compatible with Ruby 2.
|
1076
|
+
TwitterCLDR is fully compatible with Ruby 2.3, 2.4, 2.5, 2.6, 2.7, 3.0, 3.1.
|
1077
1077
|
|
1078
1078
|
## Requirements
|
1079
1079
|
|
@@ -1106,6 +1106,6 @@ TwitterCLDR currently supports localization of certain textual objects in JavaSc
|
|
1106
1106
|
|
1107
1107
|
## License
|
1108
1108
|
|
1109
|
-
Copyright
|
1109
|
+
Copyright 2022 Twitter, Inc.
|
1110
1110
|
|
1111
1111
|
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
|
@@ -99,7 +99,7 @@ module TwitterCldr
|
|
99
99
|
# the base value divided by the LCD. Here we check to
|
100
100
|
# see if that's an integer, and if not, how close it is
|
101
101
|
# to being an integer.
|
102
|
-
temp_difference = numerator * BigDecimal
|
102
|
+
temp_difference = numerator * BigDecimal(rules[i].base_value) % least_common_multiple
|
103
103
|
|
104
104
|
# normalize the result of the above calculation: we want
|
105
105
|
# the numerator's distance from the CLOSEST multiple
|
@@ -62,7 +62,15 @@ module TwitterCldr
|
|
62
62
|
|
63
63
|
|
64
64
|
def self.join_xpaths(*paths)
|
65
|
-
paths.
|
65
|
+
segments = paths.flat_map { |a| a.chomp('/').split('/') }
|
66
|
+
segments = segments.each_with_object([]) do |segment, result|
|
67
|
+
if segment == '..'
|
68
|
+
result.pop
|
69
|
+
else
|
70
|
+
result << segment
|
71
|
+
end
|
72
|
+
end
|
73
|
+
segments.join('/')
|
66
74
|
end
|
67
75
|
|
68
76
|
attr_reader :path, :cldr_locale, :cldr_requirement
|
@@ -3,6 +3,8 @@
|
|
3
3
|
# Copyright 2012 Twitter, Inc
|
4
4
|
# http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
|
6
|
+
require 'yaml'
|
7
|
+
|
6
8
|
module TwitterCldr
|
7
9
|
module Resources
|
8
10
|
|
@@ -12,7 +14,7 @@ module TwitterCldr
|
|
12
14
|
|
13
15
|
class << self
|
14
16
|
def load_yaml(yaml, permitted_classes: [])
|
15
|
-
if
|
17
|
+
if Psych::VERSION >= '4'
|
16
18
|
YAML.safe_load(yaml, permitted_classes: permitted_classes)
|
17
19
|
else
|
18
20
|
YAML.safe_load(yaml, permitted_classes)
|
@@ -19,7 +19,7 @@ module TwitterCldr
|
|
19
19
|
if data
|
20
20
|
result = {
|
21
21
|
currency: currency_code,
|
22
|
-
name: data[:
|
22
|
+
name: data[:name],
|
23
23
|
cldr_symbol: data[:symbol] || currency_code.to_s,
|
24
24
|
symbol: data[:symbol] || currency_code.to_s,
|
25
25
|
code_points: (data[:symbol] || currency_code.to_s).unpack("U*")
|
data/lib/twitter_cldr/version.rb
CHANGED
@@ -71,13 +71,13 @@
|
|
71
71
|
:tue: མིག
|
72
72
|
:wed: ལྷག
|
73
73
|
:short:
|
74
|
-
:fri:
|
75
|
-
:mon:
|
76
|
-
:sat:
|
77
|
-
:sun:
|
78
|
-
:thu:
|
79
|
-
:tue:
|
80
|
-
:wed:
|
74
|
+
:fri: པ་སངས་
|
75
|
+
:mon: ཟླ་བ་
|
76
|
+
:sat: སྤེན་པ་
|
77
|
+
:sun: ཉི་མ་
|
78
|
+
:thu: ཕུར་བུ་
|
79
|
+
:tue: མིག་དམར་
|
80
|
+
:wed: ལྷག་པ་
|
81
81
|
:wide:
|
82
82
|
:fri: གཟའ་པ་སངས་
|
83
83
|
:mon: གཟའ་ཟླ་བ་
|
@@ -104,13 +104,13 @@
|
|
104
104
|
:tue: མིག
|
105
105
|
:wed: ལྷག
|
106
106
|
:short:
|
107
|
-
:fri:
|
108
|
-
:mon:
|
109
|
-
:sat:
|
110
|
-
:sun:
|
111
|
-
:thu:
|
112
|
-
:tue:
|
113
|
-
:wed:
|
107
|
+
:fri: པ་སངས་
|
108
|
+
:mon: ཟླ་བ་
|
109
|
+
:sat: སྤེན་པ་
|
110
|
+
:sun: ཉི་མ་
|
111
|
+
:thu: ཕུར་བུ་
|
112
|
+
:tue: མིག་དམར་
|
113
|
+
:wed: ལྷག་པ་
|
114
114
|
:wide:
|
115
115
|
:fri: གཟའ་པ་སངས་
|
116
116
|
:mon: གཟའ་ཟླ་བ་
|
@@ -131,50 +131,50 @@
|
|
131
131
|
1: CE
|
132
132
|
:fields:
|
133
133
|
:day: ཉིན།
|
134
|
-
:day-narrow:
|
135
|
-
:day-short:
|
134
|
+
:day-narrow: ཉིན།
|
135
|
+
:day-short: ཉིན།
|
136
136
|
:dayOfYear: "Day Of Year"
|
137
137
|
:dayOfYear-narrow: "Day Of Year"
|
138
138
|
:dayOfYear-short: "Day Of Year"
|
139
139
|
:dayperiod: "སྔ་དྲོ། ཕྱི་དྲོ།"
|
140
|
-
:dayperiod-narrow:
|
141
|
-
:dayperiod-short:
|
140
|
+
:dayperiod-narrow: "སྔ་དྲོ། ཕྱི་དྲོ།"
|
141
|
+
:dayperiod-short: "སྔ་དྲོ། ཕྱི་དྲོ།"
|
142
142
|
:era: ལོ་རིམ།
|
143
|
-
:era-narrow:
|
144
|
-
:era-short:
|
143
|
+
:era-narrow: ལོ་རིམ།
|
144
|
+
:era-short: ལོ་རིམ།
|
145
145
|
:hour: ཆུ་ཚོད་
|
146
|
-
:hour-narrow:
|
147
|
-
:hour-short:
|
146
|
+
:hour-narrow: ཆུ་ཚོད་
|
147
|
+
:hour-short: ཆུ་ཚོད་
|
148
148
|
:minute: སྐར་མ།
|
149
|
-
:minute-narrow:
|
150
|
-
:minute-short:
|
149
|
+
:minute-narrow: སྐར་མ།
|
150
|
+
:minute-short: སྐར་མ།
|
151
151
|
:month: ཟླ་བ་
|
152
|
-
:month-narrow:
|
153
|
-
:month-short:
|
152
|
+
:month-narrow: ཟླ་བ་
|
153
|
+
:month-short: ཟླ་བ་
|
154
154
|
:quarter: Quarter
|
155
155
|
:quarter-narrow: Quarter
|
156
156
|
:quarter-short: Quarter
|
157
157
|
:second: སྐར་ཆ།
|
158
|
-
:second-narrow:
|
159
|
-
:second-short:
|
158
|
+
:second-narrow: སྐར་ཆ།
|
159
|
+
:second-short: སྐར་ཆ།
|
160
160
|
:week: གཟའ་འཁོར།
|
161
|
-
:week-narrow:
|
162
|
-
:week-short:
|
161
|
+
:week-narrow: གཟའ་འཁོར།
|
162
|
+
:week-short: གཟའ་འཁོར།
|
163
163
|
:weekOfMonth: "Week Of Month"
|
164
164
|
:weekOfMonth-narrow: "Week Of Month"
|
165
165
|
:weekOfMonth-short: "Week Of Month"
|
166
166
|
:weekday: གཟའ་འཁོར་གཅིག
|
167
|
-
:weekday-narrow:
|
168
|
-
:weekday-short:
|
167
|
+
:weekday-narrow: གཟའ་འཁོར་གཅིག
|
168
|
+
:weekday-short: གཟའ་འཁོར་གཅིག
|
169
169
|
:weekdayOfMonth: "Weekday Of Month"
|
170
170
|
:weekdayOfMonth-narrow: "Weekday Of Month"
|
171
171
|
:weekdayOfMonth-short: "Weekday Of Month"
|
172
172
|
:year: ལོ།
|
173
|
-
:year-narrow:
|
174
|
-
:year-short:
|
173
|
+
:year-narrow: ལོ།
|
174
|
+
:year-short: ལོ།
|
175
175
|
:zone: དུས་ཚོད།
|
176
|
-
:zone-narrow:
|
177
|
-
:zone-short:
|
176
|
+
:zone-narrow: དུས་ཚོད།
|
177
|
+
:zone-short: དུས་ཚོད།
|
178
178
|
:formats:
|
179
179
|
:date:
|
180
180
|
:full:
|
@@ -246,18 +246,18 @@
|
|
246
246
|
9: ཟླ་བ་དགུ་པ
|
247
247
|
:stand-alone:
|
248
248
|
:abbreviated:
|
249
|
-
1:
|
250
|
-
10:
|
251
|
-
11:
|
252
|
-
12:
|
253
|
-
2:
|
254
|
-
3:
|
255
|
-
4:
|
256
|
-
5:
|
257
|
-
6:
|
258
|
-
7:
|
259
|
-
8:
|
260
|
-
9:
|
249
|
+
1: ཟླ་༡
|
250
|
+
10: ཟླ་༡༠
|
251
|
+
11: ཟླ་༡༡
|
252
|
+
12: ཟླ་༡༢
|
253
|
+
2: ཟླ་༢
|
254
|
+
3: ཟླ་༣
|
255
|
+
4: ཟླ་༤
|
256
|
+
5: ཟླ་༥
|
257
|
+
6: ཟླ་༦
|
258
|
+
7: ཟླ་༧
|
259
|
+
8: ཟླ་༨
|
260
|
+
9: ཟླ་༩
|
261
261
|
:narrow:
|
262
262
|
1: "1"
|
263
263
|
10: "10"
|
@@ -290,21 +290,21 @@
|
|
290
290
|
:am: སྔ་དྲོ་
|
291
291
|
:pm: ཕྱི་དྲོ་
|
292
292
|
:narrow:
|
293
|
-
:am:
|
294
|
-
:pm:
|
293
|
+
:am: སྔ་དྲོ་
|
294
|
+
:pm: ཕྱི་དྲོ་
|
295
295
|
:wide:
|
296
296
|
:am: སྔ་དྲོ་
|
297
297
|
:pm: ཕྱི་དྲོ་
|
298
298
|
:stand-alone:
|
299
299
|
:abbreviated:
|
300
|
-
:am:
|
301
|
-
:pm:
|
300
|
+
:am: སྔ་དྲོ་
|
301
|
+
:pm: ཕྱི་དྲོ་
|
302
302
|
:narrow:
|
303
|
-
:am:
|
304
|
-
:pm:
|
303
|
+
:am: སྔ་དྲོ་
|
304
|
+
:pm: ཕྱི་དྲོ་
|
305
305
|
:wide:
|
306
|
-
:am:
|
307
|
-
:pm:
|
306
|
+
:am: སྔ་དྲོ་
|
307
|
+
:pm: ཕྱི་དྲོ་
|
308
308
|
:quarters:
|
309
309
|
:format:
|
310
310
|
:abbreviated:
|
@@ -103,21 +103,21 @@
|
|
103
103
|
:tue: T
|
104
104
|
:wed: W
|
105
105
|
:short:
|
106
|
-
:fri:
|
107
|
-
:mon:
|
108
|
-
:sat:
|
109
|
-
:sun:
|
110
|
-
:thu:
|
111
|
-
:tue:
|
112
|
-
:wed:
|
106
|
+
:fri: Fr
|
107
|
+
:mon: Mo
|
108
|
+
:sat: Sa
|
109
|
+
:sun: Su
|
110
|
+
:thu: Th
|
111
|
+
:tue: Tu
|
112
|
+
:wed: We
|
113
113
|
:wide:
|
114
|
-
:fri:
|
115
|
-
:mon:
|
116
|
-
:sat:
|
117
|
-
:sun:
|
118
|
-
:thu:
|
119
|
-
:tue:
|
120
|
-
:wed:
|
114
|
+
:fri: Friday
|
115
|
+
:mon: Monday
|
116
|
+
:sat: Saturday
|
117
|
+
:sun: Sunday
|
118
|
+
:thu: Thursday
|
119
|
+
:tue: Tuesday
|
120
|
+
:wed: Wednesday
|
121
121
|
:eras:
|
122
122
|
:abbr:
|
123
123
|
0: BCE
|
@@ -130,49 +130,49 @@
|
|
130
130
|
1: A
|
131
131
|
:fields:
|
132
132
|
:day: day
|
133
|
-
:day-narrow:
|
133
|
+
:day-narrow: day
|
134
134
|
:day-short: day
|
135
135
|
:dayOfYear: "day of year"
|
136
|
-
:dayOfYear-narrow: "
|
136
|
+
:dayOfYear-narrow: "day of yr."
|
137
137
|
:dayOfYear-short: "day of yr."
|
138
138
|
:dayperiod: AM/PM
|
139
|
-
:dayperiod-narrow:
|
139
|
+
:dayperiod-narrow: AM/PM
|
140
140
|
:dayperiod-short: AM/PM
|
141
141
|
:era: era
|
142
|
-
:era-narrow:
|
142
|
+
:era-narrow: era
|
143
143
|
:era-short: era
|
144
144
|
:hour: hour
|
145
|
-
:hour-narrow:
|
145
|
+
:hour-narrow: hr.
|
146
146
|
:hour-short: hr.
|
147
147
|
:minute: minute
|
148
|
-
:minute-narrow:
|
148
|
+
:minute-narrow: min.
|
149
149
|
:minute-short: min.
|
150
150
|
:month: month
|
151
|
-
:month-narrow:
|
151
|
+
:month-narrow: mo.
|
152
152
|
:month-short: mo.
|
153
153
|
:quarter: quarter
|
154
|
-
:quarter-narrow:
|
154
|
+
:quarter-narrow: qtr.
|
155
155
|
:quarter-short: qtr.
|
156
156
|
:second: second
|
157
|
-
:second-narrow:
|
157
|
+
:second-narrow: sec.
|
158
158
|
:second-short: sec.
|
159
159
|
:week: week
|
160
|
-
:week-narrow:
|
160
|
+
:week-narrow: wk.
|
161
161
|
:week-short: wk.
|
162
162
|
:weekOfMonth: "week of month"
|
163
|
-
:weekOfMonth-narrow: "
|
163
|
+
:weekOfMonth-narrow: "wk. of mo."
|
164
164
|
:weekOfMonth-short: "wk. of mo."
|
165
165
|
:weekday: "day of the week"
|
166
|
-
:weekday-narrow: "
|
166
|
+
:weekday-narrow: "day of wk."
|
167
167
|
:weekday-short: "day of wk."
|
168
168
|
:weekdayOfMonth: "weekday of the month"
|
169
|
-
:weekdayOfMonth-narrow: "
|
169
|
+
:weekdayOfMonth-narrow: "wkday. of mo."
|
170
170
|
:weekdayOfMonth-short: "wkday. of mo."
|
171
171
|
:year: year
|
172
|
-
:year-narrow:
|
172
|
+
:year-narrow: yr.
|
173
173
|
:year-short: yr.
|
174
174
|
:zone: "time zone"
|
175
|
-
:zone-narrow:
|
175
|
+
:zone-narrow: zone
|
176
176
|
:zone-short: zone
|
177
177
|
:formats:
|
178
178
|
:date:
|
@@ -218,18 +218,18 @@
|
|
218
218
|
8: Aug
|
219
219
|
9: Sep
|
220
220
|
:narrow:
|
221
|
-
1:
|
222
|
-
10:
|
223
|
-
11: "
|
224
|
-
12:
|
225
|
-
2:
|
226
|
-
3:
|
227
|
-
4:
|
228
|
-
5:
|
229
|
-
6:
|
230
|
-
7:
|
231
|
-
8:
|
232
|
-
9:
|
221
|
+
1: J
|
222
|
+
10: O
|
223
|
+
11: "N"
|
224
|
+
12: D
|
225
|
+
2: F
|
226
|
+
3: M
|
227
|
+
4: A
|
228
|
+
5: M
|
229
|
+
6: J
|
230
|
+
7: J
|
231
|
+
8: A
|
232
|
+
9: S
|
233
233
|
:wide:
|
234
234
|
1: January
|
235
235
|
10: October
|
@@ -245,18 +245,18 @@
|
|
245
245
|
9: September
|
246
246
|
:stand-alone:
|
247
247
|
:abbreviated:
|
248
|
-
1:
|
249
|
-
10:
|
250
|
-
11:
|
251
|
-
12:
|
252
|
-
2:
|
253
|
-
3:
|
254
|
-
4:
|
255
|
-
5:
|
256
|
-
6:
|
257
|
-
7:
|
258
|
-
8:
|
259
|
-
9:
|
248
|
+
1: Jan
|
249
|
+
10: Oct
|
250
|
+
11: Nov
|
251
|
+
12: Dec
|
252
|
+
2: Feb
|
253
|
+
3: Mar
|
254
|
+
4: Apr
|
255
|
+
5: May
|
256
|
+
6: Jun
|
257
|
+
7: Jul
|
258
|
+
8: Aug
|
259
|
+
9: Sep
|
260
260
|
:narrow:
|
261
261
|
1: J
|
262
262
|
10: O
|
@@ -271,18 +271,18 @@
|
|
271
271
|
8: A
|
272
272
|
9: S
|
273
273
|
:wide:
|
274
|
-
1:
|
275
|
-
10:
|
276
|
-
11:
|
277
|
-
12:
|
278
|
-
2:
|
279
|
-
3:
|
280
|
-
4:
|
281
|
-
5:
|
282
|
-
6:
|
283
|
-
7:
|
284
|
-
8:
|
285
|
-
9:
|
274
|
+
1: January
|
275
|
+
10: October
|
276
|
+
11: November
|
277
|
+
12: December
|
278
|
+
2: February
|
279
|
+
3: March
|
280
|
+
4: April
|
281
|
+
5: May
|
282
|
+
6: June
|
283
|
+
7: July
|
284
|
+
8: August
|
285
|
+
9: September
|
286
286
|
:periods:
|
287
287
|
:format:
|
288
288
|
:abbreviated:
|
@@ -329,7 +329,13 @@
|
|
329
329
|
:noon: noon
|
330
330
|
:pm: PM
|
331
331
|
:narrow:
|
332
|
+
:afternoon1: afternoon
|
332
333
|
:am: AM
|
334
|
+
:evening1: evening
|
335
|
+
:midnight: midnight
|
336
|
+
:morning1: morning
|
337
|
+
:night1: night
|
338
|
+
:noon: noon
|
333
339
|
:pm: PM
|
334
340
|
:wide:
|
335
341
|
:afternoon1: afternoon
|
@@ -369,7 +375,7 @@
|
|
369
375
|
3: "3"
|
370
376
|
4: "4"
|
371
377
|
:wide:
|
372
|
-
1:
|
373
|
-
2:
|
374
|
-
3:
|
375
|
-
4:
|
378
|
+
1: "1st quarter"
|
379
|
+
2: "2nd quarter"
|
380
|
+
3: "3rd quarter"
|
381
|
+
4: "4th quarter"
|