From ab449a65f8ca261abc6b16d10986d4939eddec93 Mon Sep 17 00:00:00 2001 From: Taylor Griffin Date: Mon, 20 Oct 2014 21:27:39 +1100 Subject: [PATCH 1/2] remove 'to be translated' message from ja locale file --- config/locales/ja.yml | 75 +------------------------------------------ 1 file changed, 1 insertion(+), 74 deletions(-) diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 1f2fe3247..925a54399 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -2,77 +2,4 @@ ja: home: blurb: intro: "%{site_name}はガーデナーのコミュニティです。" - perks: "翻訳中" - sign_up: "翻訳中" - already_html: "翻訳中" - sign_in_linktext: "翻訳中" - - crops: - our_crops: "翻訳中" - recently_planted: "翻訳中" - recently_added: "翻訳中" - view_all: "翻訳中" - - discuss: - discussion: "翻訳中" - forums: "翻訳中" - view_all: "翻訳中" - - keep_in_touch: - keep_in_touch: "翻訳中" - twitter_html: "翻訳中" - twitter_linktext: "翻訳中" - blog_html: "翻訳中" - blog_linktext: "翻訳中" - newsletter_html: "翻訳中" - newsletter_linktext: "翻訳中" - - members: - title: "翻訳中" - view_all: "翻訳中" - - open: - open_source_title: "翻訳中" - open_source_body_html: "翻訳中" - why_linktext: "翻訳中" - github_linktext: "翻訳中" - open_data_title: "翻訳中" - open_data_body_html: "翻訳中" - creative_commons_linktext: "翻訳中" - wiki_linktext: "翻訳中" - api_docs_linktext: "翻訳中" - get_involved_title: "翻訳中" - get_involved_body_html: "翻訳中" - talk_linktext: "翻訳中" - wiki_linktext: "翻訳中" - support_title: "翻訳中" - support_body_html: "翻訳中" - ad_free_linktext: "翻訳中" - - - seeds: - title: "翻訳中" - owner: "翻訳中" - crop: "翻訳中" - description: "翻訳中" - trade_to: "翻訳中" - from: "翻訳中" - unspecified: "翻訳中" - details: "翻訳中" - view_all: "翻訳中" - - stats: - message_html: "翻訳中" - member_linktext: "翻訳中" - number_crops_linktext: "翻訳中" - number_plantings_linktext: "翻訳中" - number_gardens_linktext: "翻訳中" - - index: - welcome: "翻訳中" - plant: "翻訳中" - harvest: "翻訳中" - add_seeds: "翻訳中" - post: "翻訳中" - edit_profile: "翻訳中" - + \ No newline at end of file From c244da8b73c98945d49340ede84946bfbcbf291b Mon Sep 17 00:00:00 2001 From: Taylor Griffin Date: Tue, 21 Oct 2014 07:24:08 +1100 Subject: [PATCH 2/2] 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