Skip to content

Commit 6971418

Browse files
committedJul 18, 2011
Make gem working with Rails 3.1
1 parent 07fc23d commit 6971418

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed
 

‎lib/rails-i18n.rb

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
ActiveSupport.on_load(:i18n) do
2-
I18n.load_path << Dir[File.join(File.expand_path(File.dirname(__FILE__) + '/../rails/locale'), '*.{rb,yml}')]
3-
I18n.load_path.flatten!
4-
end
1+
require 'rails_i18n'

‎lib/rails_i18n.rb

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require 'rails_i18n/railtie'

‎lib/rails_i18n/railtie.rb

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
require 'rails'
2+
3+
module RailsI18n
4+
class Railtie < ::Rails::Railtie #:nodoc:
5+
initializer 'rails-i18n' do |app|
6+
I18n.load_path << Dir[File.join(File.expand_path(File.dirname(__FILE__) + '/../../rails/locale'), '*.{rb,yml}')]
7+
I18n.load_path.flatten!
8+
end
9+
end
10+
end

‎rails-i18n.gemspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
Gem::Specification.new do |s|
44
s.name = "rails-i18n"
5-
s.version = '0.1.0'
5+
s.version = '0.1.1'
66
s.authors = ["Rails I18n Group"]
77
s.email = "rails-i18n@googlegroups.com"
88
s.homepage = "http://github.com/svenfuchs/rails-i18n"
99
s.summary = "Common locale data and translations for Rails i18n."
1010
s.description = "A set of common locale data and translations to internationalize and/or localize your Rails applications."
1111

12-
s.files = Dir.glob("rails/locale/*") + %w(README.md MIT-LICENSE.txt lib/rails-i18n.rb)
12+
s.files = Dir.glob("lib/**/*") + Dir.glob("rails/locale/*") + %w(README.md MIT-LICENSE.txt)
1313
s.platform = Gem::Platform::RUBY
1414
s.require_path = 'lib'
1515
s.rubyforge_project = '[none]'

0 commit comments

Comments
 (0)