[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search

CLDR Ticket #10922(accepted spec)

Opened 5 months ago

Last modified 2 days ago

Clarifying usage of count="0" or count="1"

Reported by: pedberg Owned by: pedberg
Component: units Data Locale:
Phase: spec-beta Review:
Weeks: Data Xpath:


For unitPattern elements, for the count attribute, we allow values of "0" and "1" in addition to the normal plural category keywords "zero", "one", "two", "few", "many", "other":

We also allow this for characterLabelPattern elements in some cases:

However, we do not explain what these count values mean, or how to use them:

  • Do they refer to the exact numeric values 0.0 and 1.0, regardless of how the number is formatted?
  • How are they intended to be used vis-a-vis the keywords "zero" and "one" (which presumably overlap"0" and "1" in some cases), if rules exist for both? Do the "0" and "1" rules, if matched, take precedence over "zero" and "one" rules respectively, which might also match?

We need to call more attention to these cases and clarify their use. Possibly because this is not currently clear, at least some ICU formatting code for plural forms (e.g. for units?) does not currently appear to support the "0" or "1" cases. Perhaps not a big issue since we do not currently seem to have any CLDR data that uses the "0" or "1" cases.


Change History

comment:1 Changed 5 months ago by mark

  • Status changed from new to accepted
  • Cc markus added
  • Priority changed from assess to major
  • Phase changed from spec-beta to dsub
  • Milestone changed from UNSCH to 34
  • Owner changed from anybody to pedberg

Intended usage of these are optional forms for cases like:

You have no books

instead of

You have {0} books captured under 'other'.

So it is purely up the the message writer whether to include =0, =1, etc.

The values are identity tests, eg x == 0

comment:2 Changed 2 days ago by pedberg

  • Phase changed from dsub to spec-beta

comment:3 Changed 2 days ago by shane

If ICU unit formatting doesn't support these plural forms (=0 and =1), it should be a pretty quick fix and I'm happy to take a look if there's a test case.


Add a comment

Modify Ticket

as accepted

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.