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 |
---|---|
i18n-0.3.3 | lib/i18n/gettext.rb |
i18n-0.3.2 | lib/i18n/gettext.rb |
i18n-0.3.1 | lib/i18n/gettext.rb |
i18n-0.3.0 | lib/i18n/gettext.rb |