Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLDR-16279 fix random spacing in the Numbers report for compact currency #3729

Conversation

pedberg-icu
Copy link
Contributor

@pedberg-icu pedberg-icu commented May 16, 2024

CLDR-16279

  • This PR completes the ticket.

The Numbers report in Survey Tool (and Charts) is generated by util/VerifyCompactNumbers.java, which calls test/BuildIcuCompactDecimalFormat.java to assemble the formats. BuildIcuCompactDecimalFormat.buildCustomData() was iterating over the paths for compact number formats without paying attention to which ones were alt='alphaNextToNumber' (with spacing) and non-alt (normally without spacing), leading to random use of space in compact currency formats in the report (see the Numbers report for en_CA, for example). This PR fixes BuildIcuCompactDecimalFormat.buildCustomData() to explicitly choose the alt='alphaNextToNumber' format when appropriate (currency symbol has letter on side adjacent to value), and to skip the alt format (and use the standard format) otherwise.

It is possible that a similar change will also be needed in util/ICUServiceBuilder.java

ALLOW_MANY_COMMITS=true

@pedberg-icu pedberg-icu merged commit e2e5063 into unicode-org:main May 17, 2024
10 checks passed
@pedberg-icu pedberg-icu deleted the CLDR-16279-fix-currency-spacing-in-Numbers-report branch May 17, 2024 01:29
@pedberg-icu
Copy link
Contributor Author

After merging, verified in smoketest that this fixes the spacing issue in the Compact Numbers report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants