-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathcs.dart
More file actions
32 lines (29 loc) · 730 Bytes
/
cs.dart
File metadata and controls
32 lines (29 loc) · 730 Bytes
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
import '../i18n.dart';
///
/// Quantity category resolver for czech.
///
/// See:
///
/// https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#cs
///
///
QuantityCategory quantityResolver(int count, QuantityType type) {
if (type == QuantityType.ordinal) return _resolveOrdinal(count);
return _resolveCardinal(count);
}
QuantityCategory _resolveCardinal(int count) {
switch (count) {
case 1:
return QuantityCategory.one;
case 2:
return QuantityCategory.few;
case 3:
return QuantityCategory.few;
case 4:
return QuantityCategory.few;
}
return QuantityCategory.other;
}
QuantityCategory _resolveOrdinal(int count) {
return QuantityCategory.other;
}