Sha256: 6aedfaee70c02059e6f51ee0fa2d447b02da2480c294c98d2c5245553d565f32

Contents?: true

Size: 514 Bytes

Versions: 8

Compression:

Stored size: 514 Bytes

Contents

require 'active_support/core_ext/hash'

require 'i18n'
require 'i18n/js/railtie' if defined?(Rails)

module I18n
  module Js
    def self.config_path
      Rails.root.join("config", "i18n-js.yml")
    end
    def self.config?
      File.exists?(config_path)
    end
    def self.config
      @@config ||= if config?
        YAML.load_file(config_path).with_indifferent_access
      else
        {}.with_indifferent_access
      end.reverse_merge!(:asset_path => "i18n/translation", :only => "*")
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
socialcast-i18n-js-4.0.0.rc8 lib/i18n-js.rb
socialcast-i18n-js-4.0.0.rc7 lib/i18n-js.rb
socialcast-i18n-js-4.0.0.rc6 lib/i18n-js.rb
socialcast-i18n-js-4.0.0.rc5 lib/i18n-js.rb
socialcast-i18n-js-4.0.0.rc4 lib/i18n-js.rb
socialcast-i18n-js-4.0.0.rc3 lib/i18n-js.rb
socialcast-i18n-js-4.0.0.rc2 lib/i18n-js.rb
socialcast-i18n-js-4.0.0.rc1 lib/i18n-js.rb