diff --git a/railties/all_plugins_can_have_i18n.diff b/railties/all_plugins_can_have_i18n.diff deleted file mode 100644 index 727a9bf..0000000 --- a/railties/all_plugins_can_have_i18n.diff +++ /dev/null @@ -1,72 +0,0 @@ -diff --git a/railties/lib/rails/plugin/loader.rb b/railties/lib/rails/plugin/loader.rb -index 49670b3..a351640 100644 ---- a/railties/lib/rails/plugin/loader.rb -+++ b/railties/lib/rails/plugin/loader.rb -@@ -40,7 +40,7 @@ module Rails - end - - configure_engines -- -+ load_plugin_locales - ensure_all_registered_plugins_are_loaded! - end - -@@ -73,7 +73,6 @@ module Rails - def configure_engines - if engines.any? - add_engine_routing_configurations -- add_engine_locales - add_engine_controller_paths - add_engine_view_paths - end -@@ -85,9 +84,9 @@ module Rails - end - end - -- def add_engine_locales -+ def load_plugin_locales - # reverse it such that the last engine can overwrite translations from the first, like with routes -- locale_files = engines.select(&:localized?).collect(&:locale_files).reverse.flatten -+ locale_files = plugins.select(&:localized?).collect(&:locale_files).reverse.flatten - I18n.load_path += locale_files - I18n.load_path - end - -diff --git a/railties/test/initializer_test.rb b/railties/test/initializer_test.rb -index 68c99ee..d88562e 100644 ---- a/railties/test/initializer_test.rb -+++ b/railties/test/initializer_test.rb -@@ -280,6 +280,7 @@ class InitializerPluginLoadingTests < Test::Unit::TestCase - end - - class InitializerSetupI18nTests < Test::Unit::TestCase -+ - def test_no_config_locales_dir_present_should_return_empty_load_path - File.stubs(:exist?).returns(false) - assert_equal [], Rails::Configuration.new.i18n.load_path -@@ -314,6 +315,7 @@ class InitializerSetupI18nTests < Test::Unit::TestCase - File.expand_path(File.dirname(__FILE__) + "/../../actionpack/lib/action_view/locale/en.yml"), - File.expand_path(File.dirname(__FILE__) + "/../../activerecord/lib/active_record/locale/en.yml"), - # FIXME: should clean I18n.load_path between each test -+ File.expand_path(File.dirname(__FILE__) + "/../../railties/test/fixtures/plugins/default/stubby/config/locales/en.yml"), - File.expand_path(File.dirname(__FILE__) + "/../../railties/test/fixtures/plugins/engines/engine/config/locales/en.yml"), - "my/test/locale.yml", - "my/other/locale.yml" ], I18n.load_path.collect { |path| path =~ /^\./ ? File.expand_path(path) : path } -diff --git a/railties/test/plugin_loader_test.rb b/railties/test/plugin_loader_test.rb -index b0ab4b7..6bd7542 100644 ---- a/railties/test/plugin_loader_test.rb -+++ b/railties/test/plugin_loader_test.rb -@@ -156,11 +156,12 @@ class TestPluginLoader < Test::Unit::TestCase - end - - def test_should_add_locale_files_to_I18n_load_path -- only_load_the_following_plugins! [:engine] -+ only_load_the_following_plugins! [:engine, :stubby] - -- @loader.send :add_engine_locales -+ @loader.send :load_plugin_locales - - assert I18n.load_path.include?(File.join(plugin_fixture_path('engines/engine'), 'config', 'locales', 'en.yml')) -+ assert I18n.load_path.include?(File.join(plugin_fixture_path('default/stubby'), 'config', 'locales', 'en.yml')) - end - -