diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/plugin/loader.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails/plugin/loader.rb b/railties/lib/rails/plugin/loader.rb index 9e2c3c7b03..0d16cbd7c3 100644 --- a/railties/lib/rails/plugin/loader.rb +++ b/railties/lib/rails/plugin/loader.rb @@ -86,8 +86,10 @@ module Rails end def add_engine_locales + localized_engines = engines.select { |engine| engine.localized? } + # 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 = localized_engines.collect { |engine| engine.locale_files }.reverse.flatten I18n.load_path += locale_files - I18n.load_path end |