r18n-rails-api 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/r18n-rails-api/loader.rb +1 -1
- data/spec/data/simple/de-CH.yml +2 -0
- data/spec/loader_spec.rb +5 -1
- data/spec/spec_helper.rb +3 -2
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ecdf047435737bcb5ad19884a4ff3104e8854cab
|
4
|
+
data.tar.gz: 5a41433226ad008c4446fc0320b89bf5218b04fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7389fa957747f362d4daaaed47ffca4cbc98f314353917bc7449ae69c198fe5858efd5fa0c2c14075b820166429edbadf867775056f2bb5ceb36ff98f10af109
|
7
|
+
data.tar.gz: cb406e2360208cc5e9450c61e0e5caf0120a86ceeef90c69a422268fb93e418f0b87b4858d7a5bbe7814f5ea465f18466615084ef8e294c552949231e4a62948
|
data/spec/loader_spec.rb
CHANGED
@@ -7,13 +7,17 @@ describe R18n::Loader::Rails do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
it "returns available locales" do
|
10
|
-
expect(@loader.available).to match_array([EN, RU])
|
10
|
+
expect(@loader.available).to match_array([DECH, EN, RU])
|
11
11
|
end
|
12
12
|
|
13
13
|
it "loads translation" do
|
14
14
|
expect(@loader.load(RU)).to eq({ 'one' => 'Один', 'two' => 'Два' })
|
15
15
|
end
|
16
16
|
|
17
|
+
it "loads translation for dialects" do
|
18
|
+
expect(@loader.load(DECH)).to eq({ 'a' => 1 })
|
19
|
+
end
|
20
|
+
|
17
21
|
it "changes pluralization" do
|
18
22
|
expect(@loader.load(EN)).to eq({
|
19
23
|
'users' => R18n::Typed.new('pl', {
|
data/spec/spec_helper.rb
CHANGED
@@ -6,8 +6,9 @@ I18n.enforce_available_locales = true
|
|
6
6
|
|
7
7
|
require File.join(File.dirname(__FILE__), '../lib/r18n-rails-api')
|
8
8
|
|
9
|
-
EN
|
10
|
-
RU
|
9
|
+
EN = R18n.locale(:en)
|
10
|
+
RU = R18n.locale(:ru)
|
11
|
+
DECH = R18n.locale(:'de-CH')
|
11
12
|
|
12
13
|
GENERAL = Dir.glob(File.join(File.dirname(__FILE__), 'data/general/*'))
|
13
14
|
SIMPLE = Dir.glob(File.join(File.dirname(__FILE__), 'data/simple/*'))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: r18n-rails-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Sitnik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: r18n-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.0.
|
19
|
+
version: 2.0.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.0.
|
26
|
+
version: 2.0.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: i18n
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -68,6 +68,7 @@ files:
|
|
68
68
|
- spec/data/other/en.yml
|
69
69
|
- spec/data/other/ru.yml
|
70
70
|
- spec/data/pl/ru.yml
|
71
|
+
- spec/data/simple/de-CH.yml
|
71
72
|
- spec/data/simple/en.yml
|
72
73
|
- spec/data/simple/ru.rb
|
73
74
|
- spec/data/simple/russian.yml
|
@@ -105,6 +106,7 @@ test_files:
|
|
105
106
|
- spec/data/other/en.yml
|
106
107
|
- spec/data/other/ru.yml
|
107
108
|
- spec/data/pl/ru.yml
|
109
|
+
- spec/data/simple/de-CH.yml
|
108
110
|
- spec/data/simple/en.yml
|
109
111
|
- spec/data/simple/ru.rb
|
110
112
|
- spec/data/simple/russian.yml
|