i18n-recursive-lookup 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4741778913476f974f60a0ac9c2a1640e769eefc
4
+ data.tar.gz: 3a6e8a2f805b27e969e7111bdc90eed3525dd694
5
+ SHA512:
6
+ metadata.gz: f1c87ce546bc78bee4cc008e29d312026a653161661b0aae56f50b0fe42a4675e4447727cf30511ad51bab79987dd1e53ac89abd207b486ff636d360dae1d816
7
+ data.tar.gz: 4407420135e851f25da46b337f343497ac53b042f389739b9d30938895a673a8df4c8e0d81cd0267837d2a9245d5e2a4f9c01a62f2b853817ffb902aea0620f0
@@ -1,5 +1,5 @@
1
1
  module I18n
2
2
  module RecursiveLookup
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
@@ -1,3 +1,6 @@
1
+ require 'active_support'
2
+ require 'active_support/core_ext'
3
+
1
4
  module I18n
2
5
  module Backend
3
6
  module RecursiveLookup
@@ -26,7 +29,7 @@ module I18n
26
29
  def deep_compile(locale, subject, options)
27
30
  if subject.is_a?(Hash)
28
31
  subject.each do |key, object|
29
- subject[key], had_to_compile_result = deep_compile(locale, object, options)
32
+ subject[key], _had_to_compile_result = deep_compile(locale, object, options)
30
33
  end
31
34
  else
32
35
  compile(locale, subject, options)
@@ -46,7 +49,13 @@ module I18n
46
49
  else
47
50
  token
48
51
  end
49
- end.join
52
+ end
53
+
54
+ result = (
55
+ result.second && (
56
+ result.second.is_a?(Array) || result.second.is_a?(Hash)
57
+ )
58
+ ) ? result.second : result.join
50
59
  else
51
60
  result = string
52
61
  end
metadata CHANGED
@@ -1,81 +1,100 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n-recursive-lookup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
5
- prerelease:
4
+ version: 0.0.5
6
5
  platform: ruby
7
6
  authors:
8
7
  - Octavian Neamtu
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-04-19 00:00:00.000000000 Z
11
+ date: 2015-05-20 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: i18n
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: activesupport
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
28
39
  - !ruby/object:Gem::Version
29
40
  version: '0'
30
41
  - !ruby/object:Gem::Dependency
31
42
  name: rake
32
43
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
44
  requirements:
35
- - - ! '>='
45
+ - - ">="
36
46
  - !ruby/object:Gem::Version
37
47
  version: '0'
38
48
  type: :development
39
49
  prerelease: false
40
50
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
51
  requirements:
43
- - - ! '>='
52
+ - - ">="
44
53
  - !ruby/object:Gem::Version
45
54
  version: '0'
46
55
  - !ruby/object:Gem::Dependency
47
56
  name: mocha
48
57
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
58
  requirements:
51
- - - ! '>='
59
+ - - ">="
52
60
  - !ruby/object:Gem::Version
53
61
  version: '0'
54
62
  type: :development
55
63
  prerelease: false
56
64
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
65
  requirements:
59
- - - ! '>='
66
+ - - ">="
60
67
  - !ruby/object:Gem::Version
61
68
  version: '0'
62
69
  - !ruby/object:Gem::Dependency
63
70
  name: test_declarative
64
71
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
72
  requirements:
67
- - - ! '>='
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: test-unit
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
68
88
  - !ruby/object:Gem::Version
69
89
  version: '0'
70
90
  type: :development
71
91
  prerelease: false
72
92
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
93
  requirements:
75
- - - ! '>='
94
+ - - ">="
76
95
  - !ruby/object:Gem::Version
77
96
  version: '0'
78
- description: ! 'Provides a backend to the i18n gem to allow a definition to contain
97
+ description: 'Provides a backend to the i18n gem to allow a definition to contain
79
98
  embedded references to other definitions by introducing the special embedded notation
80
99
  ${}. E.g. {foo: ''bar'', baz: ${foo}} will evaluate t(:baz) to ''bar''.'
81
100
  email:
@@ -88,27 +107,26 @@ files:
88
107
  - lib/i18n/backend/recursive_lookup.rb
89
108
  homepage: https://github.com/annkissam/i18n-recursive-lookup
90
109
  licenses: []
110
+ metadata: {}
91
111
  post_install_message:
92
112
  rdoc_options: []
93
113
  require_paths:
94
114
  - lib
95
115
  required_ruby_version: !ruby/object:Gem::Requirement
96
- none: false
97
116
  requirements:
98
- - - ! '>='
117
+ - - ">="
99
118
  - !ruby/object:Gem::Version
100
119
  version: '0'
101
120
  required_rubygems_version: !ruby/object:Gem::Requirement
102
- none: false
103
121
  requirements:
104
- - - ! '>='
122
+ - - ">="
105
123
  - !ruby/object:Gem::Version
106
124
  version: '0'
107
125
  requirements: []
108
- rubyforge_project: ! '[none]'
109
- rubygems_version: 1.8.24
126
+ rubyforge_project: "[none]"
127
+ rubygems_version: 2.2.3
110
128
  signing_key:
111
- specification_version: 3
129
+ specification_version: 4
112
130
  summary: Provides a backend to the i18n gem to allow translation definitions to reference
113
131
  other definitions
114
132
  test_files: []