Class: Cmdx::I18n::LocaleGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Cmdx::I18n::LocaleGenerator
- 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
-
#copy_locale_files ⇒ void
Copies the requested locale YAML file into
config/locales/.
Instance Method Details
#copy_locale_files ⇒ void
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 |