diff --git a/app/assets/javascripts/locales/uk.js.erb b/app/assets/javascripts/locales/uk.js.erb index 3978d25c15b..c6aeb8a7ec5 100644 --- a/app/assets/javascripts/locales/uk.js.erb +++ b/app/assets/javascripts/locales/uk.js.erb @@ -6,5 +6,5 @@ I18n.pluralizationRules['uk'] = function (n) { if (n == 0) return ["zero", "none", "other"]; if (n % 10 == 1 && n % 100 != 11) return "one"; if (n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20)) return "few"; - return "many"; + return "other"; // TODO: should be "many" but is not defined in translations }; diff --git a/config/locales/plurals.rb b/config/locales/plurals.rb index 6ab9d3dc5a4..9e6ea0b56e9 100644 --- a/config/locales/plurals.rb +++ b/config/locales/plurals.rb @@ -103,7 +103,8 @@ :tl => { :i18n => { :plural => { :keys => [:one, :other], :rule => lambda { |n| [0, 1].include?(n) ? :one : :other } } } }, :to => { :i18n => { :plural => { :keys => [:other], :rule => lambda { |n| :other } } } }, :tr_TR => { :i18n => { :plural => { :keys => [:other], :rule => lambda { |n| :other } } } }, - :uk => { :i18n => { :plural => { :keys => [:one, :few, :many, :other], :rule => lambda { |n| n % 10 == 1 && n % 100 != 11 ? :one : [2, 3, 4].include?(n % 10) && ![12, 13, 14].include?(n % 100) ? :few : n % 10 == 0 || [5, 6, 7, 8, 9].include?(n % 10) || [11, 12, 13, 14].include?(n % 100) ? :many : :other } } } }, + # TODO put this back when translations are correct: :uk => { :i18n => { :plural => { :keys => [:one, :few, :many, :other], :rule => lambda { |n| n % 10 == 1 && n % 100 != 11 ? :one : [2, 3, 4].include?(n % 10) && ![12, 13, 14].include?(n % 100) ? :few : n % 10 == 0 || [5, 6, 7, 8, 9].include?(n % 10) || [11, 12, 13, 14].include?(n % 100) ? :many : :other } } } }, + :uk => { :i18n => { :plural => { :keys => [:one, :few, :other], :rule => lambda { |n| n % 10 == 1 && n % 100 != 11 ? :one : [2, 3, 4].include?(n % 10) && ![12, 13, 14].include?(n % 100) ? :few : n % 10 == 0 || [5, 6, 7, 8, 9].include?(n % 10) || [11, 12, 13, 14].include?(n % 100) ? :other : :other } } } }, :ur => { :i18n => { :plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } }, :vi => { :i18n => { :plural => { :keys => [:other], :rule => lambda { |n| :other } } } }, :wa => { :i18n => { :plural => { :keys => [:one, :other], :rule => lambda { |n| [0, 1].include?(n) ? :one : :other } } } }, diff --git a/lib/javascripts/locale/uk.js b/lib/javascripts/locale/uk.js index aad90c79729..edb43885ab4 100644 --- a/lib/javascripts/locale/uk.js +++ b/lib/javascripts/locale/uk.js @@ -8,7 +8,8 @@ MessageFormat.locale.uk = function (n) { } if ((n % 10) === 0 || ((n % 10) >= 5 && (n % 10) <= 9) || ((n % 100) >= 11 && (n % 100) <= 14) && n == Math.floor(n)) { - return 'many'; + // return 'many'; + return 'other'; // TODO should be "many" but is not defined in translations } return 'other'; };