return new MessageBundle(all, country, lang, exact);
}
private MessageBundle getBundleFor(GadgetSpec spec, Locale locale, boolean ignoreCache, String container, String view)
throws GadgetException {
LocaleSpec localeSpec = spec.getModulePrefs().getLocale(locale, view);
if (localeSpec == null) {
return MessageBundle.EMPTY;
}
if (localeSpec.getMessages().toString().length() == 0) {
return localeSpec.getMessageBundle();
}
LocaleQuery query = new LocaleQuery();
query.setSpecUri(localeSpec.getMessages())
.setGadgetUri(spec.getUrl())
.setContainer(container)
.setIgnoreCache(ignoreCache);
query.locale = localeSpec;