mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8333582: Update CLDR to Version 46.0
Reviewed-by: joehw, srl, jlu
This commit is contained in:
parent
23fa1a3327
commit
1c4483473d
290 changed files with 107179 additions and 22690 deletions
|
@ -151,10 +151,11 @@ public class CLDRTimeZoneNameProviderImpl extends TimeZoneNameProviderImpl {
|
|||
return;
|
||||
}
|
||||
|
||||
var lpa = ((CLDRLocaleProviderAdapter)LocaleProviderAdapter.forType(Type.CLDR));
|
||||
|
||||
// Check parent locales first
|
||||
if (!exists(names, index)) {
|
||||
var cands = ((CLDRLocaleProviderAdapter)LocaleProviderAdapter.forType(Type.CLDR))
|
||||
.getCandidateLocales("", locale);
|
||||
var cands = lpa.getCandidateLocales("", locale);
|
||||
for (int i = 1; i < cands.size() ; i++) {
|
||||
var loc = cands.get(i);
|
||||
String[] parentNames = super.getDisplayNameArray(id, loc);
|
||||
|
@ -169,6 +170,14 @@ public class CLDRTimeZoneNameProviderImpl extends TimeZoneNameProviderImpl {
|
|||
}
|
||||
}
|
||||
|
||||
// Check canonical id
|
||||
var canonName =
|
||||
lpa.canonicalTZID(id).map(canonId -> getDisplayNameArray(canonId, locale)[index]);
|
||||
if (canonName.isPresent()) {
|
||||
names[index] = canonName.get();
|
||||
return;
|
||||
}
|
||||
|
||||
// Type Fallback
|
||||
if (noDST && typeFallback(names, index)) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue