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-16970 Add testData file and generator for likely subtags #3173

Conversation

macchiati
Copy link
Member

CLDR-16970

It became clear in today's ICU meeting that the lack of a test file has led to incompatibilities in implementations. I made a quick generator for the test file. Please check the results to see if there are any unexpected values.

  • This PR completes the ticket.

ALLOW_MANY_COMMITS=true

Comment on lines +14 to +17
# RemoveFavorScript: Remove Likely Subtags, when the script is favored.
# Only included when different than AddLikely.
# RemoveFavorRegion: Remove Likely Subtags, when the region is favored.
# Only included when different than RemoveFavorScript.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Observation: I'm not sure we implement RemoveFavorScript in ICU4X. Good to have this test data to find a deficiency in our feature coverage that we can work toward fixing. :)

@macchiati macchiati merged commit 5ecee1d into unicode-org:main Aug 11, 2023
10 checks passed
@macchiati macchiati deleted the CLDR-16970-Add-test-file-and-generator-for-LikelySubtags branch August 11, 2023 00:19
@macchiati
Copy link
Member Author

macchiati commented Aug 11, 2023

It looks like it only makes a difference in a few cases (this is restricted to Basic locales):

Source ; AddLikely ; RemoveFavorScript ; RemoveFavorRegion
sd-Deva ; sd-Deva-IN ; sd-Deva ; sd-IN
sd-IN ; sd-Deva-IN ; sd-Deva ; sd-IN
yue-CN ; yue-Hans-CN ; yue-Hans ; yue-CN
yue-Hans ; yue-Hans-CN ; yue-Hans ; yue-CN
und-Hant ; zh-Hant-TW ; zh-Hant ; zh-TW
und-Hant-TW ; zh-Hant-TW ; zh-Hant ; zh-TW
und-TW ; zh-Hant-TW ; zh-Hant ; zh-TW
zh-Hant ; zh-Hant-TW ; zh-Hant ; zh-TW
zh-TW ; zh-Hant-TW ; zh-Hant ; zh-TW

@sffc
Copy link
Member

sffc commented Aug 11, 2023 via email

und-AX ; sv-Latn-AX ; sv-AX ;
und-AZ ; az-Latn-AZ ; az ;
und-Adlm ; ff-Adlm-GN ; ff-Adlm ;
und-Adlm-BF ; fr-Adlm-BF ; ;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explain what does the RemoveFavorRegion = "" mean?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in the header. In other words, if a value is missing, it means the same as the previous field in the row (recursively).

#   RemoveFavorScript: Remove Likely Subtags, when the script is favored.
#                      Only included when different than AddLikely.
#   RemoveFavorRegion: Remove Likely Subtags, when the region is favored.
#                      Only included when different than RemoveFavorScript.

If that isn't clear we can improve the header.

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