Sha256: 626a5378b1773949b4fc235c8cbcf2e5392568f687a61723e66dbd08d3c7d530

Contents?: true

Size: 712 Bytes

Versions: 5

Compression:

Stored size: 712 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.external_tool_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

5 entries across 5 versions & 1 rubygems

Version Path
i18n_viz-1.0.1 lib/generators/i18n_viz/install_generator.rb
i18n_viz-0.4.0 lib/generators/i18n_viz/install_generator.rb
i18n_viz-0.3.2 lib/generators/i18n_viz/install_generator.rb
i18n_viz-0.3.1 lib/generators/i18n_viz/install_generator.rb
i18n_viz-0.3.0 lib/generators/i18n_viz/install_generator.rb