Sha256: 049b8d6eb555c02e36f16928e78c68036e08f1eb689db550d510a8478ee95562

Contents?: true

Size: 598 Bytes

Versions: 7

Compression:

Stored size: 598 Bytes

Contents

# -*- encoding: utf-8 -*- 

{
  :'pl' => {
    :i18n => {
      :plural => {
        :rule => lambda { |n| 
          # taken from http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
          # TODO: check if they're really wrong about 22..24
          #
          #   one -> n is 1;
          #   few -> n mod 10 in 2..4 and n mod 100 not in 12..14;
          #   other -> everything else
          #
          n == 1 ? :one : [2, 3, 4].include?(n % 10) && 
                          ![12, 13, 14].include?(n % 100) ? :few : :other 
        }
      }
    }
  }
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
polish-0.1.6 lib/polish/locale/pluralize.rb
polish-0.1.5 lib/polish/locale/pluralize.rb
polish-0.1.4 lib/polish/locale/pluralize.rb
polish-0.1.3 lib/polish/locale/pluralize.rb
polish-0.1.2 lib/polish/locale/pluralize.rb
polish-0.1.1 lib/polish/locale/pluralize.rb
polish-0.1.0 lib/polish/locale/pluralize.rb