English translation for core and clean up of core markup. Use shorter method for getting translated string.

git-svn-id: https://svn.apache.org/repos/asf/karaf/webconsole/trunk@1291053 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/core/src/main/java/org/apache/karaf/webconsole/core/dashboard/DashboardPage.java b/core/src/main/java/org/apache/karaf/webconsole/core/dashboard/DashboardPage.java
index 50c149e..3838122 100644
--- a/core/src/main/java/org/apache/karaf/webconsole/core/dashboard/DashboardPage.java
+++ b/core/src/main/java/org/apache/karaf/webconsole/core/dashboard/DashboardPage.java
@@ -41,7 +41,7 @@
     public DashboardPage(PageParameters parameters) {
         add(CSSPackageResource.getHeaderContribution(DashboardPage.class, "dashboard.css"));
 
-        add(new Label("noWidgets", "So far there is no widgets to display") {
+        add(new Label("noWidgets", getString("widgets.empty")) {
             private static final long serialVersionUID = 1L;
 
             @Override
diff --git a/core/src/main/java/org/apache/karaf/webconsole/core/navigation/markup/NavigationTopPanel.java b/core/src/main/java/org/apache/karaf/webconsole/core/navigation/markup/NavigationTopPanel.java
index f79c286..f9fdd19 100644
--- a/core/src/main/java/org/apache/karaf/webconsole/core/navigation/markup/NavigationTopPanel.java
+++ b/core/src/main/java/org/apache/karaf/webconsole/core/navigation/markup/NavigationTopPanel.java
@@ -36,7 +36,6 @@
 import org.apache.wicket.markup.repeater.RepeatingView;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
-import org.apache.wicket.model.StringResourceModel;
 import org.ops4j.pax.wicket.api.PaxWicketBean;
 import org.osgi.service.prefs.PreferencesService;
 
@@ -64,10 +63,7 @@
         add(new Label("username", username));
         add(new SecuredPageLink<PreferencesPage>("preferencesLink", PreferencesPage.class));
 
-        Link<Void> aLink = new LogoutLink("logoutLink");
-        aLink.add(new Label("label", new StringResourceModel("logout.link", this.getDefaultModel())));
-        add(aLink);
-
+        add(new LogoutLink("logoutLink"));
     }
 
     protected Component createTabList() {
diff --git a/core/src/main/resources/org/apache/karaf/webconsole/core/dashboard/DashboardPage.html b/core/src/main/resources/org/apache/karaf/webconsole/core/dashboard/DashboardPage.html
index 260a317..abb51ed 100644
--- a/core/src/main/resources/org/apache/karaf/webconsole/core/dashboard/DashboardPage.html
+++ b/core/src/main/resources/org/apache/karaf/webconsole/core/dashboard/DashboardPage.html
@@ -16,15 +16,11 @@
    limitations under the License.
 -->
 <wicket:extend xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
-    <wicket:enclosure>
-        <span wicket:id="noWidgets">Info goes here</span>
-    </wicket:enclosure>
+    <span wicket:id="noWidgets"></span>
 
     <ul id="widgets">
         <li wicket:id="widgets">
-            <div wicket:id="widget">
-                Widget content.
-            </div>
+            <div wicket:id="widget"></div>
         </li>
     </ul>
 </wicket:extend>
\ No newline at end of file
diff --git a/core/src/main/resources/org/apache/karaf/webconsole/core/dashboard/package.properties b/core/src/main/resources/org/apache/karaf/webconsole/core/dashboard/package.properties
new file mode 100644
index 0000000..017c39c
--- /dev/null
+++ b/core/src/main/resources/org/apache/karaf/webconsole/core/dashboard/package.properties
@@ -0,0 +1,17 @@
+ # Licensed to the Apache Software Foundation (ASF) under one or more
+ # contributor license agreements.  See the NOTICE file distributed with
+ # this work for additional information regarding copyright ownership.
+ # The ASF licenses this file to You under the Apache License, Version 2.0
+ # (the "License"); you may not use this file except in compliance with
+ # the License.  You may obtain a copy of the License at
+ #
+ #      http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License. 
+
+# Dashboard page translations
+widgets.empty So far there is no widgets to display
\ No newline at end of file
diff --git a/core/src/main/resources/org/apache/karaf/webconsole/core/navigation/markup/LanguageTopPanel.html b/core/src/main/resources/org/apache/karaf/webconsole/core/navigation/markup/LanguageTopPanel.html
index 045d7d4..5e318a0 100644
--- a/core/src/main/resources/org/apache/karaf/webconsole/core/navigation/markup/LanguageTopPanel.html
+++ b/core/src/main/resources/org/apache/karaf/webconsole/core/navigation/markup/LanguageTopPanel.html
@@ -22,13 +22,13 @@
         <ul class="nav pull-right">
             <li class="dropdown">
                 <a class="dropdown-toggle" data-toggle="dropdown">
-                    Language <b class="caret"></b>
+                    <wicket:message key="language" /> <b class="caret"></b>
                 </a>
                 <ul class="dropdown-menu">
                     <li wicket:id="languages">
                         <a wicket:id="languageLink">
                             <img wicket:id="flag" />
-                            <span wicket:id="label">English</span>
+                            <span wicket:id="label"></span>
                         </a>
                     </li>
                 </ul>
diff --git a/core/src/main/resources/org/apache/karaf/webconsole/core/navigation/markup/ModuleTabPanel.html b/core/src/main/resources/org/apache/karaf/webconsole/core/navigation/markup/ModuleTabPanel.html
index c42fd84..8df2528 100644
--- a/core/src/main/resources/org/apache/karaf/webconsole/core/navigation/markup/ModuleTabPanel.html
+++ b/core/src/main/resources/org/apache/karaf/webconsole/core/navigation/markup/ModuleTabPanel.html
@@ -20,7 +20,7 @@
     <ul class="nav nav-tabs">
         <li wicket:id="moduleLinks">
             <a wicket:id="link">
-                <span wicket:id="label">Label</span>
+                <span wicket:id="label"></span>
             </a>
         </li>
     </ul>
diff --git a/core/src/main/resources/org/apache/karaf/webconsole/core/navigation/markup/NavigationTopPanel.html b/core/src/main/resources/org/apache/karaf/webconsole/core/navigation/markup/NavigationTopPanel.html
index 409f597..41e1d23 100644
--- a/core/src/main/resources/org/apache/karaf/webconsole/core/navigation/markup/NavigationTopPanel.html
+++ b/core/src/main/resources/org/apache/karaf/webconsole/core/navigation/markup/NavigationTopPanel.html
@@ -20,7 +20,7 @@
     <ul class="nav">
         <li wicket:id="tabs">
             <a wicket:id="moduleLink">
-                <span wicket:id="moduleLabel">Category</span>
+                <span wicket:id="moduleLabel"></span>
             </a>
         </li>
         <li class="divider-vertical"></li>
@@ -31,19 +31,21 @@
     <ul class="nav pull-right">
         <li class="dropdown active">
             <a href="#" data-toggle="dropdown" class="dropdown-toggle">
-                <span wicket:id="username">Admin</span>
+                <span wicket:id="username"></span>
                 <b class="caret"></b>
             </a>
             <ul class="dropdown-menu">
                 <li>
                     <img wicket:id="avatar" />
-                    <a wicket:id="preferencesLink">Preferences</a>
+                    <a wicket:id="preferencesLink">
+                        <wicket:message key="preferences" />
+                    </a>
                 </li>
             </ul>
         </li>
         <li>
             <a wicket:id="logoutLink">
-                <span wicket:id="label">Logout</span>
+                <wicket:message key="logout" />
             </a>
         </li>
         
diff --git a/core/src/main/resources/org/apache/karaf/webconsole/core/package.properties b/core/src/main/resources/org/apache/karaf/webconsole/core/package.properties
new file mode 100644
index 0000000..95069b8
--- /dev/null
+++ b/core/src/main/resources/org/apache/karaf/webconsole/core/package.properties
@@ -0,0 +1,26 @@
+ # Licensed to the Apache Software Foundation (ASF) under one or more
+ # contributor license agreements.  See the NOTICE file distributed with
+ # this work for additional information regarding copyright ownership.
+ # The ASF licenses this file to You under the Apache License, Version 2.0
+ # (the "License"); you may not use this file except in compliance with
+ # the License.  You may obtain a copy of the License at
+ #
+ #      http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License. 
+
+# common messages used in forms
+install Install
+confirm Confirm
+cancel Cancel
+reset Reset
+details Details
+
+# header translations
+language Language
+preferences Preferences
+logout Logout
\ No newline at end of file
diff --git a/core/src/main/resources/org/apache/karaf/webconsole/core/page/LoginPage.html b/core/src/main/resources/org/apache/karaf/webconsole/core/page/LoginPage.html
index ea7f793..cfdfd2c 100644
--- a/core/src/main/resources/org/apache/karaf/webconsole/core/page/LoginPage.html
+++ b/core/src/main/resources/org/apache/karaf/webconsole/core/page/LoginPage.html
@@ -19,9 +19,7 @@
     <div class="row-fluid" style="margin-top: 150px; margin-bottom: 150px">
         <span class="span4">&nbsp;</span>
         <div class="span4">
-            <div wicket:id="signIn">
-                Here will be sign in form.
-            </div>
+            <div wicket:id="signIn"></div>
         </div>
         <span class="span4">&nbsp;</span>
     </div>
diff --git a/core/src/main/resources/org/apache/karaf/webconsole/core/page/SidebarPage.html b/core/src/main/resources/org/apache/karaf/webconsole/core/page/SidebarPage.html
index 77203dc..06bc9b1 100644
--- a/core/src/main/resources/org/apache/karaf/webconsole/core/page/SidebarPage.html
+++ b/core/src/main/resources/org/apache/karaf/webconsole/core/page/SidebarPage.html
@@ -19,10 +19,10 @@
 
     <div class="row-fluid">
         <div class="span4">
-            <div class="sidebar" wicket:id="sidebar">Sidebar goes here</div>
+            <div class="sidebar" wicket:id="sidebar"></div>
         </div>
         <div class="span8">
-            <div wicket:id="feedback">Feedback stuff</div>
+            <div wicket:id="feedback"></div>
             <wicket:child />
         </div>
     </div>
diff --git a/core/src/main/resources/org/apache/karaf/webconsole/core/page/SinglePage.html b/core/src/main/resources/org/apache/karaf/webconsole/core/page/SinglePage.html
index 6c137f2..40ced62 100644
--- a/core/src/main/resources/org/apache/karaf/webconsole/core/page/SinglePage.html
+++ b/core/src/main/resources/org/apache/karaf/webconsole/core/page/SinglePage.html
@@ -22,7 +22,7 @@
     </div>
 
     <div class="row-fluid">
-        <div wicket:id="feedback">Feedback stuff</div>
+        <div wicket:id="feedback"></div>
         <wicket:child />
     </div>
 
diff --git a/core/src/main/resources/org/apache/karaf/webconsole/core/preferences/PreferencesPage.html b/core/src/main/resources/org/apache/karaf/webconsole/core/preferences/PreferencesPage.html
index 04774b8..5236b73 100644
--- a/core/src/main/resources/org/apache/karaf/webconsole/core/preferences/PreferencesPage.html
+++ b/core/src/main/resources/org/apache/karaf/webconsole/core/preferences/PreferencesPage.html
@@ -18,9 +18,7 @@
 <wicket:extend xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
     <ul>
         <li wicket:id="preferences">
-            <div wicket:id="preferencesPanel">
-                Preference Panel
-            </div>
+            <div wicket:id="preferencesPanel"></div>
         </li>
     </ul>
 </wicket:extend>
\ No newline at end of file
diff --git a/core/src/main/resources/org/apache/karaf/webconsole/core/preferences/PreferencesPanel.html b/core/src/main/resources/org/apache/karaf/webconsole/core/preferences/PreferencesPanel.html
index 3083c82..91f00bc 100644
--- a/core/src/main/resources/org/apache/karaf/webconsole/core/preferences/PreferencesPanel.html
+++ b/core/src/main/resources/org/apache/karaf/webconsole/core/preferences/PreferencesPanel.html
@@ -20,14 +20,14 @@
 
     <ul>
         <li wicket:id="preferences">
-            <span wicket:id="key">key</span>
-            <span wicket:id="value">value</span>
+            <span wicket:id="key"></span>
+            <span wicket:id="value"></span>
         </li>
     </ul>
 
     <ul>
         <li wicket:id="children">
-            <div wicket:id="child">child details</div>
+            <div wicket:id="child"></div>
         </li>
     </ul>
 </wicket:panel>
\ No newline at end of file
diff --git a/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/RefreshLink.java b/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/RefreshLink.java
index bb9f1d3..7586b9f 100644
--- a/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/RefreshLink.java
+++ b/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/RefreshLink.java
@@ -49,9 +49,9 @@
 
         try {
             admin.refreshPackages(new Bundle[] { bundle });
-            Session.get().info(getLocalizer().getString("bundle.refresh", this, getModel()));
+            Session.get().info(getString("bundle.refresh", getModel()));
         } catch (Exception e) {
-            Session.get().info(getLocalizer().getString("bundle.refresh.fail", this, Model.of(e)));
+            Session.get().info(getString("bundle.refresh.fail", Model.of(e)));
         }
         RequestCycle.get().setResponsePage(BundlePage.class);
     }
diff --git a/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/ResolveLink.java b/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/ResolveLink.java
index b48c5a1..335bfb8 100644
--- a/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/ResolveLink.java
+++ b/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/ResolveLink.java
@@ -49,9 +49,9 @@
 
         try {
             admin.resolveBundles(new Bundle[] { bundle });
-            Session.get().info(getLocalizer().getString("bundle.resolve", this, getModel()));
+            Session.get().info(getString("bundle.resolve", getModel()));
         } catch (Exception e) {
-            Session.get().info(getLocalizer().getString("bundle.resolve.fail", this, Model.of(e)));
+            Session.get().info(getString("bundle.resolve.fail", Model.of(e)));
         }
         RequestCycle.get().setResponsePage(BundlePage.class);
     }
diff --git a/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/StartLink.java b/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/StartLink.java
index 150c5ff..ae3d1e5 100644
--- a/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/StartLink.java
+++ b/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/StartLink.java
@@ -44,9 +44,9 @@
 
         try {
             bundle.start();
-            Session.get().info(getLocalizer().getString("bundle.start", this, getModel()));
+            Session.get().info(getString("bundle.start", getModel()));
         } catch (BundleException e) {
-            Session.get().error(getLocalizer().getString("bundle.start.fail", this, Model.of(e)));
+            Session.get().error(getString("bundle.start.fail", Model.of(e)));
         }
         RequestCycle.get().setResponsePage(BundlePage.class);
     }
diff --git a/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/StopLink.java b/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/StopLink.java
index 6feb2c6..12ce3f8 100644
--- a/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/StopLink.java
+++ b/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/StopLink.java
@@ -44,9 +44,9 @@
 
         try {
             bundle.stop();
-            Session.get().info(getLocalizer().getString("bundle.stop", this, getModel()));
+            Session.get().info(getString("bundle.stop", getModel()));
         } catch (BundleException e) {
-            Session.get().error(getLocalizer().getString("bundle.stop.fail", this, Model.of(e)));
+            Session.get().error(getString("bundle.stop.fail", Model.of(e)));
         }
         RequestCycle.get().setResponsePage(BundlePage.class);
     }
diff --git a/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/UninstallLink.java b/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/UninstallLink.java
index 2d9f3c9..6c4ba6e 100644
--- a/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/UninstallLink.java
+++ b/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/UninstallLink.java
@@ -44,9 +44,9 @@
 
         try {
             bundle.uninstall();
-            Session.get().info(getLocalizer().getString("bundle.uninstall", this, getModel()));
+            Session.get().info(getString("bundle.uninstall", getModel()));
         } catch (BundleException e) {
-            Session.get().error(getLocalizer().getString("bundle.uninstall.fail", this, Model.of(e)));
+            Session.get().error(getString("bundle.uninstall.fail", Model.of(e)));
         }
         RequestCycle.get().setResponsePage(BundlePage.class);
     }
diff --git a/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/UpdateLink.java b/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/UpdateLink.java
index 8cc4944..edfc647 100644
--- a/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/UpdateLink.java
+++ b/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/UpdateLink.java
@@ -45,9 +45,9 @@
 
         try {
             bundle.update();
-            Session.get().info(getLocalizer().getString("bundle.update", this, getModel()));
+            Session.get().info(getString("bundle.update", getModel()));
         } catch (BundleException e) {
-            Session.get().error(getLocalizer().getString("bundle.update.fail", this, Model.of(e)));
+            Session.get().error(getString("bundle.update.fail", Model.of(e)));
         }
         RequestCycle.get().setResponsePage(BundlePage.class);
     }
diff --git a/osgi/core/src/main/resources/org/apache/karaf/webconsole/osgi/core/bundle/install/InstallBundlePage.html b/osgi/core/src/main/resources/org/apache/karaf/webconsole/osgi/core/bundle/install/InstallBundlePage.html
index 507e6b6..20724b9 100644
--- a/osgi/core/src/main/resources/org/apache/karaf/webconsole/osgi/core/bundle/install/InstallBundlePage.html
+++ b/osgi/core/src/main/resources/org/apache/karaf/webconsole/osgi/core/bundle/install/InstallBundlePage.html
@@ -16,15 +16,19 @@
    limitations under the License.
 -->
 <wicket:extend xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
-    <h1>Install bundle</h1>
+    <h1><wicket:message key="bundle.install" /></h1>
 
     <form wicket:id="install">
         <div wicket:id="bundle">
         </div>
 
         <div class="form-actions">
-            <button type="submit" class="btn btn-primary" wicket:id="confirm">Install</button>
-            <a class="btn" wicket:id="cancel">Cancel</a>
+            <a type="submit" class="btn btn-primary" wicket:id="confirm">
+                <wicket:message key="confirm" />
+            </a>
+            <a class="btn" wicket:id="cancel">
+                <wicket:message key="cancel" />
+            </a>
         </div>
     </form>
 </wicket:extend>
\ No newline at end of file