class Hobo::I18nGenerator

Public Instance Methods

check_supported_locales() click to toggle source
# File lib/generators/hobo/i18n/i18n_generator.rb, line 14
def check_supported_locales
  locales.each do |l|
    unless File.exists?(File.join(self.class.source_root, "hobo.#{l}.yml") )
      say "The locale '#{l}' is not supported by Hobo!"
      exit
    end
  end
end
copy_locale_files() click to toggle source
# File lib/generators/hobo/i18n/i18n_generator.rb, line 23
def copy_locale_files
  locales.each do |l|
    copy_file "hobo.#{l}.yml", "config/locales/hobo.#{l}.yml"
    copy_file "app.#{l}.yml", "config/locales/app.#{l}.yml"
  end
end
remove_en_file() click to toggle source
# File lib/generators/hobo/i18n/i18n_generator.rb, line 30
def remove_en_file
  remove_file 'config/locales/en.yml'
end

Public Class Methods

banner() click to toggle source