twitter_cldr 6.9.0 → 6.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +31 -28
- data/lib/twitter_cldr/formatters/numbers/rbnf/rule_set.rb +1 -1
- data/lib/twitter_cldr/resources/calendars_importer.rb +48 -46
- data/lib/twitter_cldr/resources/cldr_data_builder.rb +36 -0
- data/lib/twitter_cldr/resources/cldr_document_set.rb +157 -0
- data/lib/twitter_cldr/resources/cldr_dtd.rb +110 -0
- data/lib/twitter_cldr/resources/cldr_locale.rb +78 -0
- data/lib/twitter_cldr/resources/list_formats_importer.rb +1 -1
- data/lib/twitter_cldr/resources/loader.rb +18 -1
- data/lib/twitter_cldr/resources/number_formats_importer.rb +1 -1
- data/lib/twitter_cldr/resources/readme_renderer.rb +6 -2
- data/lib/twitter_cldr/resources/requirements/cldr_requirement.rb +12 -61
- data/lib/twitter_cldr/resources/territories_importer.rb +1 -1
- data/lib/twitter_cldr/resources/timezones_importer.rb +1 -1
- data/lib/twitter_cldr/resources/unicode_property_aliases_importer.rb +2 -0
- data/lib/twitter_cldr/resources/units_importer.rb +1 -1
- data/lib/twitter_cldr/resources.rb +8 -3
- data/lib/twitter_cldr/shared/calendar.rb +1 -1
- data/lib/twitter_cldr/version.rb +1 -1
- data/resources/locales/ar/calendars.yml +2 -1
- data/resources/locales/az/calendars.yml +2 -1
- data/resources/locales/be/calendars.yml +2 -1
- data/resources/locales/bg/calendars.yml +2 -1
- data/resources/locales/bn/calendars.yml +2 -1
- data/resources/locales/bo/calendars.yml +68 -36
- data/resources/locales/bs/calendars.yml +1 -0
- data/resources/locales/cy/calendars.yml +1 -0
- data/resources/locales/el/calendars.yml +2 -1
- data/resources/locales/en/calendars.yml +75 -54
- data/resources/locales/en-001/calendars.yml +65 -53
- data/resources/locales/en-150/calendars.yml +65 -53
- data/resources/locales/en-AU/calendars.yml +4 -0
- data/resources/locales/en-CA/calendars.yml +66 -58
- data/resources/locales/en-GB/calendars.yml +7 -0
- data/resources/locales/en-IE/calendars.yml +65 -53
- data/resources/locales/en-IN/calendars.yml +65 -53
- data/resources/locales/en-NZ/calendars.yml +65 -53
- data/resources/locales/en-SG/calendars.yml +65 -53
- data/resources/locales/en-US/calendars.yml +75 -54
- data/resources/locales/en-ZA/calendars.yml +65 -53
- data/resources/locales/eo/calendars.yml +88 -61
- data/resources/locales/es/calendars.yml +2 -1
- data/resources/locales/es-419/calendars.yml +2 -1
- data/resources/locales/es-AR/calendars.yml +2 -1
- data/resources/locales/es-CO/calendars.yml +2 -1
- data/resources/locales/es-MX/calendars.yml +2 -1
- data/resources/locales/es-US/calendars.yml +2 -1
- data/resources/locales/fil/calendars.yml +4 -3
- data/resources/locales/ga/calendars.yml +4 -4
- data/resources/locales/gl/calendars.yml +2 -1
- data/resources/locales/hi/calendars.yml +2 -1
- data/resources/locales/hy/calendars.yml +4 -3
- data/resources/locales/ka/calendars.yml +2 -1
- data/resources/locales/kk/calendars.yml +2 -1
- data/resources/locales/km/calendars.yml +2 -1
- data/resources/locales/kn/calendars.yml +2 -1
- data/resources/locales/ko/calendars.yml +2 -1
- data/resources/locales/lo/calendars.yml +2 -1
- data/resources/locales/mk/calendars.yml +1 -1
- data/resources/locales/mr/calendars.yml +2 -1
- data/resources/locales/mt/calendars.yml +2 -1
- data/resources/locales/my/calendars.yml +2 -1
- data/resources/locales/pl/calendars.yml +2 -1
- data/resources/locales/pt/calendars.yml +35 -34
- data/resources/locales/pt-PT/calendars.yml +21 -20
- data/resources/locales/ru/calendars.yml +7 -7
- data/resources/locales/sk/calendars.yml +2 -1
- data/resources/locales/sl/calendars.yml +2 -1
- data/resources/locales/sr/calendars.yml +2 -0
- data/resources/locales/sr-Cyrl-ME/calendars.yml +3 -1
- data/resources/locales/sr-Latn-ME/calendars.yml +3 -1
- data/resources/locales/sw/calendars.yml +2 -1
- data/resources/locales/ta/calendars.yml +2 -1
- data/resources/locales/th/calendars.yml +1 -0
- data/resources/locales/tr/calendars.yml +2 -1
- data/resources/locales/ur/calendars.yml +2 -1
- data/resources/locales/xh/calendars.yml +46 -15
- data/resources/locales/zh-Hant/calendars.yml +4 -4
- data/resources/locales/zu/calendars.yml +3 -1
- data/spec/formatters/calendars/datetime_formatter_spec.rb +2 -2
- data/spec/localized/localized_array_spec.rb +3 -1
- data/spec/localized/localized_hash_spec.rb +1 -1
- data/spec/shared/calendar_spec.rb +25 -8
- data/spec/utils/yaml/yaml_spec.rb +2 -3
- metadata +7 -3
@@ -126,7 +126,8 @@
|
|
126
126
|
0: BCE
|
127
127
|
1: CE
|
128
128
|
:narrow:
|
129
|
-
0:
|
129
|
+
0: BCE
|
130
|
+
1: CE
|
130
131
|
:fields:
|
131
132
|
:day: Usuku
|
132
133
|
:day-narrow: Usuku
|
@@ -166,6 +167,7 @@
|
|
166
167
|
:weekday-short: "Usuku evikini"
|
167
168
|
:weekdayOfMonth: "usuku lwenyanga"
|
168
169
|
:weekdayOfMonth-narrow: "usuku lwenyanga"
|
170
|
+
:weekdayOfMonth-short: "usuku lwenyanga"
|
169
171
|
:year: Unyaka
|
170
172
|
:year-narrow: Unyaka
|
171
173
|
:year-short: Unyaka
|
@@ -444,8 +444,8 @@ describe TwitterCldr::Formatters::DateTimeFormatter do
|
|
444
444
|
end
|
445
445
|
|
446
446
|
it "pattern LLL" do
|
447
|
-
expect(@formatter.send(:month_stand_alone, Date.new(2010, 1, 1), 'LLL', 3)).to eq("Jan")
|
448
|
-
expect(@formatter.send(:month_stand_alone, Date.new(2010, 10, 1), 'LLL', 3)).to eq("Okt")
|
447
|
+
expect(@formatter.send(:month_stand_alone, Date.new(2010, 1, 1), 'LLL', 3)).to eq("Jan.")
|
448
|
+
expect(@formatter.send(:month_stand_alone, Date.new(2010, 10, 1), 'LLL', 3)).to eq("Okt.")
|
449
449
|
end
|
450
450
|
|
451
451
|
it "pattern LLLL" do
|
@@ -69,7 +69,9 @@ describe TwitterCldr::Localized::LocalizedArray do
|
|
69
69
|
describe "#to_yaml" do
|
70
70
|
it "should be able to successfully roundtrip the array" do
|
71
71
|
arr = [:foo, "bar", Object.new]
|
72
|
-
result =
|
72
|
+
result = TwitterCldr::Resources::Loader.load_yaml(
|
73
|
+
arr.localize.to_yaml, permitted_classes: [Object, Symbol]
|
74
|
+
)
|
73
75
|
|
74
76
|
expect(result[0]).to eq(:foo)
|
75
77
|
expect(result[1]).to eq("bar")
|
@@ -9,7 +9,7 @@ describe TwitterCldr::Localized::LocalizedHash do
|
|
9
9
|
describe "#to_yaml" do
|
10
10
|
it "should be able to successfully roundtrip the hash" do
|
11
11
|
hash = { foo: "bar", "string_key" => Object.new }
|
12
|
-
result =
|
12
|
+
result = TwitterCldr::Resources::Loader.load_yaml(hash.localize.to_yaml, permitted_classes: [Object, Symbol])
|
13
13
|
|
14
14
|
expect(result).to include(:foo)
|
15
15
|
expect(result).to include("string_key")
|
@@ -13,6 +13,7 @@ describe TwitterCldr::Shared::Calendar do
|
|
13
13
|
# clear cache for each test
|
14
14
|
described_class.send(:class_variable_set, :@@calendar_cache, {})
|
15
15
|
described_class.send(:class_variable_set, :@@field_cache, {})
|
16
|
+
described_class.send(:class_variable_set, :@@day_periods_cache, {})
|
16
17
|
end
|
17
18
|
|
18
19
|
before(:each) { clear_cache }
|
@@ -56,12 +57,28 @@ describe TwitterCldr::Shared::Calendar do
|
|
56
57
|
end
|
57
58
|
|
58
59
|
it 'supports abbreviated names form' do
|
59
|
-
expect(calendar.months(:abbreviated)).to eq(%w[Jan Feb
|
60
|
+
expect(calendar.months(:abbreviated)).to eq(%w[Jan. Feb. März Apr. Mai Juni Juli Aug. Sept. Okt. Nov. Dez.])
|
60
61
|
end
|
61
62
|
|
62
63
|
it 'returns nil if invalid names form is passed' do
|
63
64
|
expect(calendar.months(:wat)).to eq(nil)
|
64
65
|
end
|
66
|
+
|
67
|
+
context 'with English locale' do
|
68
|
+
let(:calendar) { described_class.new(:en) }
|
69
|
+
|
70
|
+
it 'supports wide names form' do
|
71
|
+
expect(calendar.months(:wide)).to eq(%w[January February March April May June July August September October November December])
|
72
|
+
end
|
73
|
+
|
74
|
+
it 'supports narrow names form' do
|
75
|
+
expect(calendar.months(:narrow)).to eq(%w[J F M A M J J A S O N D])
|
76
|
+
end
|
77
|
+
|
78
|
+
it 'supports abbreviated names form' do
|
79
|
+
expect(calendar.months(:abbreviated)).to eq(%w[Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec])
|
80
|
+
end
|
81
|
+
end
|
65
82
|
end
|
66
83
|
|
67
84
|
context 'when some data is missing' do
|
@@ -109,13 +126,13 @@ describe TwitterCldr::Shared::Calendar do
|
|
109
126
|
|
110
127
|
it 'supports abbreviated names form' do
|
111
128
|
expect(calendar.weekdays(:abbreviated)).to eq({
|
112
|
-
sun: 'So',
|
113
|
-
mon: 'Mo',
|
114
|
-
tue: 'Di',
|
115
|
-
wed: 'Mi',
|
116
|
-
thu: 'Do',
|
117
|
-
fri: 'Fr',
|
118
|
-
sat: 'Sa'
|
129
|
+
sun: 'So.',
|
130
|
+
mon: 'Mo.',
|
131
|
+
tue: 'Di.',
|
132
|
+
wed: 'Mi.',
|
133
|
+
thu: 'Do.',
|
134
|
+
fri: 'Fr.',
|
135
|
+
sat: 'Sa.'
|
119
136
|
})
|
120
137
|
end
|
121
138
|
|
@@ -345,7 +345,6 @@ describe TwitterCldr::Utils do
|
|
345
345
|
:foo,
|
346
346
|
1..10,
|
347
347
|
/abc\nxyz/i,
|
348
|
-
@struct,
|
349
348
|
@klass,
|
350
349
|
]
|
351
350
|
s.force_encoding("BINARY") if s.respond_to? :force_encoding
|
@@ -373,7 +372,7 @@ describe TwitterCldr::Utils do
|
|
373
372
|
obj
|
374
373
|
end
|
375
374
|
y = TwitterCldr::Utils::YAML.dump(src, syck_compatible: true)
|
376
|
-
r =
|
375
|
+
r = TwitterCldr::Resources::Loader.load_yaml(y, permitted_classes: [Date, Moo, Range, Regexp, Symbol, Time])
|
377
376
|
expect(src).to eq(r)
|
378
377
|
end
|
379
378
|
end
|
@@ -402,7 +401,7 @@ describe TwitterCldr::Utils do
|
|
402
401
|
{1=>-2, -1=>@gif, '_foo'=>'bar', 'ぬお-ぬお'=>321},
|
403
402
|
].each do |src|
|
404
403
|
y = TwitterCldr::Utils::YAML.dump(src, syck_compatible: true)
|
405
|
-
r =
|
404
|
+
r = TwitterCldr::Resources::Loader.load_yaml(y, permitted_classes: [Date, Range, Symbol, Time])
|
406
405
|
expect(src).to eq(r)
|
407
406
|
end
|
408
407
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitter_cldr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Dutro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: camertron-eprun
|
@@ -138,6 +138,10 @@ files:
|
|
138
138
|
- lib/twitter_cldr/resources/calendars_importer.rb
|
139
139
|
- lib/twitter_cldr/resources/casefolder.rb.erb
|
140
140
|
- lib/twitter_cldr/resources/casefolder_class_generator.rb
|
141
|
+
- lib/twitter_cldr/resources/cldr_data_builder.rb
|
142
|
+
- lib/twitter_cldr/resources/cldr_document_set.rb
|
143
|
+
- lib/twitter_cldr/resources/cldr_dtd.rb
|
144
|
+
- lib/twitter_cldr/resources/cldr_locale.rb
|
141
145
|
- lib/twitter_cldr/resources/collation_tests_importer.rb
|
142
146
|
- lib/twitter_cldr/resources/collation_tries_importer.rb
|
143
147
|
- lib/twitter_cldr/resources/currency_symbols_importer.rb
|
@@ -3998,7 +4002,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
3998
4002
|
- !ruby/object:Gem::Version
|
3999
4003
|
version: '0'
|
4000
4004
|
requirements: []
|
4001
|
-
rubygems_version: 3.
|
4005
|
+
rubygems_version: 3.3.3
|
4002
4006
|
signing_key:
|
4003
4007
|
specification_version: 4
|
4004
4008
|
summary: Ruby implementation of the ICU (International Components for Unicode) that
|