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
Upgrade to CLDR 45 #1077
base: master
Are you sure you want to change the base?
Upgrade to CLDR 45 #1077
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1077 +/- ##
==========================================
- Coverage 90.99% 90.32% -0.68%
==========================================
Files 26 26
Lines 4444 4453 +9
==========================================
- Hits 4044 4022 -22
- Misses 400 431 +31 ☔ View full report in Codecov by Sentry. |
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, that was simple enough. 😄
However, the release notes say "In Parent Locales, made substantial changes to the way that parentLocales work, including a new attribute for algorithmic handling of inheritance that avoids needing a long (and fragile) list of language-script codes to skip when falling back to root. That list was retained for migration, but will be withdrawn in the future."
Would you like to see whether that's something that affects us and implement whatever changes are relevant in scripts/import_cldr.py
? If you don't have the bandwidth, it's fine, I can also follow up here.
I might have some time this week, but feel free to have a look yourself if you want :) |
Locales of the form 'lang_Script' where 'Script' is not the likely script for 'lang' should have 'root' as their parent locale. For example, the parent of 'az_Arab' should not be computed as 'az' by truncating from the end, but should be 'root' instead as 'Arab' is not the likely script for 'az'. The list of such languages was previously specified using an explicit 'locales' attribute. It is now handled dynamically using the new 'localeRules' attribute.
I updated the PR to handle the parent locale changes. I just hope I understood it correctly 😅 |
if _is_non_likely_script(name): | ||
parent = 'root' |
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.
Could we have some sort of test case for this code path? I'm not sure which locales might exhibit this, though...
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.
This is already covered by the second test case with az_Arab
. Do you want me to add another test for _is_non_likely_script
as well?
CLDR 45 is out now.
Looks like the 44 patch fixed most of the test issues so there was only one failing test this time around :)
Some related discussion here: #1070