module RailsI18n::Pluralization::EastSlavic

def self.rule

def self.rule
  lambda do |n|
    return :other unless n.is_a?(Numeric)
    mod10 = n % 10
    mod100 = n % 100
    if mod10 == 1 && mod100 != 11
      :one
    elsif FROM_2_TO_4.include?(mod10) && !FROM_12_TO_14.include?(mod100)
      :few
    elsif mod10 == 0 || FROM_5_TO_9.include?(mod10) || FROM_11_TO_14.include?(mod100)
      :many
    else
      :other
    end
  end
end

def self.with_locale(locale)

def self.with_locale(locale)
  { locale => {
      :i18n => {
        :plural => {
          :keys => [:one, :few, :many, :other],
          :rule => rule }}}}
end