< prev index next >
make/jdk/src/classes/build/tools/cldrconverter/Bundle.java
Print this page
rev 57986 : 8234347: "Turkey" meta time zone does not generate composed localized names
8236548: Localized time zone name inconsistency between English and other locales
Reviewed-by:
*** 292,302 ****
handleDateTimeFormatPatterns(DATE_PATTERN_KEYS, myMap, parentsMap, calendarType, "DatePatterns");
handleDateTimeFormatPatterns(DATETIME_PATTERN_KEYS, myMap, parentsMap, calendarType, "DateTimePatterns");
}
// First, weed out any empty timezone or metazone names from myMap.
- // Fill in any missing abbreviations if locale is "en".
for (Iterator<String> it = myMap.keySet().iterator(); it.hasNext();) {
String key = it.next();
if (key.startsWith(CLDRConverter.TIMEZONE_ID_PREFIX)
|| key.startsWith(CLDRConverter.METAZONE_ID_PREFIX)) {
@SuppressWarnings("unchecked")
--- 292,301 ----
*** 305,318 ****
// Some zones have only exemplarCity, which become empty.
// Remove those from the map.
it.remove();
continue;
}
-
- if (id.equals("en")) {
- fillInJREs(key, nameMap);
- }
}
}
for (Iterator<String> it = myMap.keySet().iterator(); it.hasNext();) {
String key = it.next();
if (key.startsWith(CLDRConverter.TIMEZONE_ID_PREFIX)
--- 304,313 ----
*** 634,679 ****
}
}
return null;
}
- static List<Object[]> jreTimeZoneNames = Arrays.asList(TimeZoneNames.getContents());
- private void fillInJREs(String key, Map<String, String> map) {
- String tzid = null;
-
- if (key.startsWith(CLDRConverter.METAZONE_ID_PREFIX)) {
- // Look for tzid
- String meta = key.substring(CLDRConverter.METAZONE_ID_PREFIX.length());
- if (meta.equals("GMT")) {
- tzid = meta;
- } else {
- for (String tz : CLDRConverter.handlerMetaZones.keySet()) {
- if (CLDRConverter.handlerMetaZones.get(tz).equals(meta)) {
- tzid = tz;
- break;
- }
- }
- }
- } else {
- tzid = key.substring(CLDRConverter.TIMEZONE_ID_PREFIX.length());
- }
-
- if (tzid != null) {
- for (Object[] jreZone : jreTimeZoneNames) {
- if (jreZone[0].equals(tzid)) {
- for (int i = 0; i < ZONE_NAME_KEYS.length; i++) {
- if (map.get(ZONE_NAME_KEYS[i]) == null) {
- String[] jreNames = (String[])jreZone[1];
- map.put(ZONE_NAME_KEYS[i], jreNames[i]);
- }
- }
- break;
- }
- }
- }
- }
-
/**
* Perform a generic conversion of CLDR date-time format pattern letter based
* on the support given by the SimpleDateFormat and the j.t.f.DateTimeFormatter
* for date-time formatting.
*/
--- 629,638 ----
< prev index next >