Class: Cmdx::I18n::LocaleGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/cmdx/i18n/locale_generator.rb

Overview

Rails generator that copies CMDx::I18n locale files into the host application’s config/locales/ directory.

Provides manual locale installation as an alternative to the automatic load-path injection performed by CMDx::I18n::Railtie.

Instance Method Summary collapse

Instance Method Details

#copy_locale_filesvoid

This method returns an undefined value.

Copies the requested locale YAML file into config/locales/.



23
24
25
# File 'lib/generators/cmdx/i18n/locale_generator.rb', line 23

def copy_locale_files
  copy_file("#{locale}.yml", "config/locales/#{locale}.yml")
end