-
Notifications
You must be signed in to change notification settings - Fork 0
/
langs-plurals.txt
125 lines (86 loc) · 4.22 KB
/
langs-plurals.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
data/langs/plurals.json
~~~~~~~~~~~~~~~~~~~~~~~
Plural rules.
* Structure
The file contains a JSON object with following name/value pairs:
forms [object]
Definitions for plural forms referenced from plural rules. Names
are opaque strings identifying plural forms. Values are their
descriptions, represented as objects with following name/value
pairs:
examples [string]
Example of numbers belonging to this plural form, represented
as U+0020-separated list of non-negative integers with no
leading zero.
expression [plural-expression]
An expression that returns true if and only if /n/ is a number
that belongs to this plural form.
typical [integer]
A typical non-negative integer that belongs to this plural
form.
rules [object]
Plural rules. Names are opaque strings identifying plural rules.
Values are their descriptions, represented as objects with
following name/value pairs:
cldr_locales [object?]
CLDR locales using the plural rule, if any. Names are the
|type| attribute value of the |plurals| element (|ordinal| or
|cardinal| at the time of writing) and values are
corresponding object, where names are the Unicode locale
identifiers and values are [boolean] true values.
expression [plural-expression]
An expression that represents the plural rule.
forms [array]
The plural forms used in this plural rule. The length of the
array represents the number of the forms used in this plural
rule. The items of the array are the names of the plural
forms used in this plural rule (i.e. names in the |forms|
top-level object in the file).
serializations [object]
Known serializations of the plural rule. In this data file, a
plural rule is considered as a set of plural forms. Plural
rules in various wire formats are defined a list of plural
forms, rather than a set. Such variations of plural rule
representations are considered as "serializations" of a set.
Names are opaque strings identifying plural rule
serializations. Values are their descriptions, represented as
objects with following name/value pairs:
expressions [object]
Expressions that represents the plural rule serialization,
used in the wild. Names are expressions and values are
[boolean] true values.
fields [string]
Mapping from plural forms in the plural rules to plural
form fields in the serializations. The value is a
U+002F-separated list of (zero-based) indexes or "-". An
index references the plural form in the |forms| array of
the plural rule object, while "-" indicates that the field
is not in fact used.
mozilla_rule [integer?]
The plural rule number used in Mozilla PluralForm
implementation, as documented in
<https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals>,
if assigned.
* Data type
plural-expression
An expression syntax used in the |plural| part of the
|Plural-Forms:| field of .PO files. In this file, the expression is
normalized by removing any space character.
* Sources
Additional functions for plural forms
<https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html>.
Localization and Plurals
<https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals>.
gecko-dev/PluralForm.jsm at master - mozilla/gecko-dev
<https://github.com/mozilla/gecko-dev/blob/master/intl/locale/PluralForm.jsm>.
Language Plural Rules
<https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html>.
* License
You are granted a license to use, reproduce and create derivative
works of this file.
Per CC0 <https://creativecommons.org/publicdomain/zero/1.0/>, to the
extent possible under law, the author of the JSON file and this
document has waived all copyright and related or neighboring rights to
the JSON file and this document.
The JSON file contains data extracted from CLDR. See
|LICENSE.unicode| for their license.