mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Merge pull request #4423 from SafaAlfulaij/arabic_client_plural_rules
Add Arabic Pluralization Rules for Client
This commit is contained in:
commit
acaac02673
1 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,12 @@
|
||||||
//= depend_on 'client.ar.yml'
|
//= depend_on 'client.ar.yml'
|
||||||
//= require locales/i18n
|
//= require locales/i18n
|
||||||
<%= JsLocaleHelper.output_locale(:ar) %>
|
<%= JsLocaleHelper.output_locale(:ar) %>
|
||||||
|
|
||||||
|
I18n.pluralizationRules['ar'] = function (n) {
|
||||||
|
if (n == 0) return "zero";
|
||||||
|
if (n == 1) return "one";
|
||||||
|
if (n == 2) return "two";
|
||||||
|
if (n%100 >= 3 && n%100 <= 10) return "few";
|
||||||
|
if (n%100 >= 11) return "many";
|
||||||
|
return "other";
|
||||||
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue