Browse Source

Translations

development
Godwin 11 years ago
parent
commit
f5c7cca626
  1. 2
      config/initializers/i18n.rb
  2. 2
      lib/tasks/translations.rake

2
config/initializers/i18n.rb

@ -90,7 +90,7 @@ module I18n
end end
def initialize def initialize
if Rails.env.test? || !File.exist?(filename) if Rails.env.test? || !File.exist?(@@translation_cache_file)
File.open(@@translation_cache_file, 'w+') File.open(@@translation_cache_file, 'w+')
end end
if Rails.env.test? if Rails.env.test?

2
lib/tasks/translations.rake

@ -4,7 +4,7 @@ namespace :translations do
#File.open('config/locales/.translations.yml', 'w') #File.open('config/locales/.translations.yml', 'w')
#File.open('config/locales/.translation-cache.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| translations.each { |k,t|
if t['data'] if t['data']
t['data'].each { |tt| t['data'].each { |tt|

Loading…
Cancel
Save