module I18n::Gettext
Constants
- CONTEXT_SEPARATOR
- PLURAL_SEPARATOR
Public Instance Methods
extract_scope(msgid, separator)
click to toggle source
# File lib/i18n/gettext.rb, line 18 def extract_scope(msgid, separator) scope = msgid.to_s.split(separator) msgid = scope.pop [scope, msgid] end
plural_keys(locale)
click to toggle source
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
# File lib/i18n/gettext.rb, line 14 def plural_keys(locale) @@plural_keys[locale] || @@plural_keys[:en] end