Sha256: da7366083d9049a4a8ab7cb8fa0b11c9ed9acc024100ff87b2e5e65792284c38
Contents?: true
Size: 736 Bytes
Versions: 25
Compression:
Stored size: 736 Bytes
Contents
module RailsI18n module Pluralization module Breton def self.rule lambda do |n| mod10 = n % 10 mod100 = n % 100 if mod10 == 1 && ![11,71,91].include?(mod100) :one elsif mod10 == 2 && ![12,72,92].include?(mod100) :two elsif [3,4,9].include?(mod10) && !((10..19).to_a + (70..79).to_a + (90..99).to_a).include?(mod100) :few elsif n % 1000000 == 0 && n != 0 :many else :other end end end end end end { :br => { :'i18n' => { :plural => { :keys => [:one, :two, :few, :many, :other], :rule => RailsI18n::Pluralization::Breton.rule }}}}
Version data entries
25 entries across 25 versions & 1 rubygems