projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9ea3df
)
Add pluralisation rules for Arabic. Closes #2592.
author
Tom Hughes
<tom@compton.nu>
Sat, 2 Jan 2010 11:57:05 +0000
(11:57 +0000)
committer
Tom Hughes
<tom@compton.nu>
Sat, 2 Jan 2010 11:57:05 +0000
(11:57 +0000)
vendor/plugins/globalize2/lib/globalize/backend/pluralizing.rb
patch
|
blob
|
history
diff --git
a/vendor/plugins/globalize2/lib/globalize/backend/pluralizing.rb
b/vendor/plugins/globalize2/lib/globalize/backend/pluralizing.rb
index 9dd9bb6672f374ec363a09f2975ba52769b0ae47..cbe31a51193138237f73e19ddcb64751300a9614 100644
(file)
--- a/
vendor/plugins/globalize2/lib/globalize/backend/pluralizing.rb
+++ b/
vendor/plugins/globalize2/lib/globalize/backend/pluralizing.rb
@@
-33,6
+33,17
@@
module Globalize
else :other
end
},
+ :ar => lambda { |count, entry|
+ 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 => lambda { |count, entry|
case count % 100
when 11,12,13,14 then :many