Load any translation files in subdirectories (#15077)

* Load any translation files in subdirectories

This ensures files in config/locales/views/ are loaded, for example.

* Move i18n load path additions from initializer to rails config
This commit is contained in:
Daniel Uber 2021-10-14 12:17:07 -04:00 committed by GitHub
parent 68e6e61141
commit b2203fbe0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,6 +55,8 @@ module PracticalDeveloper
config.middleware.use Rack::Deflater
config.i18n.load_path += Dir[Rails.root.join("config/locales/**/*.yml")]
config.i18n.fallbacks = [:en]
# Globally handle Pundit::NotAuthorizedError by serving 404