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|