Permalink
Browse files

Merge pull request #276 from s-andringa/issue-275

Adhere to CLDR standard for Hungarian pluralization [#275].
  • Loading branch information...
kfl62 committed Nov 16, 2012
2 parents 408b9c3 + 647cb0e commit 4eb7418af933646488c0fec02d47051f25bece0e
@@ -1,18 +0,0 @@
-# Used in Hungarian
-module RailsI18n
- module Pluralization
- module OnlyOne
- def self.rule
- Proc.new { :one }
- end
-
- def self.with_locale(locale)
- { locale => {
- :'i18n' => {
- :plural => {
- :keys => [:one],
- :rule => rule }}}}
- end
- end
- end
-end
@@ -1,3 +1,3 @@
-require 'rails_i18n/common_pluralizations/only_one'
+require 'rails_i18n/common_pluralizations/other'
-::RailsI18n::Pluralization::OnlyOne.with_locale(:hu)
+::RailsI18n::Pluralization::Other.with_locale(:hu)
@@ -1,11 +0,0 @@
-shared_examples 'one form language' do
- it 'has "other" plural keys' do
- plural_keys.should == [:one]
- end
-
- [0, 1, 1.2, 2, 5, 11, 21, 22, 27, 99, 1000].each do |count|
- it "detects that #{count} in category 'one'" do
- rule.call(count).should == :one
- end
- end
-end
@@ -8,7 +8,6 @@
require 'support/pluralization_file'
require 'unit/pluralization/ordinary'
-require 'unit/pluralization/one'
require 'unit/pluralization/other'
require 'unit/pluralization/one_with_zero_other'
require 'unit/pluralization/one_upto_two_other'
@@ -283,7 +282,7 @@
describe 'Hungarian', :locale => :hu do
it_behaves_like 'an ordinary pluralization rule'
- it_behaves_like 'one form language'
+ it_behaves_like 'other form language'
end
describe 'Igbo', :locale => :ig do

0 comments on commit 4eb7418

Please sign in to comment.