From 95ce39d3ec98bee9b2846b32fdcf093c78fa44fb Mon Sep 17 00:00:00 2001 From: "M.Shibuya" Date: Sat, 30 Sep 2017 17:12:58 +0900 Subject: [PATCH] Load en translation This fixes #2168, fixes #2173, and fixes #2231 --- lib/carrierwave.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/carrierwave.rb b/lib/carrierwave.rb index e3c733a7e..37b5070ee 100644 --- a/lib/carrierwave.rb +++ b/lib/carrierwave.rb @@ -41,6 +41,10 @@ class Railtie < Rails::Railtie initializer "carrierwave.setup_paths" do |app| CarrierWave.root = Rails.root.join(Rails.public_path).to_s CarrierWave.base_path = ENV['RAILS_RELATIVE_URL_ROOT'] + available_locales = app.config.i18n.available_locales + if available_locales.blank? || available_locales.include?(:en) + I18n.load_path.prepend(File.join(File.dirname(__FILE__), 'carrierwave', 'locale', "en.yml")) + end end initializer "carrierwave.active_record" do