mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 21:10:17 +08:00
commit
a344b1ed37
|
@ -1,3 +1,9 @@
|
|||
//= depend_on 'client.ro.yml'
|
||||
//= require locales/i18n
|
||||
<%= JsLocaleHelper.output_locale(:ro) %>
|
||||
|
||||
I18n.pluralizationRules['ro'] = function (n) {
|
||||
if (n == 1) return "one";
|
||||
if (n >= 1 && n <= 19) return "few";
|
||||
return "other";
|
||||
};
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
:ps => { :i18n => { :plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } },
|
||||
:pt => { :i18n => { :plural => { :keys => [:one, :other], :rule => lambda { |n| [0, 1].include?(n) ? :one : :other } } } },
|
||||
:pt_BR => { :i18n => { :plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } },
|
||||
:ro => { :i18n => { :plural => { :keys => [:one, :few, :other], :rule => lambda { |n| n == 1 ? :one : n == 0 ? :few : :other } } } },
|
||||
:ro => { :i18n => { :plural => { :keys => [:one, :few, :other], :rule => lambda { |n| n == 1 ? :one : n >= 1 && n <= 19 ? :few : :other } } } },
|
||||
:ru => { :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 : :other } } } },
|
||||
:se => { :i18n => { :plural => { :keys => [:one, :two, :other], :rule => lambda { |n| n == 1 ? :one : n == 2 ? :two : :other } } } },
|
||||
:sh => { :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 } } } },
|
||||
|
|
Loading…
Reference in New Issue
Block a user