Sha256: 0367eadca1b865460a248e70916563d6a4819326bc512d0143fb723eebc6f22b
Contents?: true
Size: 550 Bytes
Versions: 46
Compression:
Stored size: 550 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 = Locale.load_yaml_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
46 entries across 46 versions & 1 rubygems