Sha256: b8ffe4b406e5e5136617ca558f86af3c00c610acdb17d8620d7ec94ef6f3ed24

Contents?: true

Size: 628 Bytes

Versions: 104

Compression:

Stored size: 628 Bytes

Contents

# encoding: utf-8

module I18n
  module Gettext
    PLURAL_SEPARATOR  = "\001"
    CONTEXT_SEPARATOR = "\004"

    @@plural_keys = { :en => [:one, :other] }

    class << self
      # returns an array of plural keys for the given locale so that we can
      # convert from gettext's integer-index based style
      # TODO move this information to the pluralization module
      def plural_keys(locale)
        @@plural_keys[locale] || @@plural_keys[:en]
      end

      def extract_scope(msgid, separator)
        scope = msgid.to_s.split(separator)
        msgid = scope.pop
        [scope, msgid]
      end
    end
  end
end

Version data entries

104 entries across 74 versions & 6 rubygems

Version Path
depengine-0.0.31 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.31 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.30 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.30 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.29 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.29 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.28 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.28 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.27 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.27 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.26 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.26 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.25 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.25 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.24 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.24 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.23 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.23 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.22 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb
depengine-0.0.22 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb