Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Should Sinatra::Reloader reload i18n files (.yml)? #179
The extension Sinatra::Reloader should reload other files such as
# Gemfile gem 'i18n' gem 'sinatra' gem 'sinatra-contrib'
# my_app.rb require "sinatra/base" require "sinatra/reloader" class MyApp < Sinatra::Base configure :development do register Sinatra::Reloader end configure do I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks) I18n.load_path = Dir[File.join(settings.root, 'config/locales', '*.yml')] I18n.backend.load_translations end ... end
# config/locales/pt.yml pt: hello: "Olá Sinatra"
After changing the
Can't you use
I'm having the same experience, I tried using also_reload and it is fine starting up, but after changing the content in my yml file I get an error saying it can't load the file and the error message says it is looking in my home directory even though I have specified the path the same way as other also_reload files that are .rb.