Merge pull request #605 from kubabrecka/i18n_pluralization

implement pluralization for server-side and js
This commit is contained in:
Robin Ward
2013-04-01 07:48:10 -07:00
5 changed files with 126 additions and 1 deletions
+7
View File
@@ -1,3 +1,10 @@
//= depend_on 'client.cs.yml'
//= require locales/i18n
<%= JsLocaleHelper.output_locale(:cs) %>
I18n.pluralizationRules['cs'] = function (n) {
if (n == 0) return ["zero", "none", "other"];
if (n == 1) return "one";
if (n >= 2 && n <= 4) return "few";
return "other";
}