Update rails-i18n to 0.5.1

This update allows us to drop our pluralization support, as rails-i18n
now takes care of that, and for a far wider range of locales.
This commit is contained in:
Tom Hughes 2012-03-02 09:19:12 +00:00
parent a678a330ef
commit 06934ad375
4 changed files with 3 additions and 56 deletions

View file

@ -11,7 +11,7 @@ gem 'pg'
gem 'jquery-rails'
# Load rails plugins
gem 'rails-i18n'
gem 'rails-i18n', ">= 0.5.1"
gem 'dynamic_form'
gem 'rinku', '>= 1.2.2', :require => 'rails_rinku'
gem 'oauth-plugin', '>= 0.4.0.pre7'

View file

@ -108,7 +108,7 @@ GEM
activesupport (= 3.2.1)
bundler (~> 1.0)
railties (= 3.2.1)
rails-i18n (0.4.0)
rails-i18n (0.5.1)
i18n (~> 0.5)
railties (3.2.1)
actionpack (= 3.2.1)
@ -167,7 +167,7 @@ DEPENDENCIES
paperclip (~> 2.0)
pg
rails (= 3.2.1)
rails-i18n
rails-i18n (>= 0.5.1)
rinku (>= 1.2.2)
sanitize
sass-rails (~> 3.2.3)

View file

@ -18,10 +18,7 @@ module I18n
end
end
I18n::Backend::Simple.include(I18n::Backend::Pluralization)
I18n::Backend::Simple.include(I18n::Backend::PluralizationFallback)
I18n.load_path << "#{Rails.root}/config/pluralizers.rb"
I18n::Backend::Simple.include(I18n::Backend::Fallbacks)
I18n.fallbacks.map("no" => "nb")

View file

@ -1,50 +0,0 @@
{
:ar => {
:i18n => {
:plural => {
:rule => lambda { |count|
case count
when 1 then :one
when 2 then :two
else case count % 100
when 3..10 then :few
when 11..99 then :many
else :other
end
end
}
}
}
},
:ru => {
:i18n => {
:plural => {
:rule => lambda { |count|
case count % 100
when 11,12,13,14 then :many
else case count % 10
when 1 then :one
when 2,3,4 then :few
when 5,6,7,8,9,0 then :many
else :other
end
end
}
}
}
},
:sl => {
:i18n => {
:plural => {
:rule => lambda { |count|
case count % 100
when 1 then :one
when 2 then :two
when 3,4 then :few
else :other
end
}
}
}
}
}