Sha256: 5521217f010ca14fc273a2e7f10ab1e77d121f4bb0741be8c01adc497c266c47

Contents?: true

Size: 768 Bytes

Versions: 2

Compression:

Stored size: 768 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
          I18nViz.css_override = "" # CSS override text
        }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
i18n_viz-1.2.0 lib/generators/i18n_viz/install_generator.rb
i18n_viz-1.1.0 lib/generators/i18n_viz/install_generator.rb