i18n-js 3.0.0.rc1 → 3.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.md +8 -2
- data/{lib → app/assets/javascripts}/i18n.js +1 -0
- data/app/assets/javascripts/i18n/translations.js.erb +1 -1
- data/lib/i18n/js/engine.rb +8 -10
- data/lib/i18n/js/version.rb +1 -1
- data/spec/js/currency.spec.js +1 -1
- data/spec/js/current_locale.spec.js +1 -1
- data/spec/js/dates.spec.js +1 -1
- data/spec/js/defaults.spec.js +1 -1
- data/spec/js/interpolation.spec.js +1 -1
- data/spec/js/localization.spec.js +1 -1
- data/spec/js/numbers.spec.js +1 -1
- data/spec/js/placeholder.spec.js +1 -1
- data/spec/js/pluralization.spec.js +1 -1
- data/spec/js/prepare_options.spec.js +1 -1
- data/spec/js/translate.spec.js +1 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -288,12 +288,18 @@ And use 2 spaces, not tabs. And don't touch the versioning thing.
|
|
288
288
|
|
289
289
|
You can run I18n tests using Node.js or your browser.
|
290
290
|
|
291
|
-
To use Node.js,
|
291
|
+
To use Node.js, install the `jasmine-node` library:
|
292
292
|
|
293
|
-
$
|
293
|
+
$ npm install jasmine-node -g
|
294
|
+
|
295
|
+
Then execute the following command from the lib's root directory:
|
296
|
+
|
297
|
+
$ jasmine-node spec/js
|
294
298
|
|
295
299
|
To run using your browser, just open the `spec/js/specs.html` file.
|
296
300
|
|
301
|
+
You can run both Ruby and JavaScript specs with `rake spec`.
|
302
|
+
|
297
303
|
## License
|
298
304
|
|
299
305
|
(The MIT License)
|
data/lib/i18n/js/engine.rb
CHANGED
@@ -4,17 +4,15 @@ module I18n
|
|
4
4
|
module JS
|
5
5
|
class Engine < ::Rails::Engine
|
6
6
|
initializer :after => "sprockets.environment" do
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
ActiveSupport.on_load(:after_initialize, :yield => true) do
|
12
|
-
next unless JS.has_asset_pipeline?
|
7
|
+
ActiveSupport.on_load(:after_initialize, :yield => true) do
|
8
|
+
next unless JS.has_asset_pipeline?
|
9
|
+
next unless Rails.configuration.assets.compile
|
13
10
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
11
|
+
Rails.application.assets.register_preprocessor "application/javascript", :"i18n-js_dependencies" do |context, source|
|
12
|
+
next source unless context.logical_path == "i18n/translations"
|
13
|
+
::I18n.load_path.each {|path| context.depend_on(path)}
|
14
|
+
source
|
15
|
+
end
|
18
16
|
end
|
19
17
|
end
|
20
18
|
end
|
data/lib/i18n/js/version.rb
CHANGED
data/spec/js/currency.spec.js
CHANGED
data/spec/js/dates.spec.js
CHANGED
data/spec/js/defaults.spec.js
CHANGED
data/spec/js/numbers.spec.js
CHANGED
data/spec/js/placeholder.spec.js
CHANGED
data/spec/js/translate.spec.js
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n-js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.rc2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -118,10 +118,10 @@ files:
|
|
118
118
|
- Gemfile.lock
|
119
119
|
- README.md
|
120
120
|
- Rakefile
|
121
|
+
- app/assets/javascripts/i18n.js
|
121
122
|
- app/assets/javascripts/i18n/translations.js.erb
|
122
123
|
- i18n-js.gemspec
|
123
124
|
- lib/i18n-js.rb
|
124
|
-
- lib/i18n.js
|
125
125
|
- lib/i18n/js.rb
|
126
126
|
- lib/i18n/js/engine.rb
|
127
127
|
- lib/i18n/js/middleware.rb
|
@@ -169,7 +169,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
169
169
|
version: '0'
|
170
170
|
segments:
|
171
171
|
- 0
|
172
|
-
hash:
|
172
|
+
hash: 4215591536209238864
|
173
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
174
|
none: false
|
175
175
|
requirements:
|