rails-i18nterface 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- C:-ActiveSupport::HashWithIndifferentAccess{I"article.key1:EF[I"app/models/article.rb;TI"article.key2;F[I"app/models/article.rb;TI"article.key3;F[I"app/models/article.rb;TI"article.key4;F[I"app/models/article.rb;TI"article.key5;F[I"app/models/article.rb;TI"category_html_erb.key1;F[I"+app/views/categories/category.html.erb;TI"category_erb.key1;F[I"&app/views/categories/category.erb;TI"category_rhtml.key1;F[I"(app/views/categories/category.rhtml;TI"
1
+ C:-ActiveSupport::HashWithIndifferentAccess{I"article.key1:EF[I"app/models/article.rb;FI"article.key2;F[I"app/models/article.rb;FI"article.key3;F[I"app/models/article.rb;FI"article.key4.zero;F[I"app/models/article.rb;FI"article.key4.one;F[@I"article.key4.other;F[@I"article.key5;F[I"app/models/article.rb;FI"article.key6.zero;F[I"app/models/article.rb;FI"article.key6.one;F[@I"article.key6.other;F[@I"category_erb.key1;F[I"&app/views/categories/category.erb;FI"category_html_erb.key1;F[I"+app/views/categories/category.html.erb;FI"category_rhtml.key1;F[I"(app/views/categories/category.rhtml;FI"
@@ -26,8 +26,13 @@ describe RailsI18nterface::Keys do
26
26
  'article.key1',
27
27
  'article.key2',
28
28
  'article.key3',
29
- 'article.key4',
29
+ 'article.key4.one',
30
+ 'article.key4.other',
31
+ 'article.key4.zero',
30
32
  'article.key5',
33
+ 'article.key6.one',
34
+ 'article.key6.other',
35
+ 'article.key6.zero',
31
36
  'category_erb.key1',
32
37
  'category_html_erb.key1',
33
38
  'category_rhtml.key1',
@@ -95,7 +100,7 @@ describe RailsI18nterface::Keys do
95
100
  :'home.signup' => 'app/views/home/_signup.rhtml',
96
101
  :'about.index.page_title' => 'app/views/about/index.rhtml'
97
102
  })
98
- @keys.missing_keys.size.should == 19
103
+ @keys.missing_keys.size.should == 24
99
104
  end
100
105
  end
101
106
 
@@ -30,7 +30,24 @@ describe RailsI18nterface::Sourcefiles do
30
30
  it 'extracts translatable string from code source' do
31
31
  x = RailsI18nterface::Sourcefiles.load_files(@root_dir)
32
32
  File.exists?(@cache_file).should be_true
33
- x.size.should == 19
33
+ x.size.should == 24
34
+ end
35
+
36
+ it 'populates from plural form when a :count is passed as param' do
37
+ file = File.join(@root_dir, 'app/models/article.rb')
38
+ keys = RailsI18nterface::Sourcefiles.populate_keys(@root_dir, file)
39
+ keys[:"article.key3.zero"].should == nil
40
+ keys[:"article.key4.zero"].should == ["app/models/article.rb"]
41
+ keys[:"article.key4.one"].should == ["app/models/article.rb"]
42
+ keys[:"article.key4.other"].should == ["app/models/article.rb"]
43
+ end
44
+
45
+ it 'populates from plural form when a :count => is passed as param' do
46
+ file = File.join(@root_dir, 'app/models/article.rb')
47
+ keys = RailsI18nterface::Sourcefiles.populate_keys(@root_dir, file)
48
+ keys[:"article.key6.zero"].should == ["app/models/article.rb"]
49
+ keys[:"article.key6.one"].should == ["app/models/article.rb"]
50
+ keys[:"article.key6.other"].should == ["app/models/article.rb"]
34
51
  end
35
52
 
36
53
  describe 'refreshing' do
@@ -49,7 +66,7 @@ describe RailsI18nterface::Sourcefiles do
49
66
  f.puts "<%= t('something') %>"
50
67
  end
51
68
  y = RailsI18nterface::Sourcefiles.refresh(@root_dir)
52
- y.size.should == 20
69
+ y.size.should == 25
53
70
  end
54
71
  end
55
72
 
metadata CHANGED
@@ -1,68 +1,60 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-i18nterface
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
5
- prerelease:
4
+ version: 0.2.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Mose
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-05-01 00:00:00.000000000 Z
11
+ date: 2013-05-07 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: railties
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 3.1.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
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: 3.1.0
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: 3.1.0
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: 3.1.0
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: tzinfo
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: 0.3.37
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: 0.3.37
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: combustion
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rspec
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
@@ -94,7 +83,6 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: rspec-rails
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ~>
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ~>
108
95
  - !ruby/object:Gem::Version
@@ -110,65 +97,57 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: capybara
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - '>='
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - '>='
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: simplecov
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
- - - ! '>='
115
+ - - '>='
132
116
  - !ruby/object:Gem::Version
133
117
  version: '0'
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
- - - ! '>='
122
+ - - '>='
140
123
  - !ruby/object:Gem::Version
141
124
  version: '0'
142
125
  - !ruby/object:Gem::Dependency
143
126
  name: metric_fu
144
127
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
128
  requirements:
147
- - - ! '>='
129
+ - - '>='
148
130
  - !ruby/object:Gem::Version
149
131
  version: '0'
150
132
  type: :development
151
133
  prerelease: false
152
134
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
135
  requirements:
155
- - - ! '>='
136
+ - - '>='
156
137
  - !ruby/object:Gem::Version
157
138
  version: '0'
158
139
  - !ruby/object:Gem::Dependency
159
140
  name: rubocop
160
141
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
142
  requirements:
163
- - - ! '>='
143
+ - - '>='
164
144
  - !ruby/object:Gem::Version
165
145
  version: '0'
166
146
  type: :development
167
147
  prerelease: false
168
148
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
149
  requirements:
171
- - - ! '>='
150
+ - - '>='
172
151
  - !ruby/object:Gem::Version
173
152
  version: '0'
174
153
  description: A rails engine adding an interface for translating and writing translation
@@ -182,106 +161,101 @@ files:
182
161
  - app/helpers/rails_i18nterface/application_helper.rb
183
162
  - app/helpers/rails_i18nterface/translate_helper.rb
184
163
  - app/views/layouts/rails_i18nterface/translate.html.erb
185
- - app/views/rails_i18nterface/translate/_namespaces.html.erb
186
164
  - app/views/rails_i18nterface/translate/index.html.erb
187
165
  - app/views/rails_i18nterface/translate/_pagination.html.erb
188
- - app/assets/javascripts/rails_i18nterface/ender.js
189
- - app/assets/javascripts/rails_i18nterface/base.js
166
+ - app/views/rails_i18nterface/translate/_namespaces.html.erb
167
+ - app/assets/stylesheets/rails_i18nterface/application.css
190
168
  - app/assets/javascripts/rails_i18nterface/application.js
191
169
  - app/assets/javascripts/rails_i18nterface/ender.min.js
192
- - app/assets/stylesheets/rails_i18nterface/application.css
170
+ - app/assets/javascripts/rails_i18nterface/ender.js
171
+ - app/assets/javascripts/rails_i18nterface/base.js
193
172
  - app/controllers/rails_i18nterface/application_controller.rb
194
173
  - app/controllers/rails_i18nterface/translate_controller.rb
195
174
  - config/routes.rb
175
+ - config/initializers/missing_translation.rb
176
+ - config/initializers/rails_i18nterface/missing_translation.rb
196
177
  - lib/tasks/rails-i18nterface.rake
197
- - lib/rails-i18nterface.rb
198
- - lib/rails-i18nterface/keys.rb
199
- - lib/rails-i18nterface/sourcefiles.rb
200
178
  - lib/rails-i18nterface/cache.rb
201
179
  - lib/rails-i18nterface/utils.rb
202
180
  - lib/rails-i18nterface/engine.rb
203
181
  - lib/rails-i18nterface/yamlfile.rb
204
182
  - lib/rails-i18nterface/version.rb
183
+ - lib/rails-i18nterface/keys.rb
184
+ - lib/rails-i18nterface/sourcefiles.rb
185
+ - lib/rails-i18nterface.rb
205
186
  - MIT-LICENSE
206
187
  - Rakefile
207
188
  - README.md
208
- - spec/internal/public/favicon.ico
209
- - spec/internal/app/views/categories/category.html
210
- - spec/internal/app/views/categories/category.html.erb
211
- - spec/internal/app/views/categories/category.rhtml
212
- - spec/internal/app/views/categories/category.erb
213
- - spec/internal/app/views/application/index.html.erb
189
+ - spec/spec_helper.rb
190
+ - spec/internal/log/test.log
214
191
  - spec/internal/app/models/article.rb
215
- - spec/internal/app/assets/javascripts/application.js
192
+ - spec/internal/app/views/application/index.html.erb
193
+ - spec/internal/app/views/categories/category.erb
194
+ - spec/internal/app/views/categories/category.rhtml
195
+ - spec/internal/app/views/categories/category.html.erb
196
+ - spec/internal/app/views/categories/category.html
216
197
  - spec/internal/app/assets/stylesheets/application.css
198
+ - spec/internal/app/assets/javascripts/application.js
217
199
  - spec/internal/app/controllers/application_controller.rb
218
- - spec/internal/log/test.log
219
- - spec/internal/tmp/translation_strings
220
- - spec/internal/config/routes.rb
221
200
  - spec/internal/config/database.yml
201
+ - spec/internal/config/routes.rb
202
+ - spec/internal/tmp/translation_strings
222
203
  - spec/internal/db/schema.rb
223
204
  - spec/internal/db/combustion_test.sqlite
224
- - spec/requests/search_spec.rb
205
+ - spec/internal/public/favicon.ico
206
+ - spec/lib/sourcefiles_spec.rb
207
+ - spec/lib/keys_spec.rb
225
208
  - spec/lib/utils_spec.rb
226
- - spec/lib/cache_spec.rb
227
209
  - spec/lib/yamlfile_spec.rb
228
- - spec/lib/keys_spec.rb
229
- - spec/lib/sourcefiles_spec.rb
230
- - spec/spec_helper.rb
210
+ - spec/lib/cache_spec.rb
211
+ - spec/requests/search_spec.rb
231
212
  - spec/controllers/translate_controller_spec.rb
232
213
  homepage: https://github.com/mose/rails-i18nterface
233
214
  licenses:
234
215
  - MIT
216
+ metadata: {}
235
217
  post_install_message:
236
218
  rdoc_options: []
237
219
  require_paths:
238
220
  - lib
239
221
  required_ruby_version: !ruby/object:Gem::Requirement
240
- none: false
241
222
  requirements:
242
- - - ! '>='
223
+ - - '>='
243
224
  - !ruby/object:Gem::Version
244
225
  version: '0'
245
- segments:
246
- - 0
247
- hash: 883125853
248
226
  required_rubygems_version: !ruby/object:Gem::Requirement
249
- none: false
250
227
  requirements:
251
- - - ! '>='
228
+ - - '>='
252
229
  - !ruby/object:Gem::Version
253
230
  version: '0'
254
- segments:
255
- - 0
256
- hash: 883125853
257
231
  requirements: []
258
232
  rubyforge_project:
259
- rubygems_version: 1.8.25
233
+ rubygems_version: 2.0.3
260
234
  signing_key:
261
- specification_version: 3
235
+ specification_version: 4
262
236
  summary: A rails engine for translating in a web page.
263
237
  test_files:
264
- - spec/internal/public/favicon.ico
265
- - spec/internal/app/views/categories/category.html
266
- - spec/internal/app/views/categories/category.html.erb
267
- - spec/internal/app/views/categories/category.rhtml
268
- - spec/internal/app/views/categories/category.erb
269
- - spec/internal/app/views/application/index.html.erb
238
+ - spec/spec_helper.rb
239
+ - spec/internal/log/test.log
270
240
  - spec/internal/app/models/article.rb
271
- - spec/internal/app/assets/javascripts/application.js
241
+ - spec/internal/app/views/application/index.html.erb
242
+ - spec/internal/app/views/categories/category.erb
243
+ - spec/internal/app/views/categories/category.rhtml
244
+ - spec/internal/app/views/categories/category.html.erb
245
+ - spec/internal/app/views/categories/category.html
272
246
  - spec/internal/app/assets/stylesheets/application.css
247
+ - spec/internal/app/assets/javascripts/application.js
273
248
  - spec/internal/app/controllers/application_controller.rb
274
- - spec/internal/log/test.log
275
- - spec/internal/tmp/translation_strings
276
- - spec/internal/config/routes.rb
277
249
  - spec/internal/config/database.yml
250
+ - spec/internal/config/routes.rb
251
+ - spec/internal/tmp/translation_strings
278
252
  - spec/internal/db/schema.rb
279
253
  - spec/internal/db/combustion_test.sqlite
280
- - spec/requests/search_spec.rb
254
+ - spec/internal/public/favicon.ico
255
+ - spec/lib/sourcefiles_spec.rb
256
+ - spec/lib/keys_spec.rb
281
257
  - spec/lib/utils_spec.rb
282
- - spec/lib/cache_spec.rb
283
258
  - spec/lib/yamlfile_spec.rb
284
- - spec/lib/keys_spec.rb
285
- - spec/lib/sourcefiles_spec.rb
286
- - spec/spec_helper.rb
259
+ - spec/lib/cache_spec.rb
260
+ - spec/requests/search_spec.rb
287
261
  - spec/controllers/translate_controller_spec.rb