Sha256: 511f5b827944aac6df2257f480ff29dd77bab4e3bc3ee2e5017fceaa2e67ad5d

Contents?: true

Size: 739 Bytes

Versions: 14

Compression:

Stored size: 739 Bytes

Contents

module GettextI18nRails
  class Railtie < ::Rails::Railtie
    config.gettext_i18n_rails = ActiveSupport::OrderedOptions.new
    config.gettext_i18n_rails.msgmerge = nil
    config.gettext_i18n_rails.xgettext = nil
    config.gettext_i18n_rails.use_for_active_record_attributes = true

    rake_tasks do
      begin
        gem "gettext", ">= 3.0.2"
        require 'gettext_i18n_rails/tasks'
      rescue Gem::LoadError
        # no gettext available, no tasks for you!
      end
    end

    config.after_initialize do |app|
      if app.config.gettext_i18n_rails.use_for_active_record_attributes
        ActiveSupport.on_load :active_record do
          require 'gettext_i18n_rails/active_model'
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
gettext_i18n_rails-1.4.0 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.3.2 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.3.1 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.3.0 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.2.3 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.2.2 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.2.1 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.2.0 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.1.0 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.0.5 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.0.4 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.0.3 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.0.2 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.0.1 lib/gettext_i18n_rails/railtie.rb