Commit ba0881a9 authored by kolosfed's avatar kolosfed

Adding Ukrainian pluralization rules

parent 91c22087
I18n.available_locales = [:uk] I18n.available_locales = [:uk]
I18n.default_locale = :uk I18n.default_locale = :uk
\ No newline at end of file
I18n::Backend::Simple.include(I18n::Backend::Pluralization)
\ No newline at end of file
{
uk: {
i18n: {
plural: {
keys: [:one, :few, :many, :other],
rule: lambda do |n|
if n % 10 == 1 && n % 100 != 11
:one
elsif [2, 3, 4].include?(n % 10) && ![12, 13, 14].include?(n % 100)
:few
elsif n % 10 == 0 || [5, 6, 7, 8, 9].include?(n % 10) || [11, 12, 13, 14].include?(n % 100)
:many
else
:other
end
end
}
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment