ResourceFactory.clearCache();
lastReloadCount = typeOracle.getReloadCount();
}
// Get the current locale and interface type.
PropertyOracle propertyOracle = context.getPropertyOracle();
String locale;
try {
// Look at the code for the "locale" property provider in
// I18N.gwt.xml to see the possible values for the locale
// property. Basically,
//
// 1) If the locale is specified by the user using a request parameter
// or a meta tag, AND
// 2) The locale matches or is a parent of one of the locales
// exposed in the application's gwt.xml file, THEN
//
// the value returned by getPropertyValue() will be:
//
// a) the locale specified by the user, OR
// b) the parent locale, if an exact match between the user-specified
// locale and the exposed locales cannot be found
//
// If the locale is not specified by the user as a request parameter
// or via a meta tag, or if the locale is formatted incorrectly,
// getPropertyValue() will return "default".
locale = propertyOracle.getPropertyValue(logger, PROP_LOCALE);
} catch (BadPropertyValueException e) {
logger.log(TreeLogger.ERROR, "Could not parse specified locale", e);
throw new UnableToCompleteException();
}