Sha256: 73e5536d4991494819904a5ef2e4b15cf604d19548800611b7a7d5d91ff253c1

Contents?: true

Size: 562 Bytes

Versions: 11

Compression:

Stored size: 562 Bytes

Contents

{
  :uk => {
    :pluralize => lambda { |n|      
      modulo10 = n.modulo(10)
      modulo100 = n.modulo(100)
      
      if modulo10 == 1 && modulo100 != 11
        :one
      elsif (modulo10 == 2 || modulo10 == 3 || modulo10 == 4) && !(modulo100 == 12 || modulo100 == 13 || modulo100 == 14)
        :few
      elsif modulo10 == 0 || (modulo10 == 5 || modulo10 == 6 || modulo10 == 7 || modulo10 == 8 || modulo10 == 9) || (modulo100 == 11 || modulo100 == 12 || modulo100 == 13 || modulo100 == 14)
        :many
      else
        :other
      end
    }
  }
}

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
romanvbabenko-ukrainian-0.1.0 lib/ukrainian/locale/pluralize.rb
romanvbabenko-ukrainian-0.2.1 lib/ukrainian/locale/pluralize.rb
romanvbabenko-ukrainian-0.2.2 lib/ukrainian/locale/pluralize.rb
ukrainian-2.6.0 lib/ukrainian/locales/pluralize.rb
ukrainian-2.5.3 lib/ukrainian/locales/pluralize.rb
ukrainian-2.5.2 lib/ukrainian/locales/pluralize.rb
ukrainian-2.4.2 lib/ukrainian/locales/pluralize.rb
ukrainian-2.4.1 lib/ukrainian/locales/pluralize.rb
ukrainian-2.3.1 lib/ukrainian/locales/pluralize.rb
ukrainian-2.3.0 lib/ukrainian/locales/pluralize.rb
ukrainian-0.2.2 lib/ukrainian/locale/pluralize.rb