ICU-9255 Merged ICU4C trunk r32468 locale data including Dangi calendar format data (aliases) and removed Dangi calendar formatting hacks. Also fixed pattern cache key found during the development.

X-SVN-Rev: 32469
This commit is contained in:
Yoshito Umaoka 2012-09-28 21:17:44 +00:00
parent ff01fb093a
commit b5bed9e922
5 changed files with 6 additions and 14 deletions

View File

@ -34,10 +34,6 @@ public class CalendarData {
fMainType = "gregorian";
fFallbackType = null;
} else {
// TODO: Until CLDR supports "dangi" calendar type
if (type.equalsIgnoreCase("dangi")) {
type = "chinese";
}
fMainType = type;
fFallbackType = "gregorian";
}

View File

@ -1142,7 +1142,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
// We may need to deescalate this API to @internal.
protected void initializeData(ULocale desiredLocale, String type)
{
String key = desiredLocale.toString() + "+" + type;
String key = desiredLocale.getBaseName() + "+" + type;
DateFormatSymbols dfs = DFSCACHE.get(key);
if (dfs == null) {
// Initialize data from scratch put a clone of this instance into the cache

View File

@ -185,11 +185,6 @@ public class DateTimePatternGenerator implements Freezable<DateTimePatternGenera
calendarTypeToUse = "gregorian"; // fallback
}
// TODO: Until CLDR supports "dangi" calendar type
if (calendarTypeToUse.equalsIgnoreCase("dangi")) {
calendarTypeToUse = "chinese";
}
// Get data for that calendar
ICUResourceBundle calBundle = rb.getWithFallback("calendar");
ICUResourceBundle calTypeBundle = calBundle.getWithFallback(calendarTypeToUse);

View File

@ -3504,12 +3504,13 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
}
private static PatternData make(Calendar cal, ULocale loc) {
// First, try to get a pattern from PATTERN_CACHE
String key = loc.toString() + cal.getType();
String calType = cal.getType();
String key = loc.getBaseName() + "+" + calType;
PatternData patternData = PATTERN_CACHE.get(key);
if (patternData == null) {
// Cache missed. Get one from bundle
try {
CalendarData calData = new CalendarData(loc, cal.getType());
CalendarData calData = new CalendarData(loc, calType);
patternData = new PatternData(calData.getDateTimePatterns(),
calData.getOverrides());
} catch (MissingResourceException e) {

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3d527dc8b2d8b770c1b070b772c4680a2b0acc645e5ad050dd32968c6770afa6
size 9833010
oid sha256:b6f09ae8f08529e1fb68a0b6057ce99cfc1017cb5cc5929a036a5bb021370ddc
size 9830128