gettext_i18n_rails 0.2.5 → 0.2.6

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.
data/Readme.md CHANGED
@@ -40,7 +40,7 @@ With bundler:
40
40
  gem 'fast_gettext', '>=0.4.8'
41
41
  gem 'gettext', '>=1.9.3', :require => false
42
42
 
43
- Installed as gem? Add to your Rakefile:
43
+ Installed as gem and on Rails 2? Add to your Rakefile:
44
44
 
45
45
  #Rakefile
46
46
  begin
@@ -157,7 +157,6 @@ Sometimes translations like `_("x"+"u")` cannot be fond. You have 4 options:
157
157
 
158
158
  TODO
159
159
  =====
160
- - add Railtie for rake tasks on Rails 3
161
160
  - fix % on string to respect html_safe: `("<a>%{x}</a>".html_safe % {:x=>'<script>y</script>'})` should escape the `<script>y</script>` part)
162
161
  - refactor Readme
163
162
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.5
1
+ 0.2.6
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{gettext_i18n_rails}
8
- s.version = "0.2.5"
8
+ s.version = "0.2.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Grosser"]
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
26
26
  "lib/gettext_i18n_rails/html_safe_translations.rb",
27
27
  "lib/gettext_i18n_rails/i18n_hacks.rb",
28
28
  "lib/gettext_i18n_rails/model_attributes_finder.rb",
29
+ "lib/gettext_i18n_rails/railtie.rb",
29
30
  "lib/gettext_i18n_rails/ruby_gettext_extractor.rb",
30
31
  "lib/gettext_i18n_rails/tasks.rb",
31
32
  "lib/tasks/gettext_rails_i18n.rake",
@@ -23,4 +23,5 @@ I18n.backend = GettextI18nRails::Backend.new
23
23
 
24
24
  require 'gettext_i18n_rails/i18n_hacks'
25
25
  require 'gettext_i18n_rails/active_record'
26
- require 'gettext_i18n_rails/action_controller'
26
+ require 'gettext_i18n_rails/action_controller'
27
+ require 'gettext_i18n_rails/railtie'
@@ -0,0 +1,10 @@
1
+ # add rake tasks if we are inside Rails
2
+ if defined?(Rails::Railtie)
3
+ module GettextI18nRails
4
+ class Railtie < ::Rails::Railtie
5
+ rake_tasks do
6
+ require 'gettext_i18n_rails/tasks'
7
+ end
8
+ end
9
+ end
10
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 5
9
- version: 0.2.5
8
+ - 6
9
+ version: 0.2.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michael Grosser
@@ -52,6 +52,7 @@ files:
52
52
  - lib/gettext_i18n_rails/html_safe_translations.rb
53
53
  - lib/gettext_i18n_rails/i18n_hacks.rb
54
54
  - lib/gettext_i18n_rails/model_attributes_finder.rb
55
+ - lib/gettext_i18n_rails/railtie.rb
55
56
  - lib/gettext_i18n_rails/ruby_gettext_extractor.rb
56
57
  - lib/gettext_i18n_rails/tasks.rb
57
58
  - lib/tasks/gettext_rails_i18n.rake