singleton-cldr-rb 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sgtn-cldr/cldr/localized_str.rb +2 -2
- data/lib/version.rb +1 -1
- data/spec/unit/plural_spec.rb +5 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b91a001d0788be280f84945bac1f5e6327efa6bf9c67accac2f8df6664060c6d
|
4
|
+
data.tar.gz: 48d1baad50a6c75ea35e400a784b60b526127725fed925bc25855049821906f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65c39bd1bb3735b8fb190461632643275ae3710d32fdb5c6a9501153166ec699663b81d73a320a6f653a663815c87844ad6cb2e10562e907bff306c87c8005e1
|
7
|
+
data.tar.gz: 730ae2390565731df54c5333f03bd158728ae4c9399e2d288a401b16d64bb5a6549f8ea2eac53c9cc7fb7129149f2943c325e128b4cd04a9c12ceab6c4a9ad3d
|
data/lib/version.rb
CHANGED
data/spec/unit/plural_spec.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
+
require 'twitter_cldr'
|
2
3
|
|
3
4
|
describe SgtnCldr do
|
4
5
|
describe "Plural" do
|
@@ -8,9 +9,10 @@ describe SgtnCldr do
|
|
8
9
|
end
|
9
10
|
|
10
11
|
it "Plural_num" do
|
11
|
-
str = 'there %<{ "cat_count": { "one": "is one cat", "other": "are %{cat_count} cats" } }> in the room'
|
12
|
-
expect(str.to_plural_s({ :cat_count => 1 })).to eq 'there is one cat in the room'
|
13
|
-
expect(str.to_plural_s({ :cat_count => 3 })).to eq 'there are 3 cats in the room'
|
12
|
+
str = 'there %<{ "cat_count": { "one": "is one cat", "few": "aaa", "many": "are many %{cat_count} cats", "other": "are %{cat_count} cats" } }> in the room'
|
13
|
+
expect(str.to_plural_s(:en, { :cat_count => 1 })).to eq 'there is one cat in the room'
|
14
|
+
expect(str.to_plural_s(:en, { :cat_count => 3 })).to eq 'there are 3 cats in the room'
|
15
|
+
puts str.to_plural_s(:ru, { :cat_count => 3 })
|
14
16
|
end
|
15
17
|
end
|
16
18
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: singleton-cldr-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- VMware G11n Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|