Sha256: fac82bc5b626df2e51e07309028bc9421ee2e01268a32e165a0b09feac060beb

Contents?: true

Size: 537 Bytes

Versions: 1

Compression:

Stored size: 537 Bytes

Contents

require 'rails/generators/migration'
 
module TkhAuthentication
  module Generators
    class UpdateLocalesGenerator < ::Rails::Generators::Base
      # WARNING - sharing translations and using the ones from the install generator
      source_root File.expand_path('../templates', __FILE__)
      
      def copy_locales
        puts 'creating locale files'
        I18n.available_locales.each do |l|
          copy_file "locales/#{l.to_s}.yml", "config/locales/tkh_authentication.#{l.to_s}.yml"
        end
      end
 
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tkh_authentication-0.0.3 lib/generators/tkh_authentication/update_locales/update_locales_generator.rb