Sha256: fc03a66ef0ba1c1147d82ad375f5d06554cec463a87aa7be98742d8906185588

Contents?: true

Size: 402 Bytes

Versions: 5

Compression:

Stored size: 402 Bytes

Contents

# Used for French, Fulah, Kabyle.

module RailsI18n
  module Pluralization
    module OneUptoTwoOther
      def self.rule
        lambda { |n| (0...2).cover?(n) ? :one : :other }
      end

      def self.with_locale(locale)
        { locale => {
            :'i18n' => {
              :plural => {
                :keys => [:one, :other],
                :rule => rule }}}}
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails-i18n-0.6.1 lib/rails_i18n/common_pluralizations/one_upto_two_other.rb
rails-i18n-0.6.0.beta1 lib/rails_i18n/common_pluralizations/one_upto_two_other.rb
rails-i18n-0.5.2 lib/rails_i18n/common_pluralizations/one_upto_two_other.rb
rails-i18n-0.5.1 lib/rails_i18n/common_pluralizations/one_upto_two_other.rb
rails-i18n-0.5.0.beta1 lib/rails_i18n/common_pluralizations/one_upto_two_other.rb