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

CLDR Ticket #5333(accepted unittest)

Opened 5 years ago

Last modified 2 years ago

Add test to verify complete long&short compact number data per base locale

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

Description

We ran into an issue in the ICU implementation for the fallback of numbers.

Here is what is in root.

<decimalFormats numberSystem="arab">
  <alias source="locale" path="../decimalFormats[@numberSystem='latn']"/>
</decimalFormats>

If we look for compact numbers for Arab, with type=long, here is the inheritance chain:

Path #1

  • Arab long
  • Latn long
  • Latn short

I think what we really want is if we fail to find Arab long, we want to do the following:

Path #2

  • Arab long
  • Arab short
  • Latn long
  • Latn short

It looks like we don't have what we need to express this. The best we could do would be:

<decimalFormats numberSystem="arab">
  <decimalFormatLength>
    <alias source="locale" path="../../decimalFormats[@numberSystem='latn']/decimalFormatLength"/>
  </decimalFormatLength>
  <decimalFormatLength type="long">
    <alias source="locale" path="../decimalFormatLength[@type='short']"/>
  </decimalFormatLength>
  <decimalFormatLength type="short">
    <alias source="locale" path="../../decimalFormats[@numberSystem='latn']/decimalFormatLength[@type='short']"/>
  </decimalFormatLength>
</decimalFormats>

Alternatively, we verify in the data that if there is short data for a numbering system other than latin, then there MUST be long data. That would mean that we never take path #1.

So that is what I recommend.

This would take code to test that every locale is well-formed. It is not an issue now, since we don't have any non Latn data.

Attachments

Change History

comment:1 Changed 5 years ago by mark

  • Status changed from new to assigned
  • Component changed from data to test
  • Summary changed from Fallback for compact numbers to Add test to verify complete long&short compact number data per base locale
  • Priority changed from assess to major
  • Milestone changed from UNSCH to 23
  • Owner changed from anybody to mark

Can be done with logical group, restricted to base locales.

comment:2 Changed 4 years ago by mark

  • Milestone changed from 23 to 23dres

comment:3 Changed 4 years ago by mark

  • Milestone changed from 23dres to cleanup

comment:4 Changed 2 years ago by markus

  • Type changed from defect to unittest
  • Component changed from test to unknown

comment:5 Changed 2 years ago by srl

  • Status changed from assigned to accepted
View

Add a comment

Modify Ticket

Action
as accepted
Author


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

 
Note: See TracTickets for help on using tickets.