Sha256: 0d0ce03107302cc7565ddc37ea5eae79401566c6b330357caa76e48dcc24efd9
Contents?: true
Size: 543 Bytes
Versions: 11
Compression:
Stored size: 543 Bytes
Contents
namespace :localeapp do desc 'Imports the en.yml file to the LocaleServer' task :import => :environment do require 'flatten' include I18n::Backend::Flatten yml = YAML.load_file(ENV['LOCALE_FILE']) yml.each do |locale, translations| flatten_translations( locale, translations, I18n::Backend::Flatten::SEPARATOR_ESCAPE_CHAR, nil ).each do |key, value| puts "#{key} => #{value}" Localeapp.sender.post_translation(locale, key, {}, value) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems