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

ICU-22073 Do not throw away CompactDecimalFormat's affixes #2123

Merged
merged 1 commit into from
Jun 27, 2022

Conversation

sffc
Copy link
Member

@sffc sffc commented Jun 25, 2022

Checklist
  • Required: Issue filed: https://unicode-org.atlassian.net/browse/ICU-22073
  • Required: The PR title must be prefixed with a JIRA Issue number.
  • Required: The PR description must include the link to the Jira Issue, for example by completing the URL in the first checklist item
  • Required: Each commit message must be prefixed with a JIRA Issue number.
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable

@sffc sffc requested a review from macchiati June 25, 2022 01:11
macchiati
macchiati previously approved these changes Jun 25, 2022
@macchiati
Copy link
Member

Thanks!!

@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/CompactDecimalFormatTest.java is now changed in the branch

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@sffc
Copy link
Member Author

sffc commented Jun 25, 2022

I pushed an extra test demonstrating that it works with CompactCustomData. Note that I needed to pass the third argument to the pattern parser:

                PatternStringParser.parseToExistingProperties(
                    "0 foo", props, PatternStringParser.IGNORE_ROUNDING_ALWAYS);

Otherwise the pattern started overriding the rounding behavior, which is undesirable.

@macchiati
Copy link
Member

Great, I'll add that to the CLDR code.

Note: am now debugging another CompactNumber bug:
https://unicode-org.atlassian.net/browse/CLDR-15762

"Upon review of https://st.unicode.org/cldr-apps/v#r_compact/cs// our Czech vetter noted that some of the plural formats are incorrect. For example, “1,1 milionů” should be “1,1 milionu”, as directed by https://st.unicode.org/cldr-apps/v#/cs/Compact_Decimal_Formatting/6cbd4b7d742691c (“many”).

It appears that the examples in the report do not take the appropriate plural rules into account."

I looked into it, and verified that "1,1 milionu" (pattern for 'many') should be generated, not “1,1 milionů” (pattern for 'other'). So I'll try to find out where the wrong answer is coming from.

@macchiati
Copy link
Member

I fixed the 1,1 milionů problem on the CLDR side, so that doesn't need ICU changes.

@pedberg-icu pedberg-icu merged commit d7c424b into unicode-org:main Jun 27, 2022
@sffc sffc deleted the ICU-22073-compact branch June 28, 2022 00:49
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.

3 participants