Sha256: 5aa56860ca44f313b55a605cd9e9d56f6142ca5e1ce99b5f11c26cf35e8c8d35

Contents?: true

Size: 702 Bytes

Versions: 2

Compression:

Stored size: 702 Bytes

Contents

module I18nViz
  module Generators
    class InstallGenerator < Rails::Generators::Base
      source_root File.expand_path("../../../../app/assets/", __FILE__)
      
      def copy_assets
        copy_file "javascripts/i18n_viz.js", "public/javascripts/i18n_viz.js"
        copy_file "stylesheets/i18n_viz.css", "public/stylesheets/i18n_viz.css"
      end
      
      def create_initializer
        initializer "i18n_viz.rb", %Q{
          I18nViz.enabled = !Rails.env.production?
          I18nViz.key_url = "" # link to more information about each i18n key, e.g. "http://mytranslationtool.com/?key=" -- the key (e.g. 'en.foo.bar') will be appended to this URL
        }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
i18n_viz-0.0.2 lib/generators/i18n_viz/install_generator.rb
i18n_viz-0.0.1 lib/generators/i18n_viz/install_generator.rb