Fixed FELIX-2204
/Localization causes a problem in WebConsole configuration/

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@923659 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/ConfigurationListener2.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/ConfigurationListener2.java
index 14cbfec..ce31212 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/ConfigurationListener2.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/ConfigurationListener2.java
@@ -21,6 +21,8 @@
 
 import java.io.InputStream;
 import java.util.ArrayList;
+import java.util.Locale;
+import java.util.ResourceBundle;
 import java.util.TreeMap;
 
 import org.apache.felix.webconsole.AbstractWebConsolePlugin;
@@ -37,6 +39,7 @@
     final String pid; // reduces visibility because access to this was made though synthetic accessor method
 
     private ObjectClassDefinition ocd;
+    private final OsgiManager osgiManager;
 
 
     static ServiceRegistration create( OsgiManager osgiManager )
@@ -51,6 +54,7 @@
     {
         super( osgiManager );
         this.pid = osgiManager.getConfigurationPid();
+        this.osgiManager = osgiManager;
     }
 
 
@@ -106,7 +110,14 @@
                     final Object plugin = loader.loadClass( defaultPluginsClasses[i] ).newInstance();
                     if ( plugin instanceof AbstractWebConsolePlugin )
                     {
-                        final String name = ( ( AbstractWebConsolePlugin ) plugin ).getTitle();
+                        String name = ( ( AbstractWebConsolePlugin ) plugin ).getTitle();
+                        if (name.startsWith("%"))
+                        {
+                            final ResourceBundle rb = osgiManager.resourceBundleManager.getResourceBundle(
+                                ((AbstractWebConsolePlugin) plugin).getBundle(),
+                                Locale.ENGLISH);
+                            name = rb.getString(name.substring(1));
+                        }
                         namesByClassName.put( defaultPluginsClasses[i], name );
                     }
                 }
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
index fd4213e..63c9bf9 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
@@ -179,7 +179,7 @@
 
     private Set enabledPlugins;
 
-    private ResourceBundleManager resourceBundleManager;
+    ResourceBundleManager resourceBundleManager;
 
     private int logLevel = DEFAULT_LOG_LEVEL;