aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorFabrice Bellingard <fabrice.bellingard@sonarsource.com>2012-09-18 18:03:52 +0200
committerFabrice Bellingard <fabrice.bellingard@sonarsource.com>2012-09-18 18:03:52 +0200
commit31f6135f129e135b038dbf79b1c02a7db0acf798 (patch)
treee11c329283bed5a20295697404c71cf97fc5aa47 /sonar-core
parent857eb8efc022ff89ca0a1aaa11a3d4cbbe52d5ae (diff)
downloadsonarqube-31f6135f129e135b038dbf79b1c02a7db0acf798.tar.gz
sonarqube-31f6135f129e135b038dbf79b1c02a7db0acf798.zip
SONAR-3783 Core plugin not able to have his own l10n bundle
=> Move the bundles in the plugins they are related to.
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/i18n/I18nManager.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/i18n/I18nManager.java b/sonar-core/src/main/java/org/sonar/core/i18n/I18nManager.java
index a61509e71cf..727e7d03905 100644
--- a/sonar-core/src/main/java/org/sonar/core/i18n/I18nManager.java
+++ b/sonar-core/src/main/java/org/sonar/core/i18n/I18nManager.java
@@ -75,16 +75,11 @@ public class I18nManager implements I18n, ServerExtension, BatchExtension {
languagePackClassLoader = pluginRepository.getPlugin(ENGLISH_PACK_PLUGIN_KEY).getClass().getClassLoader();
bundleToClassloaders = Maps.newHashMap();
for (PluginMetadata metadata : pluginRepository.getMetadata()) {
- if (!metadata.isCore() && !ENGLISH_PACK_PLUGIN_KEY.equals(metadata.getBasePlugin())) {
- // plugin but not a language pack
- // => plugins embedd only their own bundles with all locales
+ if (!ENGLISH_PACK_PLUGIN_KEY.equals(metadata.getKey())
+ && !ENGLISH_PACK_PLUGIN_KEY.equals(metadata.getBasePlugin())) {
+ // This is a "simple" plugin, not a Language Pack
ClassLoader classLoader = pluginRepository.getPlugin(metadata.getKey()).getClass().getClassLoader();
bundleToClassloaders.put(BUNDLE_PACKAGE + metadata.getKey(), classLoader);
-
- } else if (metadata.isCore()) {
- // bundles of core plugins are defined into language packs. All language packs are supposed
- // to share the same classloader (english pack classloader)
- bundleToClassloaders.put(BUNDLE_PACKAGE + metadata.getKey(), languagePackClassLoader);
}
}
}