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

CLDR Ticket #6722(closed enhancement: fixed)

Opened 5 years ago

Last modified 4 years ago

Plurals for ranges

Reported by: mark Owned by: mark
Component: plurals Data Locale:
Phase: Review: pedberg
Weeks: Data Xpath:
Xref:

ticket:7071

Description (last modified by mark) (diff)

In CLDR 24, we can format number ranges, like "1-3". When we have a message like "{1} day", the placeholder can be replaced by either a formatted number or a formatted number range. However, we don't have the structure (or data) to represent that.

My initial assumption is that the plural category for the range only needs to depend on the category of the start and of the end. We can start collecting data on that basis, but determine if there are exceptions.

If that assumption turns out to be reasonable, I suggest that we have some structure for plurals like:

<pluralRules locales="ak bh guw ln mg nso pa ti wa">
  <pluralRule count="one">n = 0..1 ...</pluralRule>
   ...
   <rangePlural start="one" end="other">other</rangePlural> 
   ...
</pluralRules>

Attachments

Change History

comment:1 Changed 5 years ago by mark

  • Description modified (diff)

comment:2 Changed 5 years ago by mark

  • Owner changed from anybody to mark
  • Priority changed from assess to major
  • Status changed from new to assigned
  • Component changed from unknown to data
  • Milestone changed from UNSCH to 25dsub

comment:3 Changed 5 years ago by emmons

  • Milestone changed from 25dsub to 25rc

Moving all 25dsub and 25design tickets to 25rc. If you plan to complete items in the 25M1 time frame, please move those tickets to 25M1.

comment:4 Changed 5 years ago by mark

We have gathered data for the plural ranges. We're not quite done, but here is the structure and most of the data. "?" for the items yet to be done.

Note: anything with a result of "other" is the default, and is omitted.
Also: we could make the rules somewhat shorter if a missing start stood for *any* start, and missing end stood for *any* end. Welsh, for example, could be simplified to the following (since it only depends on the end value):

   <pluralRanges locales="cy">
      <pluralRange end="one" result="one" />
      <pluralRange end="two" result="two" />
      <pluralRange end="few" result="few" />
      <pluralRange end="many" result="many" />
   </pluralRanges>

Anyway, here is the list.

<?xml version="1.0" encoding="UTF-8"?>
<pluralRules>
   <pluralRanges locales="af bg ca en es es_419 et eu fa fi nb sv ur" />

   <pluralRanges locales="am">
      <pluralRange start="one" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="ar">
      <pluralRange start="zero" end="one" result="zero" />
      <pluralRange start="zero" end="two" result="zero" />
      <pluralRange start="zero" end="few" result="few" />
      <pluralRange start="zero" end="many" result="many" />
      <pluralRange start="one" end="two" result="?" />
      <pluralRange start="one" end="few" result="few" />
      <pluralRange start="one" end="many" result="many" />
      <pluralRange start="two" end="few" result="few" />
      <pluralRange start="two" end="many" result="many" />
      <pluralRange start="few" end="few" result="few" />
      <pluralRange start="few" end="many" result="many" />
      <pluralRange start="many" end="few" result="few" />
      <pluralRange start="many" end="many" result="many" />
      <pluralRange start="other" end="few" result="few" />
      <pluralRange start="other" end="many" result="many" />
   </pluralRanges>

   <pluralRanges locales="az">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="bn">
      <pluralRange start="one" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="cs">
      <pluralRange start="one" end="few" result="few" />
      <pluralRange start="one" end="many" result="many" />
      <pluralRange start="few" end="few" result="few" />
      <pluralRange start="few" end="many" result="many" />
      <pluralRange start="many" end="one" result="one" />
      <pluralRange start="many" end="few" result="few" />
      <pluralRange start="many" end="many" result="many" />
      <pluralRange start="other" end="one" result="one" />
      <pluralRange start="other" end="few" result="few" />
      <pluralRange start="other" end="many" result="many" />
   </pluralRanges>

   <pluralRanges locales="cy">
      <pluralRange start="zero" end="one" result="one" />
      <pluralRange start="zero" end="two" result="two" />
      <pluralRange start="zero" end="few" result="few" />
      <pluralRange start="zero" end="many" result="many" />
      <pluralRange start="one" end="two" result="two" />
      <pluralRange start="one" end="few" result="few" />
      <pluralRange start="one" end="many" result="many" />
      <pluralRange start="two" end="few" result="few" />
      <pluralRange start="two" end="many" result="many" />
      <pluralRange start="few" end="many" result="many" />
      <pluralRange start="other" end="many" result="many" />
   </pluralRanges>

   <pluralRanges locales="da">
      <pluralRange start="one" end="one" result="one" />
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="de">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="el">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="en_GB">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="fil">
      <pluralRange start="one" end="one" result="one" />
      <pluralRange start="one" end="9" result="9" />
      <pluralRange start="one" end="9" result="one" />
      <pluralRange start="other" end="9" result="one" />
   </pluralRanges>

   <pluralRanges locales="fr">
      <pluralRange start="one" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="fr_CA">
      <pluralRange start="one" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="gl">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="gu">
      <pluralRange start="one" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="he">
      <pluralRange start="one" end="two" result="two" />
      <pluralRange start="one" end="many" result="many" />
      <pluralRange start="two" end="many" result="one" />
      <pluralRange start="many" end="many" result="many" />
      <pluralRange start="many" end="other" result="many" />
      <pluralRange start="other" end="many" result="many" />
   </pluralRanges>

   <pluralRanges locales="hi">
      <pluralRange start="one" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="hr">
      <pluralRange start="one" end="one" result="one" />
      <pluralRange start="one" end="few" result="few" />
      <pluralRange start="few" end="one" result="one" />
      <pluralRange start="few" end="few" result="few" />
      <pluralRange start="other" end="one" result="one" />
      <pluralRange start="other" end="few" result="few" />
   </pluralRanges>

   <pluralRanges locales="hu">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="hy">
      <pluralRange start="one" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="is">
      <pluralRange start="one" end="one" result="one" />
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="it">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="ka">
      <pluralRange start="one" end="other" result="one" />
   </pluralRanges>

   <pluralRanges locales="kk">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="kn">
      <pluralRange start="one" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="ky">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="lt">
      <pluralRange start="one" end="one" result="one" />
      <pluralRange start="one" end="few" result="few" />
      <pluralRange start="one" end="many" result="many" />
      <pluralRange start="few" end="one" result="one" />
      <pluralRange start="few" end="few" result="few" />
      <pluralRange start="few" end="many" result="many" />
      <pluralRange start="many" end="one" result="one" />
      <pluralRange start="many" end="few" result="few" />
      <pluralRange start="many" end="many" result="many" />
      <pluralRange start="other" end="one" result="one" />
      <pluralRange start="other" end="few" result="few" />
      <pluralRange start="other" end="many" result="many" />
   </pluralRanges>

   <pluralRanges locales="lv">
      <pluralRange start="zero" end="one" result="one" />
      <pluralRange start="one" end="one" result="one" />
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="mk">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="ml">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="mn">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="mr">
      <pluralRange start="one" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="ne">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="nl">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="pa">
      <pluralRange start="one" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="pl">
      <pluralRange start="one" end="few" result="few" />
      <pluralRange start="one" end="many" result="many" />
      <pluralRange start="few" end="few" result="few" />
      <pluralRange start="few" end="many" result="many" />
      <pluralRange start="many" end="one" result="one" />
      <pluralRange start="many" end="few" result="few" />
      <pluralRange start="many" end="many" result="many" />
      <pluralRange start="other" end="one" result="one" />
      <pluralRange start="other" end="few" result="few" />
      <pluralRange start="other" end="many" result="many" />
   </pluralRanges>

   <pluralRanges locales="pt">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="pt_PT">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="ro">
      <pluralRange start="one" end="few" result="few" />
      <pluralRange start="few" end="one" result="few" />
      <pluralRange start="few" end="few" result="few" />
      <pluralRange start="other" end="few" result="few" />
   </pluralRanges>

   <pluralRanges locales="ru">
      <pluralRange start="one" end="one" result="one" />
      <pluralRange start="one" end="many" result="many" />
      <pluralRange start="many" end="many" result="many" />
      <pluralRange start="other" end="one" result="one" />
      <pluralRange start="other" end="many" result="many" />
   </pluralRanges>

   <pluralRanges locales="si">
      <pluralRange start="one" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="sk">
      <pluralRange start="one" end="few" result="few" />
      <pluralRange start="one" end="many" result="many" />
      <pluralRange start="few" end="few" result="few" />
      <pluralRange start="few" end="many" result="many" />
      <pluralRange start="many" end="one" result="one" />
      <pluralRange start="many" end="few" result="few" />
      <pluralRange start="many" end="many" result="many" />
      <pluralRange start="other" end="one" result="one" />
      <pluralRange start="other" end="few" result="few" />
      <pluralRange start="other" end="many" result="many" />
   </pluralRanges>

   <pluralRanges locales="sl">
      <pluralRange start="one" end="one" result="one" />
      <pluralRange start="one" end="two" result="two" />
      <pluralRange start="one" end="few" result="few" />
      <pluralRange start="two" end="one" result="one" />
      <pluralRange start="two" end="two" result="two" />
      <pluralRange start="two" end="few" result="few" />
      <pluralRange start="few" end="one" result="one" />
      <pluralRange start="few" end="two" result="two" />
      <pluralRange start="few" end="few" result="few" />
      <pluralRange start="other" end="one" result="one" />
      <pluralRange start="other" end="two" result="two" />
      <pluralRange start="other" end="few" result="few" />
   </pluralRanges>

   <pluralRanges locales="sq">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="sr">
      <pluralRange start="one" end="one" result="one" />
      <pluralRange start="one" end="few" result="few" />
      <pluralRange start="few" end="one" result="one" />
      <pluralRange start="few" end="few" result="few" />
      <pluralRange start="other" end="one" result="one" />
      <pluralRange start="other" end="few" result="few" />
   </pluralRanges>

   <pluralRanges locales="sw">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="ta">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="te">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="tr">
      <pluralRange start="other" end="one" result="one" />
   </pluralRanges>

   <pluralRanges locales="uk">
      <pluralRange start="one" end="one" result="one" />
      <pluralRange start="one" end="few" result="few" />
      <pluralRange start="one" end="many" result="many" />
      <pluralRange start="few" end="one" result="one" />
      <pluralRange start="few" end="few" result="few" />
      <pluralRange start="few" end="many" result="many" />
      <pluralRange start="many" end="one" result="one" />
      <pluralRange start="many" end="few" result="few" />
      <pluralRange start="many" end="many" result="many" />
      <pluralRange start="other" end="one" result="one" />
      <pluralRange start="other" end="few" result="few" />
      <pluralRange start="other" end="many" result="many" />
   </pluralRanges>

   <pluralRanges locales="uz">
      <pluralRange start="one" end="other" result="?" />
      <pluralRange start="other" end="one" result="?" />
      <pluralRange start="other" end="other" result="?" />
   </pluralRanges>

   <pluralRanges locales="uz_Cyrl">
      <pluralRange start="one" end="other" result="?" />
      <pluralRange start="other" end="one" result="?" />
      <pluralRange start="other" end="other" result="?" />
   </pluralRanges>

   <pluralRanges locales="zu">
      <pluralRange start="one" end="one" result="one" />
   </pluralRanges>

</pluralRules>
Last edited 5 years ago by mark (previous) (diff)

comment:5 Changed 5 years ago by mark

  • Type changed from unknown to enhancement

Design accepted by committee Nov 13

comment:6 Changed 5 years ago by mark

  • Component changed from data to data-plurals

comment:7 Changed 4 years ago by mark

From ticket:6863

For Filipino Ranges: for any X-Y, the result is the category for Y.

comment:8 Changed 4 years ago by mark

  • Status changed from assigned to reviewing
  • Review set to fredrik

comment:9 Changed 4 years ago by pedberg

  • Xref set to 7071

Filed cldrbug 7071: to add documentation for this

comment:10 Changed 4 years ago by fredrik

  • Review changed from fredrik to pedberg

Looked at the commits but don't have the skill set to it give a good review. Peter, you have time?

comment:11 Changed 4 years ago by pedberg

  • Status changed from reviewing to closed
  • Resolution set to fixed

comment:12 Changed 4 years ago by emmons

  • Milestone 25rc deleted

Milestone 25rc deleted

View

Add a comment

Modify Ticket

Action
as closed
Next status will be 'new'
Next status will be 'closed'
Author


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

 
Note: See TracTickets for help on using tickets.