Some updates to translation engine, added dotenv but have not yet set it up.

This commit is contained in:
Godwin
2014-04-29 21:02:02 -06:00
parent 3759910993
commit cc948937bc
35 changed files with 707 additions and 190 deletions
+14
View File
@@ -0,0 +1,14 @@
namespace :translations do
desc "Migrates collected translations from the dev and testing environments"
task migrate: :environment 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.each { |k,t|
if t['data']
t['data'].each { |tt| tt.save }
end
}
end
end