Sha256: 49727f9d6df23895ab378d2d85f8f432665ee93776ea5ee81abee1ef039f9c9d

Contents?: true

Size: 1.13 KB

Versions: 19

Compression:

Stored size: 1.13 KB

Contents

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

module GettextI18nRails
  IGNORE_TABLES = [/^sitemap_/, /_versions$/, 'schema_migrations', 'sessions', 'delayed_jobs']
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

19 entries across 19 versions & 1 rubygems

Version Path
gettext_i18n_rails-1.13.0 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.12.0 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.11.0 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.10.1 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.10.0 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.9.0 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.8.1 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.8.0 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.7.2 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.7.1 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.7.0 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.6.0 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.5.0 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.4.0 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.3.2 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.3.1 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.3.0 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.2.3 lib/gettext_i18n_rails.rb
gettext_i18n_rails-1.2.2 lib/gettext_i18n_rails.rb