lib/i18n/tasks/prefill.rb in i18n-tasks-0.1.6 vs lib/i18n/tasks/prefill.rb in i18n-tasks-0.1.7

- old
+ new

@@ -5,19 +5,11 @@ class Prefill < BaseTask # todo refactor to allow configuring output targets def perform # Will also rewrite en, good for ordering I18n.available_locales.map(&:to_s).each do |target_locale| - trn = locale_data(target_locale) - prefilled = { target_locale => base_locale_data }.deep_merge(trn) - File.open(locale_file_path(target_locale), 'w'){ |f| f.write prefilled.to_yaml } + data[target_locale] = data[base_locale].deep_merge(data[target_locale]) end - end - - # main locale file path (for writing to) - # @return [String] - def locale_file_path(locale) - "config/locales/#{locale}.yml" end end end end