|
1 |
| -// (c) 2012-2018 Airbnb, Inc. |
2 |
| -// |
3 |
| -// polyglot.js may be freely distributed under the terms of the BSD |
4 |
| -// license. For all licensing information, details, and documentation: |
5 |
| -// http://airbnb.github.com/polyglot.js |
6 |
| -// |
7 |
| -// |
8 |
| -// Polyglot.js is an I18n helper library written in JavaScript, made to |
9 |
| -// work both in the browser and in Node. It provides a simple solution for |
10 |
| -// interpolation and pluralization, based off of Airbnb's |
11 |
| -// experience adding I18n functionality to its Backbone.js and Node apps. |
12 |
| -// |
13 |
| -// Polylglot is agnostic to your translation backend. It doesn't perform any |
14 |
| -// translation; it simply gives you a way to manage translated phrases from |
15 |
| -// your client- or server-side JavaScript application. |
16 |
| -// |
17 |
| - |
18 | 1 | 'use strict';
|
19 | 2 |
|
20 | 3 | var entries = require('object.entries');
|
@@ -55,7 +38,7 @@ var defaultPluralRules = {
|
55 | 38 | return lastTwo >= 11 ? 4 : 5;
|
56 | 39 | },
|
57 | 40 | bosnian_serbian: russianPluralGroups,
|
58 |
| - chinese: function () { return 0; }, |
| 41 | + chinese: function (n) { return n === 1 ? 0 : 1; }, |
59 | 42 | croatian: russianPluralGroups,
|
60 | 43 | french: function (n) { return n >= 2 ? 1 : 0; },
|
61 | 44 | german: function (n) { return n !== 1 ? 1 : 0; },
|
|
0 commit comments