translation_rails 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -3,14 +3,18 @@ translation-rails
3
3
 
4
4
  include translation_center use it
5
5
 
6
- HOW USE
6
+ Setup:
7
7
 
8
8
  gem 'translation_center', :git => "https://github.com/jypandjio/translation_center"
9
9
 
10
10
  gem 'translation_rails'
11
11
 
12
+ rails g translation_rails:install
13
+
12
14
  rake db:migrate
13
15
 
16
+ rake translation_rails:add_lang[en]
17
+
14
18
  To migrate translations from TranslationCenter database to yaml files
15
19
 
16
20
  rake translation_center:db2yaml
@@ -1,5 +1,6 @@
1
1
  class ApplicationController
2
2
  layout "translation_rails/application"
3
+ before_filter :get_original_layout
3
4
 
4
5
  def self.layout(layout, conditions={})
5
6
  unless layout.to_s == "translation_rails/application"
@@ -17,7 +18,6 @@ class ApplicationController
17
18
  @original_layout || "translation_rails/application"
18
19
  end
19
20
 
20
- before_filter :get_original_layout
21
21
 
22
22
  def get_original_layout
23
23
  @layout_name = self.class.original_layout
@@ -1,7 +1,3 @@
1
1
  require "translation_center"
2
2
 
3
- if FileTest.exists?(file_path=File.expand_path("../../../config/translation_center.yml", __FILE__))
4
- TranslationCenter::CONFIG.deep_merge!(YAML.load_file(file_path)[Rails.env])
5
- end
6
-
7
3
 
@@ -1,3 +1,3 @@
1
1
  module TranslationRails
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: translation_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -51,7 +51,7 @@ extensions: []
51
51
  extra_rdoc_files: []
52
52
  files:
53
53
  - app/assets/stylesheets/application.css
54
- - app/controllers/application_controller.rb
54
+ - app/controllers/translation_rails/application_controller.rb
55
55
  - app/models/manager.rb
56
56
  - app/views/layouts/translation_rails/application.html.erb
57
57
  - config/initializers/app_config.rb