-
-
Notifications
You must be signed in to change notification settings - Fork 754
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-22575 Change AvailableFormatsSink to allow locales to inherit ava… #2707
Conversation
NOTE: I think this is the same problem we've been getting reports from various Web users about. A few quick comments:
Anyway, sorry this is a little half-baked, but I ran out of time and wanted this up before the Thanksgiving break (I'm off all next week) to get feedback and reassure people that the problem was being worked on. |
There should be a Java counter part, right? Could we change the Java one in this PR together? |
Of course. I just ran out of time before the break to do that, and I kind of wanted some feedback on what I'm doing and whether it's a good idea or there's a better way to do it. If people are behind this (or don't care), I'll try to put up a new commit that extends the fix to the ICU4J side. |
please fix the failing tests |
Okay, I think this is finally ready to be reviewed. I've fixed the build failures, verified that the changed unit test results make sense, added a new unit test that specifically replicates the problem described in the Mozilla bug report, and ported all of those things to Java. @markusicu @FrankYFTang @pedberg-icu , PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked this over, and it all looks good.
One could also write a little tool that generates patterns from skeletons for different languages, where the skeletons are unions of those of the root and child locales, and captures that in a file. Then run it with and without the code change, and spot-check the differences.
But I'm maybe a bit paranoid..., so glad to approve if you don't have the time to do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code change and the expected data changes in tests all seem good to me. The expected data changes seem to be places where the CLDR data had ↑↑↑ assuming inheritance from root, so making the ICU code align with that seems good.
It definitely seems worth doing, but I really don't have the time. The affected cases should pretty much all be situations where CLDR changed a literal value to ↑↑↑ expecting to inherit from root. Although as you can see, making that change uncovered a few unit tests that were expecting something different (e.g., deriving the pattern algorithmically from one of its sibling patterns). |
…ilableFormats items from the root locale.
716906f
to
5de4f59
Compare
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
Thank you for your reviews, @pedberg-icu and @macchiati ! I just squashed my commits-- would somebody mind re-approving? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for working on this.
…ilableFormats items from the root locale.
Checklist