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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9e5a95bd8f2da82b53bba5cf8ea787617bcbfc70663ebb124cd5a16e50973f9
4
- data.tar.gz: 4d3180e5294edcb8c72fbe05a8630459a3442e36433e00a56952ef382d7f8319
3
+ metadata.gz: b91a001d0788be280f84945bac1f5e6327efa6bf9c67accac2f8df6664060c6d
4
+ data.tar.gz: 48d1baad50a6c75ea35e400a784b60b526127725fed925bc25855049821906f7
5
5
  SHA512:
6
- metadata.gz: 66765a0919f7ef76981ca5928e0f924ba2028dbe78cfb7dae28eb5c3cd4a10db5ec0a2361cb09e2d25c15394a7847dd6f444ff30951d1eff0301bfbf8e9e488b
7
- data.tar.gz: edd68a4545d3cda9774b05eba0fa1d26151024d1304462bd9f22fc9cf884930d7474bf5c648bb4796cf1dc37b078f04340508417b63657ba56b21402bfef965d
6
+ metadata.gz: 65c39bd1bb3735b8fb190461632643275ae3710d32fdb5c6a9501153166ec699663b81d73a320a6f653a663815c87844ad6cb2e10562e907bff306c87c8005e1
7
+ data.tar.gz: 730ae2390565731df54c5333f03bd158728ae4c9399e2d288a401b16d64bb5a6549f8ea2eac53c9cc7fb7129149f2943c325e128b4cd04a9c12ceab6c4a9ad3d
@@ -1,6 +1,6 @@
1
1
 
2
2
  String.class_eval <<-LOCALIZE, __FILE__, __LINE__ + 1
3
- def to_plural_s(arg)
4
- self.localize % arg
3
+ def to_plural_s(locale, arg)
4
+ self.localize(locale) % arg
5
5
  end
6
6
  LOCALIZE
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
 
2
- VERSION_INFO = [0, 0, 3].freeze
2
+ VERSION_INFO = [0, 0, 4].freeze
3
3
  VERSION = VERSION_INFO.map(&:to_s).join('.').freeze
@@ -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.3
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-08 00:00:00.000000000 Z
11
+ date: 2021-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client