]> git.openstreetmap.org Git - rails.git/blobdiff - vendor/plugins/globalize2/lib/rails_edge_load_path_patch.rb
Update to rails 2.3.8
[rails.git] / vendor / plugins / globalize2 / lib / rails_edge_load_path_patch.rb
diff --git a/vendor/plugins/globalize2/lib/rails_edge_load_path_patch.rb b/vendor/plugins/globalize2/lib/rails_edge_load_path_patch.rb
deleted file mode 100644 (file)
index e6f90d8..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-module I18n
-  @@load_path = nil
-  @@default_locale = :'en-US'
-  
-  class << self
-    def load_path
-      @@load_path ||= []
-    end
-    
-    def load_path=(load_path)
-      @@load_path = load_path
-    end
-  end
-end
-
-I18n::Backend::Simple.module_eval do
-  def initialized?
-    @initialized ||= false
-  end
-  
-  protected
-
-    def init_translations
-      load_translations(*I18n.load_path)
-      @initialized = true
-    end
-    
-    def lookup(locale, key, scope = [])
-      return unless key
-      init_translations unless initialized?
-      keys = I18n.send :normalize_translation_keys, locale, key, scope
-      keys.inject(translations){|result, k| result[k.to_sym] or return nil }
-    end
-end
-
-rails_dir = File.expand_path "#{File.dirname(__FILE__)}/../../../rails/"
-paths = %w(actionpack/lib/action_view/locale/en-US.yml 
-           activerecord/lib/active_record/locale/en-US.yml
-           activesupport/lib/active_support/locale/en-US.yml)
-paths.each{|path| I18n.load_path << "#{rails_dir}/#{path}" }