Sha256: 4c8e034f2df243d0a113032fc04328da278c9db1fd95ac55b5b6fd14914f516e

Contents?: true

Size: 610 Bytes

Versions: 4

Compression:

Stored size: 610 Bytes

Contents

module RailsI18n
  module Pluralization
    module ScottishGaelic
      def self.rule
        lambda do |n|
          return :other unless n.is_a?(Numeric)

          floorn = n.floor

          if floorn == 1 || floorn == 11
            :one
          elsif floorn == 2 || floorn == 12
            :two
          elsif (3..19).member?(floorn)
            :few
          else
            :other
          end
        end
      end
    end
  end
end

{ :gd => {
    :'i18n' => {
      :plural => {
        :keys => [:one, :two, :few, :other],
        :rule => RailsI18n::Pluralization::ScottishGaelic.rule }}}}

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/rails-i18n-7.0.9/rails/pluralization/gd.rb
rails-i18n-7.0.9 rails/pluralization/gd.rb
rails-i18n-7.0.8 rails/pluralization/gd.rb
rails-i18n-7.0.7 rails/pluralization/gd.rb