Draft: Datagen validation for currency vs decimal pattern grouping#8160
Draft
younies wants to merge 2 commits into
Draft
Draft: Datagen validation for currency vs decimal pattern grouping#8160younies wants to merge 2 commits into
younies wants to merge 2 commits into
Conversation
Instead of skipping validation for ccp, patch the patterns in datagen so that the generated data is correct and matches the validation. TAG=agy CONV=d0d58281-2fac-42d4-823d-fa0a12744232
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is a draft PR intended to demonstrate our findings regarding the consistency of digit grouping between decimal and currency patterns in CLDR.
We have added a validation check to the currency data generator (
validate_integer_structuresinprovider/source/src/currency/essentials.rs) that compares the integer structure (grouping sizes and digit placeholders) of all currency patterns (standard, accounting, and theiralphaNextToNumbervariants) against the locale's standard decimal pattern.Findings
#,##0inen, and#,##,##0inbn).ccp(Chakma) locale:#,##,##0.###(Indian grouping)#,##,##0.00¤(Indian grouping)alphaNextToNumber(standard and accounting):¤ #,##0.00(Western grouping:#,##0)Changelog
integer_structuretoNumberPatternto extract grouping/digit placeholders.validate_integer_structuresinessentials.rsto assert equality during datagen.ccpto print aWARNINGinstead of failing the build, allowing tests to pass.This PR is a demonstration of the validation logic and the CLDR consistency.