twitter_cldr 6.11.0 → 6.11.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2208001cc0fddbd8fbf3d87a557fe1c124439b8dd1abd14b5515a915cefe288
4
- data.tar.gz: 564cdeb9423b2b055953ca9c755f93518e38d83d3895db6140593807c1e3aa05
3
+ metadata.gz: ca1b74d4a8067791e225230be2411329646c788634134e49ff94492a385e6687
4
+ data.tar.gz: 921204eea1fb84bcc4c469b3be205498419447d20b379eb5840ffcf19b5cfc7d
5
5
  SHA512:
6
- metadata.gz: 3db038bb6ec7c6d12181f5d7c087df93e18fbf7bda31642028e1f35b404072cf4cbabd7b1a993c7c6de24db9767193e80d2e5a6d77509d23ed9f6c19d4bfe31d
7
- data.tar.gz: 6e93f77989434c7e7b97cd8c2081dacf9de00803781737df787dac93b19b8f0460cfc326f9baaea2da2b2f9503b11ab131816569f22a826bc8f87acf5abb06d2
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 dollar", :cldr_symbol=>"CA$", :symbol=>"$", :code_points=>[36]}
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 | M02 |
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) # ["60668-3382", "36022", "22364-5670", "32142-1738", "32633-0502"]
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.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0.
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 2021 Twitter, Inc.
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.new(rules[i].base_value) % least_common_multiple
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.map { |a| a.chomp('/') }.join('/')
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 RUBY_VERSION >= '2.6.0'
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[:one],
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*")
@@ -4,5 +4,5 @@
4
4
  # http://www.apache.org/licenses/LICENSE-2.0
5
5
 
6
6
  module TwitterCldr
7
- VERSION = '6.11.0'
7
+ VERSION = '6.11.3'
8
8
  end
@@ -71,13 +71,13 @@
71
71
  :tue: མིག
72
72
  :wed: ལྷག
73
73
  :short:
74
- :fri: Fri
75
- :mon: Mon
76
- :sat: Sat
77
- :sun: Sun
78
- :thu: Thu
79
- :tue: Tue
80
- :wed: 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: Fri
108
- :mon: Mon
109
- :sat: Sat
110
- :sun: Sun
111
- :thu: Thu
112
- :tue: Tue
113
- :wed: 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: Day
135
- :day-short: Day
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: Dayperiod
141
- :dayperiod-short: Dayperiod
140
+ :dayperiod-narrow: "སྔ་དྲོ། ཕྱི་དྲོ།"
141
+ :dayperiod-short: "སྔ་དྲོ། ཕྱི་དྲོ།"
142
142
  :era: ལོ་རིམ།
143
- :era-narrow: Era
144
- :era-short: Era
143
+ :era-narrow: ལོ་རིམ།
144
+ :era-short: ལོ་རིམ།
145
145
  :hour: ཆུ་ཚོད་
146
- :hour-narrow: Hour
147
- :hour-short: Hour
146
+ :hour-narrow: ཆུ་ཚོད་
147
+ :hour-short: ཆུ་ཚོད་
148
148
  :minute: སྐར་མ།
149
- :minute-narrow: Minute
150
- :minute-short: Minute
149
+ :minute-narrow: སྐར་མ།
150
+ :minute-short: སྐར་མ།
151
151
  :month: ཟླ་བ་
152
- :month-narrow: Month
153
- :month-short: Month
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: Second
159
- :second-short: Second
158
+ :second-narrow: སྐར་ཆ།
159
+ :second-short: སྐར་ཆ།
160
160
  :week: གཟའ་འཁོར།
161
- :week-narrow: Week
162
- :week-short: Week
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: "Day of the Week"
168
- :weekday-short: "Day of the Week"
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: Year
174
- :year-short: Year
173
+ :year-narrow: ལོ།
174
+ :year-short: ལོ།
175
175
  :zone: དུས་ཚོད།
176
- :zone-narrow: Zone
177
- :zone-short: Zone
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: M01
250
- 10: M10
251
- 11: M11
252
- 12: M12
253
- 2: M02
254
- 3: M03
255
- 4: M04
256
- 5: M05
257
- 6: M06
258
- 7: M07
259
- 8: M08
260
- 9: M09
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: AM
294
- :pm: PM
293
+ :am: སྔ་དྲོ་
294
+ :pm: ཕྱི་དྲོ་
295
295
  :wide:
296
296
  :am: སྔ་དྲོ་
297
297
  :pm: ཕྱི་དྲོ་
298
298
  :stand-alone:
299
299
  :abbreviated:
300
- :am: AM
301
- :pm: PM
300
+ :am: སྔ་དྲོ་
301
+ :pm: ཕྱི་དྲོ་
302
302
  :narrow:
303
- :am: AM
304
- :pm: PM
303
+ :am: སྔ་དྲོ་
304
+ :pm: ཕྱི་དྲོ་
305
305
  :wide:
306
- :am: AM
307
- :pm: 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: Fri
107
- :mon: Mon
108
- :sat: Sat
109
- :sun: Sun
110
- :thu: Thu
111
- :tue: Tue
112
- :wed: 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: Fri
115
- :mon: Mon
116
- :sat: Sat
117
- :sun: Sun
118
- :thu: Thu
119
- :tue: Tue
120
- :wed: 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: Day
133
+ :day-narrow: day
134
134
  :day-short: day
135
135
  :dayOfYear: "day of year"
136
- :dayOfYear-narrow: "Day Of Year"
136
+ :dayOfYear-narrow: "day of yr."
137
137
  :dayOfYear-short: "day of yr."
138
138
  :dayperiod: AM/PM
139
- :dayperiod-narrow: Dayperiod
139
+ :dayperiod-narrow: AM/PM
140
140
  :dayperiod-short: AM/PM
141
141
  :era: era
142
- :era-narrow: Era
142
+ :era-narrow: era
143
143
  :era-short: era
144
144
  :hour: hour
145
- :hour-narrow: Hour
145
+ :hour-narrow: hr.
146
146
  :hour-short: hr.
147
147
  :minute: minute
148
- :minute-narrow: Minute
148
+ :minute-narrow: min.
149
149
  :minute-short: min.
150
150
  :month: month
151
- :month-narrow: Month
151
+ :month-narrow: mo.
152
152
  :month-short: mo.
153
153
  :quarter: quarter
154
- :quarter-narrow: Quarter
154
+ :quarter-narrow: qtr.
155
155
  :quarter-short: qtr.
156
156
  :second: second
157
- :second-narrow: Second
157
+ :second-narrow: sec.
158
158
  :second-short: sec.
159
159
  :week: week
160
- :week-narrow: Week
160
+ :week-narrow: wk.
161
161
  :week-short: wk.
162
162
  :weekOfMonth: "week of month"
163
- :weekOfMonth-narrow: "Week Of Month"
163
+ :weekOfMonth-narrow: "wk. of mo."
164
164
  :weekOfMonth-short: "wk. of mo."
165
165
  :weekday: "day of the week"
166
- :weekday-narrow: "Day of the Week"
166
+ :weekday-narrow: "day of wk."
167
167
  :weekday-short: "day of wk."
168
168
  :weekdayOfMonth: "weekday of the month"
169
- :weekdayOfMonth-narrow: "Weekday Of Month"
169
+ :weekdayOfMonth-narrow: "wkday. of mo."
170
170
  :weekdayOfMonth-short: "wkday. of mo."
171
171
  :year: year
172
- :year-narrow: Year
172
+ :year-narrow: yr.
173
173
  :year-short: yr.
174
174
  :zone: "time zone"
175
- :zone-narrow: Zone
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: "1"
222
- 10: "10"
223
- 11: "11"
224
- 12: "12"
225
- 2: "2"
226
- 3: "3"
227
- 4: "4"
228
- 5: "5"
229
- 6: "6"
230
- 7: "7"
231
- 8: "8"
232
- 9: "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: M01
249
- 10: M10
250
- 11: M11
251
- 12: M12
252
- 2: M02
253
- 3: M03
254
- 4: M04
255
- 5: M05
256
- 6: M06
257
- 7: M07
258
- 8: M08
259
- 9: M09
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: M01
275
- 10: M10
276
- 11: M11
277
- 12: M12
278
- 2: M02
279
- 3: M03
280
- 4: M04
281
- 5: M05
282
- 6: M06
283
- 7: M07
284
- 8: M08
285
- 9: M09
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: Q1
373
- 2: Q2
374
- 3: Q3
375
- 4: Q4
378
+ 1: "1st quarter"
379
+ 2: "2nd quarter"
380
+ 3: "3rd quarter"
381
+ 4: "4th quarter"