Skip to content

Commit

Permalink
Load en translation
Browse files Browse the repository at this point in the history
This fixes #2168, fixes #2173, and fixes #2231
  • Loading branch information
mshibuya committed Sep 30, 2017
1 parent 72f123a commit 95ce39d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/carrierwave.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 95ce39d

Please sign in to comment.