Closed ppworks closed 7 years ago
I changed the path of locale files from locale/*.yml to config/locale/*.yml(It's Rails Engine default).
locale/*.yml
config/locale/*.yml
I18n.load_path => ["/Users/koshikawa/tmp/fugo/vendor/bundle/gems/activesupport-4.2.5/lib/active_support/locale/en.yml", "/Users/koshikawa/tmp/fugo/vendor/bundle/gems/activemodel-4.2.5/lib/active_model/locale/en.yml", "/Users/koshikawa/tmp/fugo/vendor/bundle/gems/activerecord-4.2.5/lib/active_record/locale/en.yml", "/Users/koshikawa/tmp/fugo/vendor/bundle/gems/actionview-4.2.5/lib/action_view/locale/en.yml", "/Users/koshikawa/app/config/locales/en.yml, "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/af.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/ca.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/de.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/en.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/es.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/fr.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/it.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/ja.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/nl.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/pl.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/pt-BR.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/ru.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/tr.yml"]
I18n.load_path => ["/Users/koshikawa/tmp/fugo/vendor/bundle/gems/activesupport-4.2.5/lib/active_support/locale/en.yml", "/Users/koshikawa/tmp/fugo/vendor/bundle/gems/activemodel-4.2.5/lib/active_model/locale/en.yml", "/Users/koshikawa/tmp/fugo/vendor/bundle/gems/activerecord-4.2.5/lib/active_record/locale/en.yml", "/Users/koshikawa/tmp/fugo/vendor/bundle/gems/actionview-4.2.5/lib/action_view/locale/en.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/af.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/ca.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/de.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/en.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/es.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/fr.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/it.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/ja.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/nl.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/pl.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/pt-BR.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/ru.yml", "/Users/koshikawa/repository/github.com/codegram/date_validator/config/locales/tr.yml", "/Users/koshikawa/app/config/locales/en.yml"]
This change makes us be able to override default locale setting as below.
*path_to_your_app_root/config/locale/.yml**
en: errors: messages: not_a_date: "is not a DATE!!!"
Could you check this? @codegram
I changed the path of locale files from
locale/*.yml
toconfig/locale/*.yml
(It's Rails Engine default).Before
After
This change makes us be able to override default locale setting as below.
*path_to_your_app_root/config/locale/.yml**