rails_config_i18n 0.3.1.1 → 0.3.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,15 +1,15 @@
1
- # RailsConfig
1
+ # RailsConfig I18N
2
2
 
3
3
  ## Summary
4
4
 
5
- RailsConfig I18n helps you manage environment and locale specific Rails settings in an easy and usable manner
5
+ RailsConfig I18N helps you manage environment and locale specific Rails settings in an easy and usable manner
6
6
 
7
7
  <del>RailsConfig helps you easily manage environment specific Rails settings in an easy and usable manner</del>
8
8
 
9
9
  ## Features
10
10
 
11
11
  * simple YAML config files
12
- * Support locales with I18n
12
+ * Support locales with i18n
13
13
  * config files support ERB
14
14
  * config files support inheritance
15
15
  * access config information via convenient object member notation
@@ -27,7 +27,7 @@ For older versions of Rails and other Ruby apps, use [AppConfig](http://github.c
27
27
  Add this to your `Gemfile`:
28
28
 
29
29
  ```ruby
30
- gem "rails_config"
30
+ gem "rails_config_i18n"
31
31
  ```
32
32
 
33
33
  ## Installing on Padrino
@@ -35,7 +35,7 @@ gem "rails_config"
35
35
  Add this to your `Gemfile`:
36
36
 
37
37
  ```ruby
38
- gem "rails_config"
38
+ gem "rails_config_i18n"
39
39
  ```
40
40
 
41
41
  in your app.rb, you'll also need to register RailsConfig
@@ -49,7 +49,7 @@ register RailsConfig
49
49
  Add this to your `Gemfile`:
50
50
 
51
51
  ```ruby
52
- gem "rails_config"
52
+ gem "rails_config_i18n"
53
53
  ```
54
54
 
55
55
  in your app, you'll need to register RailsConfig. You'll also need to give it a root so it can find the config files.
@@ -195,18 +195,24 @@ Consider the two following config files.
195
195
  #{Rails.root}/config/settings.yml:
196
196
 
197
197
  ```yaml
198
- size: 1
199
- server: google.com
198
+ en:
199
+ size: 1
200
+ server: google.com
201
+
202
+ zh-CN:
203
+ size: '一'
204
+ server: '谷歌'
200
205
  ```
201
206
 
202
207
  #{Rails.root}/config/environments/development.yml:
203
208
 
204
209
  ```yaml
205
- size: 2
206
- computed: <%= 1 + 2 + 3 %>
207
- section:
208
- size: 3
209
- servers: [ {name: yahoo.com}, {name: amazon.com} ]
210
+ en:
211
+ size: 2
212
+ computed: <%= 1 + 2 + 3 %>
213
+ section:
214
+ size: 3
215
+ servers: [ {name: yahoo.com}, {name: amazon.com} ]
210
216
  ```
211
217
 
212
218
  Notice that the environment specific config entries overwrite the common entries.
@@ -214,6 +220,10 @@ Notice that the environment specific config entries overwrite the common entries
214
220
  ```ruby
215
221
  Settings.size # => 2
216
222
  Settings.server # => google.com
223
+
224
+ I18n.locale = 'zh-CN'
225
+ Settings.size # => '一'
226
+ Settings.server # => '谷歌'
217
227
  ```
218
228
 
219
229
  Notice the embedded Ruby.
@@ -1,4 +1,3 @@
1
1
  RailsConfig.setup do |config|
2
- I18n.default_locale = :en
3
2
  config.const_name = "Settings"
4
3
  end
@@ -1,3 +1,3 @@
1
1
  module RailsConfig
2
- VERSION = '0.3.1.1'
2
+ VERSION = '0.3.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_config_i18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1.1
4
+ version: 0.3.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: