From f5c7cca62698672a3089878c5ab80d839e4aea65 Mon Sep 17 00:00:00 2001 From: Godwin Date: Sun, 4 May 2014 15:33:59 -0600 Subject: [PATCH] Translations --- config/initializers/i18n.rb | 2 +- lib/tasks/translations.rake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/initializers/i18n.rb b/config/initializers/i18n.rb index 6a4d547..589004c 100644 --- a/config/initializers/i18n.rb +++ b/config/initializers/i18n.rb @@ -90,7 +90,7 @@ module I18n end def initialize - if Rails.env.test? || !File.exist?(filename) + if Rails.env.test? || !File.exist?(@@translation_cache_file) File.open(@@translation_cache_file, 'w+') end if Rails.env.test? diff --git a/lib/tasks/translations.rake b/lib/tasks/translations.rake index 991aa13..26c217d 100644 --- a/lib/tasks/translations.rake +++ b/lib/tasks/translations.rake @@ -4,7 +4,7 @@ namespace :translations do #File.open('config/locales/.translations.yml', 'w') #File.open('config/locales/.translation-cache.yml', 'w+') - translations = YAML.load(File.read('config/locales/.translations.yml')) || Hash.new + translations = YAML.load(File.read('config/locales/translation-info.yml')) || Hash.new translations.each { |k,t| if t['data'] t['data'].each { |tt|