Sha256: 3df19b12ff1e48adb1d8e2f49ca02c92192bcbfcc3eb59f7f706e097f35ef061

Contents?: true

Size: 1.15 KB

Versions: 12

Compression:

Stored size: 1.15 KB

Contents

require 'gettext_i18n_rails/version'

module GettextI18nRails
  extend self
end

require 'fast_gettext'
if Gem::Version.new(FastGettext::VERSION) < Gem::Version.new("0.4.8")
  raise "Please upgrade fast_gettext"
end

# include translations into all the places it needs to go...
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

require 'gettext_i18n_rails/backend'
I18n.backend = GettextI18nRails::Backend.new

require 'gettext_i18n_rails/i18n_hacks'

require 'gettext_i18n_rails/active_record'
# If configuration via Railties is not available force activerecord extensions
if not defined?(Rails::Railtie) and defined?(ActiveRecord)
  ActiveRecord::Base.extend GettextI18nRails::ActiveRecord
end

if not defined?(Rails::Railtie) and defined?(ActiveModel)
  require 'gettext_i18n_rails/active_model'
end

require 'gettext_i18n_rails/action_controller' if defined?(ActionController) # so that bundle console can work in a rails project
require 'gettext_i18n_rails/railtie'

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
gettext_i18n_rails-0.6.2 lib/gettext_i18n_rails.rb
gettext_i18n_rails-0.6.1 lib/gettext_i18n_rails.rb
gettext_i18n_rails-0.5.4 lib/gettext_i18n_rails.rb
nulogy-gettext_i18n_rails-0.5.3.2 lib/gettext_i18n_rails.rb
nulogy-gettext_i18n_rails-0.5.3.1 lib/gettext_i18n_rails.rb
gettext_i18n_rails-0.5.3 lib/gettext_i18n_rails.rb
nulogy-gettext_i18n_rails-0.5.0.3 lib/gettext_i18n_rails.rb
gettext_i18n_rails-0.5.2 lib/gettext_i18n_rails.rb
nulogy-gettext_i18n_rails-0.5.0.2 lib/gettext_i18n_rails.rb
gettext_i18n_rails-0.5.1 lib/gettext_i18n_rails.rb
nulogy-gettext_i18n_rails-0.5.0.1 lib/gettext_i18n_rails.rb
gettext_i18n_rails-0.5.0 lib/gettext_i18n_rails.rb