diff --git a/locales/af.yml b/config/locales/af.yml similarity index 100% rename from locales/af.yml rename to config/locales/af.yml diff --git a/locales/ca.yml b/config/locales/ca.yml similarity index 100% rename from locales/ca.yml rename to config/locales/ca.yml diff --git a/locales/de.yml b/config/locales/de.yml similarity index 100% rename from locales/de.yml rename to config/locales/de.yml diff --git a/locales/en.yml b/config/locales/en.yml similarity index 100% rename from locales/en.yml rename to config/locales/en.yml diff --git a/locales/es.yml b/config/locales/es.yml similarity index 100% rename from locales/es.yml rename to config/locales/es.yml diff --git a/locales/fr.yml b/config/locales/fr.yml similarity index 100% rename from locales/fr.yml rename to config/locales/fr.yml diff --git a/locales/it.yml b/config/locales/it.yml similarity index 100% rename from locales/it.yml rename to config/locales/it.yml diff --git a/locales/ja.yml b/config/locales/ja.yml similarity index 100% rename from locales/ja.yml rename to config/locales/ja.yml diff --git a/locales/nl.yml b/config/locales/nl.yml similarity index 100% rename from locales/nl.yml rename to config/locales/nl.yml diff --git a/locales/pl.yml b/config/locales/pl.yml similarity index 100% rename from locales/pl.yml rename to config/locales/pl.yml diff --git a/locales/pt-BR.yml b/config/locales/pt-BR.yml similarity index 100% rename from locales/pt-BR.yml rename to config/locales/pt-BR.yml diff --git a/locales/ru.yml b/config/locales/ru.yml similarity index 100% rename from locales/ru.yml rename to config/locales/ru.yml diff --git a/locales/tr.yml b/config/locales/tr.yml similarity index 100% rename from locales/tr.yml rename to config/locales/tr.yml diff --git a/lib/date_validator/engine.rb b/lib/date_validator/engine.rb index 9093d3e..2b84e8d 100644 --- a/lib/date_validator/engine.rb +++ b/lib/date_validator/engine.rb @@ -1,8 +1,4 @@ module DateValidator class Engine < Rails::Engine - initializer 'date_validator' do - files = Dir[Pathname.new(File.dirname(__FILE__)).join('../..', 'locales', '*.yml')] - config.i18n.load_path += files - end end end diff --git a/test/test_helper.rb b/test/test_helper.rb index 0f8b4cd..21c7da1 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -14,7 +14,7 @@ require 'active_model' require 'date_validator' -I18n.load_path += Dir[File.expand_path(File.join(File.dirname(__FILE__), '../locales', '*.yml')).to_s] +I18n.load_path += Dir[File.expand_path(File.join(File.dirname(__FILE__), '../config/locales', '*.yml')).to_s] class TestRecord include ActiveModel::Validations