mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +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
|
@ -181,6 +181,8 @@ import java.util.Locale;
|
|||
* <th scope="col">CLDR version</th></tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><th scope="row" style="text-align:left">JDK 24</th>
|
||||
* <td>CLDR 46</td></tr>
|
||||
* <tr><th scope="row" style="text-align:left">JDK 23</th>
|
||||
* <td>CLDR 45</td></tr>
|
||||
* <tr><th scope="row" style="text-align:left">JDK 22</th>
|
||||
|
|
|
@ -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