import org.sonar.api.i18n.I18n;
import org.sonar.api.i18n.LanguagePack;
import org.sonar.api.platform.PluginRepository;
-import org.sonar.api.utils.Logs;
import org.sonar.api.utils.SonarException;
import com.google.common.collect.Lists;
}
protected void doStart(List<InstalledPlugin> installedPlugins) {
- Logs.INFO.info("Loading i18n bundles");
+ LOG.info("Loading i18n bundles");
Set<URI> alreadyLoadedResources = Sets.newHashSet();
LanguagePack englishPack = findEnglishPack();
List<URL> resources = EnumerationUtils.toList(classloader.getResources(bundleDefaultPropertiesFile));
if (resources.size() > 0) {
if (resources.size() > 1) {
- LOG.warn("File '{}' found several times in the classloader : {}. Only the first one will be taken in account.",
+ LOG.debug("File '{}' found several times in the classloader : {}. Only the first one will be taken in account.",
bundleDefaultPropertiesFile, classloader);
}
while (keysToAdd.hasMoreElements()) {
String key = keysToAdd.nextElement();
if (keys.containsKey(key)) {
- LOG.warn("DUPLICATE KEY : Key '{}' defined in bundle '{}' is already defined in bundle '{}'. It is ignored.", new Object[] {
- key, bundleBaseName, keys.get(key) });
+ LOG.debug("DUPLICATE KEY : Key '{}' defined in bundle '{}' is already defined in bundle '{}'. It is ignored.",
+ new Object[] { key, bundleBaseName, keys.get(key) });
} else {
keys.put(key, bundleBaseName);
}
translatedMessage = findStandardMessage(locale, key, defaultText, objects);
}
} catch (MissingResourceException e) {
- LOG.warn(e.getMessage());
+ LOG.debug(e.getMessage());
if (translatedMessage == null) {
// when no translation has been found, the key is returned
return key;
throw new MissingResourceException("VOID KEY : Key '" + key + "' (from bundle '" + bundleBaseName + "') returns a void value.",
bundleBaseName, key);
}
- LOG.warn("VOID KEY : Key '{}' (from bundle '{}') returns a void value. Default value '{}' is returned.", new Object[] { key,
+ LOG.debug("VOID KEY : Key '{}' (from bundle '{}') returns a void value. Default value '{}' is returned.", new Object[] { key,
bundleBaseName, defaultText });
} else {
translation = value;
if (translation == null) {
throw e;
}
- LOG.warn("BUNDLE NOT LOADED : Failed loading bundle {} from classloader {}. Default value '{}' is returned.", new Object[] {
+ LOG.debug("BUNDLE NOT LOADED : Failed loading bundle {} from classloader {}. Default value '{}' is returned.", new Object[] {
bundleBaseName, bundleClassLoader, defaultText });
}
}
throw new MissingResourceException("UNKNOWN KEY : Key '" + key
+ "' not found in any bundle, and no default value provided. The key is returned.", bundleBaseName, key);
}
- LOG.warn("UNKNOWN KEY : Key '{}' not found in any bundle. Default value '{}' is returned.", key, defaultText);
+ LOG.debug("UNKNOWN KEY : Key '{}' not found in any bundle. Default value '{}' is returned.", key, defaultText);
unknownKeys.put(key, defaultText);
}