Skip to content

Commit

Permalink
add Armenian pluralization rule
Browse files Browse the repository at this point in the history
  • Loading branch information
jhass committed Jan 3, 2013
1 parent 26139fc commit 38eba67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Expand Up @@ -34,6 +34,7 @@
* Fix insecure image of cat on user edit page - New photo courtesy of [khanb1 on flickr](http://www.flickr.com/photos/albaraa/) under CC BY 2.0.
* Allow translation of "suggest member" of Community Spotlight. [#3791](https://github.com/diaspora/diaspora/issues/3791)
* Resize deletelabel and ignoreuser images to align them [#3779](https://github.com/diaspora/diaspora/issues/3779)
* Patch in Armenian pluralization rule until CLDR provides it.

## Gem Updates

Expand Down
6 changes: 4 additions & 2 deletions config/locales/cldr/plurals.rb
@@ -1,5 +1,7 @@
{
:'art-nvi' => { :i18n => {:plural => { :keys => [:zero, :one, :two, :few, :other], :rule => lambda { |n| n == 0 ? :zero : n == 1 ? :one : n == 2 ? :two : n == 3 ? :few : :other }, :js_rule => 'function (n) { return n == 0 ? "zero" : n == 1 ? "one" : n == 2 ? "two" : n == 3 ? "few" : "other" }' } } }, :ar => { :i18n => {:plural => { :keys => [:zero, :one, :two, :few, :many, :other], :rule => lambda { |n| n == 0 ? :zero : n == 1 ? :one : n == 2 ? :two : [3, 4, 5, 6, 7, 8, 9, 10].include?(n % 100) ? :few : [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99].include?(n % 100) ? :many : :other }, :js_rule => 'function (n) { return n == 0 ? "zero" : n == 1 ? "one" : n == 2 ? "two" : jQuery.inArray(n % 100, [3, 4, 5, 6, 7, 8, 9, 10]) != -1 ? "few" : jQuery.inArray(n % 100, [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]) != -1 ? "many" : "other" }' } } },
:'art-nvi' => { :i18n => {:plural => { :keys => [:zero, :one, :two, :few, :other], :rule => lambda { |n| n == 0 ? :zero : n == 1 ? :one : n == 2 ? :two : n == 3 ? :few : :other }, :js_rule => 'function (n) { return n == 0 ? "zero" : n == 1 ? "one" : n == 2 ? "two" : n == 3 ? "few" : "other" }' } } },
:hy => { :i18n => {:plural => { :keys => [:other], :rule => lambda { |n| :other }, :js_rule => 'function (n) { return "other"; }' } } },
:ar => { :i18n => {:plural => { :keys => [:zero, :one, :two, :few, :many, :other], :rule => lambda { |n| n == 0 ? :zero : n == 1 ? :one : n == 2 ? :two : [3, 4, 5, 6, 7, 8, 9, 10].include?(n % 100) ? :few : [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99].include?(n % 100) ? :many : :other }, :js_rule => 'function (n) { return n == 0 ? "zero" : n == 1 ? "one" : n == 2 ? "two" : jQuery.inArray(n % 100, [3, 4, 5, 6, 7, 8, 9, 10]) != -1 ? "few" : jQuery.inArray(n % 100, [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]) != -1 ? "many" : "other" }' } } },
:bg => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other }, :js_rule => 'function (n) { return n == 1 ? "one" : "other" }' } } },
:br => { :i18n => {:plural => { :keys => [:one, :two, :few, :many, :other], :rule => lambda { |n| n % 10 == 1 && n ? :one : n % 10 == 2 && n ? :two : [3, 4].include?(n % 10) && ![10, 11, 12, 13, 14, 15, 16, 17, 18, 19].include?(n % 100) ? :few : n != 0 && n % 1000000 == 0 ? :many : :other }, :js_rule => 'function (n) { return n % 10 == 1 && n ? "one" : n % 10 == 2 && n ? "two" : jQuery.inArray(n % 10, [3, 4]) != -1 && !jQuery.inArray(n % 100, [10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) != -1 ? "few" : n != 0 && n % 1000000 == 0 ? "many" : "other" }' } } },
:ca => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other }, :js_rule => 'function (n) { return n == 1 ? "one" : "other" }' } } },
Expand Down Expand Up @@ -49,4 +51,4 @@
:ur => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other }, :js_rule => 'function (n) { return n == 1 ? "one" : "other" }' } } },
:vi => { :i18n => {:plural => { :keys => [:other], :rule => lambda { |n| :other }, :js_rule => 'function (n) { return "other" }' } } },
:zh => { :i18n => {:plural => { :keys => [:other], :rule => lambda { |n| :other }, :js_rule => 'function (n) { return "other" }' } } }
}
}

0 comments on commit 38eba67

Please sign in to comment.