Sha256: ceb094210a4fcca701993d2bd060dd7bf4a64d1b423b99cb11736bafb0240b46
Contents?: true
Size: 627 Bytes
Versions: 7
Compression:
Stored size: 627 Bytes
Contents
# Used for Moldavian, Romanian. module RailsI18n module Pluralization module Romanian FROM_1_TO_19 = (1..19).to_a.freeze def self.rule lambda do |n| return :other unless n.is_a?(Numeric) if n == 1 :one elsif n == 0 || FROM_1_TO_19.include?(n % 100) :few else :other end end end def self.with_locale(locale) { locale => { :'i18n' => { :plural => { :keys => [:one, :few, :other], :rule => rule }}}} end end end end
Version data entries
7 entries across 7 versions & 2 rubygems