rails-i18n-generator 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -5
- data/lib/rails/i18n/generator.rb +4 -0
- data/lib/rails/i18n/generator/version.rb +1 -1
- data/rails-i18n-generator.gemspec +1 -1
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e33f0f98efa47c9a4e0a502fd4cc552887714ffb
|
4
|
+
data.tar.gz: da021b5c5d27ca00469e21bb0afd4a3171d4eb3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e776537983c7d5fd27d4f033810996fa424ee9bdb537c79b5a01b9ddc2cf6b3ca25c647d8c285b8de8f55f80132f657e710f723f77e1303dd97e596ad10f1447
|
7
|
+
data.tar.gz: 9c2832debb1f9fedb0d0e66d99be5399dc6450316db17ffe930978d68505550b36fd5dfc86d6b1b7f89e07eb6114c3b2d49bfbda227f5c7370d79db3a436e7cf
|
data/README.md
CHANGED
@@ -34,11 +34,7 @@ Or install it yourself as:
|
|
34
34
|
|
35
35
|
## Usage
|
36
36
|
|
37
|
-
|
38
|
-
|
39
|
-
config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')]
|
40
|
-
|
41
|
-
Then below command will generate locale files properly
|
37
|
+
Below commands will generate locale files properly
|
42
38
|
|
43
39
|
$ rails g scaffold Article title:string body:text
|
44
40
|
$ rails g model Article title:string body:text
|
data/lib/rails/i18n/generator.rb
CHANGED
@@ -8,6 +8,10 @@ module Rails
|
|
8
8
|
class Railtie < ::Rails::Railtie
|
9
9
|
config.rails_i18n_generator = Rails::I18n::Generator::Configuration.new(false)
|
10
10
|
|
11
|
+
initializer :rails_i18n do
|
12
|
+
config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')]
|
13
|
+
end
|
14
|
+
|
11
15
|
generators do |app|
|
12
16
|
if ::Rails::VERSION::STRING >= '3.2'
|
13
17
|
Rails::Generators.configure!(app.config.generators)
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["xiaohui@zhangxh.net"]
|
11
11
|
spec.summary = %q{Generate locales for models and controlers}
|
12
12
|
spec.description = %q{This gem is re-built from gem i18n_yaml_generator}
|
13
|
-
spec.homepage = "http://github.com/xiaohui-zhangxh/rails-i18n-
|
13
|
+
spec.homepage = "http://github.com/xiaohui-zhangxh/rails-i18n-generator"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-i18n-generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xiaohui
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.2.0
|
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
26
|
version: 3.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.7'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.7'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '10.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '10.0'
|
55
55
|
description: This gem is re-built from gem i18n_yaml_generator
|
@@ -59,7 +59,7 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
-
- .gitignore
|
62
|
+
- ".gitignore"
|
63
63
|
- Gemfile
|
64
64
|
- LICENSE.txt
|
65
65
|
- README.md
|
@@ -70,7 +70,7 @@ files:
|
|
70
70
|
- lib/rails/i18n/generator/helpers.rb
|
71
71
|
- lib/rails/i18n/generator/version.rb
|
72
72
|
- rails-i18n-generator.gemspec
|
73
|
-
homepage: http://github.com/xiaohui-zhangxh/rails-i18n-
|
73
|
+
homepage: http://github.com/xiaohui-zhangxh/rails-i18n-generator
|
74
74
|
licenses:
|
75
75
|
- MIT
|
76
76
|
metadata: {}
|
@@ -80,17 +80,17 @@ require_paths:
|
|
80
80
|
- lib
|
81
81
|
required_ruby_version: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
|
-
- -
|
83
|
+
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0'
|
86
86
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
requirements: []
|
92
92
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.4.
|
93
|
+
rubygems_version: 2.4.8
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: Generate locales for models and controlers
|