Sha256: fdedf3e993447a4aa52ddcb2f55aab7397df0e3448d88bbacc4c267d1afedd50
Contents?: true
Size: 625 Bytes
Versions: 2
Compression:
Stored size: 625 Bytes
Contents
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 = nil) scope = msgid.to_s.split(separator || '|') msgid = scope.pop [scope, msgid] end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
theoooo-i18n-0.2.1 | lib/i18n/gettext.rb |
theoooo-i18n-0.2.2 | lib/i18n/gettext.rb |