Sha256: 113883ad7be16254c7a2f2481f2e1236e5a1450b0980c4eb0fde2d5c865e4095

Contents?: true

Size: 841 Bytes

Versions: 24

Compression:

Stored size: 841 Bytes

Contents

require 'fast_gettext/mo_file'
require 'fast_gettext/storage'
require 'fast_gettext/translation'
require 'fast_gettext/translation_repository'
require File.join(File.dirname(__FILE__),'..','vendor','string')

module FastGettext
  include FastGettext::Storage
  extend self

  LOCALE_REX =  /^[a-z]{2}$|^[a-z]{2}_[A-Z]{2}$/
  NAMESPACE_SEPERATOR = '|'

  # users should not include FastGettext, since this would conterminate their namespace
  # rather use
  # FastGettext.locale = ..
  # FastGettext.text_domain = ..
  # and
  # include FastGettext::Translation
  FastGettext::Translation.public_instance_methods.each do |method|
    define_method method do |*args|
      Translation.send(method,*args)
    end
  end

  def add_text_domain(name,options)
    translation_repositories[name] = TranslationRepository.build(name,options)
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
grosser-fast_gettext-0.2.11 lib/fast_gettext.rb
grosser-fast_gettext-0.3.0 lib/fast_gettext.rb
grosser-fast_gettext-0.3.1 lib/fast_gettext.rb
grosser-fast_gettext-0.3.2 lib/fast_gettext.rb
grosser-fast_gettext-0.3.3 lib/fast_gettext.rb
grosser-fast_gettext-0.3.4 lib/fast_gettext.rb
grosser-fast_gettext-0.3.5 lib/fast_gettext.rb
grosser-fast_gettext-0.3.6 lib/fast_gettext.rb
grosser-fast_gettext-0.3.7 lib/fast_gettext.rb
grosser-fast_gettext-0.3.8 lib/fast_gettext.rb
grosser-fast_gettext-0.4.0 lib/fast_gettext.rb
grosser-fast_gettext-0.4.10 lib/fast_gettext.rb
grosser-fast_gettext-0.4.11 lib/fast_gettext.rb
grosser-fast_gettext-0.4.12 lib/fast_gettext.rb
grosser-fast_gettext-0.4.13 lib/fast_gettext.rb
grosser-fast_gettext-0.4.14 lib/fast_gettext.rb
grosser-fast_gettext-0.4.15 lib/fast_gettext.rb
grosser-fast_gettext-0.4.2 lib/fast_gettext.rb
grosser-fast_gettext-0.4.3 lib/fast_gettext.rb
grosser-fast_gettext-0.4.4 lib/fast_gettext.rb