Skip to content

Suggestion: Use PluralRules instead of Count #5369

Open
@younies

Description

@younies

Summary

Currently, the enum Count is being used in multiple places around icu4x, such as units, currency, decimal ... etc.

  • I suggest implement in PluralRules place an enum called l PluralRuleCount, which would contain all the CLDR counts:
pub enum PluralRulesCount {

  Zero,
  One,
  Two,
... etc.
}
  • All data providers should adopt this standardized PluralRuleCount.
  • If users need to use extra counts or variations, they should extend the existing PluralRuleCount.
    • Example:
     pub enum CompactDecimalCount {
          PluralRules(PluralRulesCount)
           Explicit1,
           Explicit0,
     }

Metadata

Metadata

Assignees

Labels

C-pluralrulesComponent: Plural rulesS-smallSize: One afternoon (small bug fix or enhancement)

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions