Sha256: b929efb7c88245f1fe189d97f1a6477b84947fdd7e4e0b45d17b064e353bfa13

Contents?: true

Size: 560 Bytes

Versions: 7

Compression:

Stored size: 560 Bytes

Contents

# Used in Akan, Amharic, Bihari, Filipino, guw, Hindi, Lingala, Malagasy,
# Northen Sotho, Tachelhit, Tagalog, Tigrinya, Walloon.

module RailsI18n
  module Pluralization
    module OneWithZeroOther
      def self.rule
        lambda do |n|
          case n
          when 0, 1 then :one
          else :other
          end
        end
      end

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

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
rails-i18n-8.0.1 lib/rails_i18n/common_pluralizations/one_with_zero_other.rb
rails-i18n-8.0.0 lib/rails_i18n/common_pluralizations/one_with_zero_other.rb
rails-i18n-7.0.10 lib/rails_i18n/common_pluralizations/one_with_zero_other.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/rails-i18n-7.0.9/lib/rails_i18n/common_pluralizations/one_with_zero_other.rb
rails-i18n-7.0.9 lib/rails_i18n/common_pluralizations/one_with_zero_other.rb
rails-i18n-7.0.8 lib/rails_i18n/common_pluralizations/one_with_zero_other.rb
rails-i18n-7.0.7 lib/rails_i18n/common_pluralizations/one_with_zero_other.rb