Sha256: def24173bfbe8ce0a01ae0a6c3269aeba06eaf17a36d9f7e657bf1b4bae66814

Contents?: true

Size: 1.04 KB

Versions: 20

Compression:

Stored size: 1.04 KB

Contents

require 'gettext_i18n_rails/version'
require 'gettext_i18n_rails/gettext_hooks'

module GettextI18nRails
end

# translate from everywhere
require 'fast_gettext'
Object.send(:include, FastGettext::Translation)

# make translations html_safe if possible and wanted
if "".respond_to?(:html_safe?)
  require 'gettext_i18n_rails/html_safe_translations'
  Object.send(:include, GettextI18nRails::HtmlSafeTranslations)
end

# set up the backend
require 'gettext_i18n_rails/backend'
I18n.backend = GettextI18nRails::Backend.new

# make I18n play nice with FastGettext
require 'gettext_i18n_rails/i18n_hacks'

# translate activerecord errors
if defined? Rails::Railtie # Rails 3+
  # load active_model extensions at the correct point in time
  require 'gettext_i18n_rails/railtie'
else
  if defined? ActiveRecord
    require 'gettext_i18n_rails/active_record'
  elsif defined?(ActiveModel)
    require 'gettext_i18n_rails/active_model'
  end
end

# make bundle console work in a rails project
require 'gettext_i18n_rails/action_controller' if defined?(ActionController)

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
gettext_i18n_rails-1.2.1 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.2.0 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.1.0 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.0.5 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.0.4 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.0.3 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.0.2 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.0.1 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.0.0 lib/gettext_i18n_rails.rb
gettext_i18n_rails-0.10.1 lib/gettext_i18n_rails.rb
gettext_i18n_rails-0.10.0 lib/gettext_i18n_rails.rb
gettext_i18n_rails-0.9.4 lib/gettext_i18n_rails.rb
gettext_i18n_rails-0.9.3 lib/gettext_i18n_rails.rb
gettext_i18n_rails-0.9.2 lib/gettext_i18n_rails.rb
gettext_i18n_rails-0.9.1 lib/gettext_i18n_rails.rb
gettext_i18n_rails-0.9.0 lib/gettext_i18n_rails.rb
gettext_i18n_rails-0.8.0 lib/gettext_i18n_rails.rb
gettext_i18n_rails-0.7.2 lib/gettext_i18n_rails.rb
gettext_i18n_rails-0.7.1 lib/gettext_i18n_rails.rb
gettext_i18n_rails-0.7.0 lib/gettext_i18n_rails.rb