From c244da8b73c98945d49340ede84946bfbcbf291b Mon Sep 17 00:00:00 2001 From: Taylor Griffin Date: Tue, 21 Oct 2014 07:24:08 +1100 Subject: [PATCH] make English fallback language --- Gemfile | 3 --- Gemfile.lock | 8 -------- config/application.rb | 8 ++++++-- config/initializers/locale.rb | 4 ---- 4 files changed, 6 insertions(+), 17 deletions(-) delete mode 100644 config/initializers/locale.rb diff --git a/Gemfile b/Gemfile index 2360041eb..124c1f4f9 100644 --- a/Gemfile +++ b/Gemfile @@ -80,9 +80,6 @@ gem 'flickraw' # To use debugger group :development do - # Installation of the debugger gem fails on Travis CI, - # so we don't use it in the test environment - gem 'debugger' # A debugger and irb alternative. Pry doesn't play nice # with unicorn, so start a Webrick server when debugging # with Pry diff --git a/Gemfile.lock b/Gemfile.lock index fae16d6ad..6f6b7d1a5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -77,7 +77,6 @@ GEM coffee-script-source execjs coffee-script-source (1.8.0) - columnize (0.8.9) commonjs (0.2.7) compass (0.12.7) chunky_png (~> 1.2) @@ -96,12 +95,6 @@ GEM dalli (2.7.2) database_cleaner (1.3.0) debug_inspector (0.0.2) - debugger (1.6.8) - columnize (>= 0.3.1) - debugger-linecache (~> 1.2.0) - debugger-ruby_core_source (~> 1.3.5) - debugger-linecache (1.2.0) - debugger-ruby_core_source (1.3.5) devise (3.2.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) @@ -336,7 +329,6 @@ DEPENDENCIES csv_shaper dalli database_cleaner (~> 1.3.0) - debugger devise (~> 3.2.0) factory_girl_rails (~> 4.0) figaro diff --git a/config/application.rb b/config/application.rb index 6bbe1fe7d..5b01d3aa8 100644 --- a/config/application.rb +++ b/config/application.rb @@ -31,8 +31,12 @@ module Growstuff config.active_record.default_timezone = :local # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de + I18n.load_path += Dir[Rails.root.join('config', 'locales', '*.{rb,yml}')] + I18n.default_locale = :en + # rails will fallback to config.i18n.default_locale translation + config.i18n.fallbacks = true + # rails will fallback to en, no matter what is set as config.i18n.default_locale + config.i18n.fallbacks = [:en] # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" diff --git a/config/initializers/locale.rb b/config/initializers/locale.rb deleted file mode 100644 index fb251b800..000000000 --- a/config/initializers/locale.rb +++ /dev/null @@ -1,4 +0,0 @@ -I18n.load_path += Dir[Rails.root.join('config', 'locales', '*.{rb,yml}')] -I18n.default_locale = :en - - \ No newline at end of file