-
Notifications
You must be signed in to change notification settings - Fork 386
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-17014 No code fallbacks for language paths #4254
base: main
Are you sure you want to change the base?
Changes from 2 commits
f846a3c
7efc8d8
cdb5251
aaf5e63
e3f2f32
518b994
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -190,6 +190,8 @@ | |
path.contains("/metazone") | ||
|| path.contains("/timeZoneNames") | ||
|| path.contains("/gender") | ||
|| path.startsWith( | ||
"//ldml/localeDisplayNames/languages/language") | ||
|| path.startsWith("//ldml/numbers/currencies/currency") | ||
|| path.startsWith("//ldml/personNames/sampleName") | ||
|| path.contains("/availableFormats") | ||
|
@@ -914,7 +916,7 @@ | |
} | ||
String value = swissHighGerman.getStringValue(xpath); | ||
if (value != null && value.indexOf('ß') >= 0) { | ||
warnln("«" + value + "» contains ß at " + xpath); | ||
Check warning on line 919 in tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestCLDRFile.java GitHub Actions / build
Check warning on line 919 in tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestCLDRFile.java GitHub Actions / build
Check warning on line 919 in tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestCLDRFile.java GitHub Actions / build
Check warning on line 919 in tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestCLDRFile.java GitHub Actions / build
Check warning on line 919 in tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestCLDRFile.java GitHub Actions / build
|
||
} | ||
} | ||
} | ||
|
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 wrong, my mistake -- it actually modifies the set in StandardCodes! Need to make a copy of the set. We might want to prevent this kind of bug by making getSurveyToolDisplayCodes return an unmodifiable set, maybe using Set.copyOf.
We currently have this, which doesn't work:
CLDRLanguageCodes = CldrUtility.protectCollection(CLDRLanguageCodes);
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.
Fixed by my last commit -- we still should look into Set.copyOf as an alternative to protectCollection
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.
Important: In general, use ImmutableSet.copyOf instead of Set.copyOf. The latter changes the order in the set, which may be important (TreeSet or LinkedHashSets get messed up, and it doesn't hurt for HashSet).
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.
Also, we need to fix CldrUtility.protectCollection(CLDRLanguageCodes); — if it does't work then a lot of other things could go wrong.