English translation for core and clean up of core markup. Use shorter method for...
authorŁukasz Dywicki <ldywicki@apache.org>
Sun, 19 Feb 2012 20:24:13 +0000 (20:24 +0000)
committerŁukasz Dywicki <ldywicki@apache.org>
Sun, 19 Feb 2012 20:24:13 +0000 (20:24 +0000)
git-svn-id: https://svn.apache.org/repos/asf/karaf/webconsole/trunk@1291053 13f79535-47bb-0310-9956-ffa450edef68

20 files changed:
core/src/main/java/org/apache/karaf/webconsole/core/dashboard/DashboardPage.java
core/src/main/java/org/apache/karaf/webconsole/core/navigation/markup/NavigationTopPanel.java
core/src/main/resources/org/apache/karaf/webconsole/core/dashboard/DashboardPage.html
core/src/main/resources/org/apache/karaf/webconsole/core/dashboard/package.properties [new file with mode: 0644]
core/src/main/resources/org/apache/karaf/webconsole/core/navigation/markup/LanguageTopPanel.html
core/src/main/resources/org/apache/karaf/webconsole/core/navigation/markup/ModuleTabPanel.html
core/src/main/resources/org/apache/karaf/webconsole/core/navigation/markup/NavigationTopPanel.html
core/src/main/resources/org/apache/karaf/webconsole/core/package.properties [new file with mode: 0644]
core/src/main/resources/org/apache/karaf/webconsole/core/page/LoginPage.html
core/src/main/resources/org/apache/karaf/webconsole/core/page/SidebarPage.html
core/src/main/resources/org/apache/karaf/webconsole/core/page/SinglePage.html
core/src/main/resources/org/apache/karaf/webconsole/core/preferences/PreferencesPage.html
core/src/main/resources/org/apache/karaf/webconsole/core/preferences/PreferencesPanel.html
osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/RefreshLink.java
osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/ResolveLink.java
osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/StartLink.java
osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/StopLink.java
osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/UninstallLink.java
osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/link/UpdateLink.java
osgi/core/src/main/resources/org/apache/karaf/webconsole/osgi/core/bundle/install/InstallBundlePage.html

index 50c149e..3838122 100644 (file)
@@ -41,7 +41,7 @@ public class DashboardPage extends SinglePage {
     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
index f79c286..f9fdd19 100644 (file)
@@ -36,7 +36,6 @@ import org.apache.wicket.markup.html.list.ListView;
 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 @@ public class NavigationTopPanel extends LanguageTopPanel {
         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() {
index 260a317..abb51ed 100644 (file)
    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 (file)
index 0000000..017c39c
--- /dev/null
@@ -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
index 045d7d4..5e318a0 100644 (file)
         <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>
index c42fd84..8df2528 100644 (file)
@@ -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>
index 409f597..41e1d23 100644 (file)
@@ -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>
     <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 (file)
index 0000000..95069b8
--- /dev/null
@@ -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
index ea7f793..cfdfd2c 100644 (file)
@@ -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>
index 77203dc..06bc9b1 100644 (file)
 
     <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>
index 6c137f2..40ced62 100644 (file)
@@ -22,7 +22,7 @@
     </div>
 
     <div class="row-fluid">
-        <div wicket:id="feedback">Feedback stuff</div>
+        <div wicket:id="feedback"></div>
         <wicket:child />
     </div>
 
index 04774b8..5236b73 100644 (file)
@@ -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
index 3083c82..91f00bc 100644 (file)
 
     <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
index bb9f1d3..7586b9f 100644 (file)
@@ -49,9 +49,9 @@ public class RefreshLink extends Link<Bundle> {
 
         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);
     }
index b48c5a1..335bfb8 100644 (file)
@@ -49,9 +49,9 @@ public class ResolveLink extends Link<Bundle> {
 
         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);
     }
index 150c5ff..ae3d1e5 100644 (file)
@@ -44,9 +44,9 @@ public class StartLink extends Link<Bundle> {
 
         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);
     }
index 6feb2c6..12ce3f8 100644 (file)
@@ -44,9 +44,9 @@ public class StopLink extends Link<Bundle> {
 
         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);
     }
index 2d9f3c9..6c4ba6e 100644 (file)
@@ -44,9 +44,9 @@ public class UninstallLink extends Link<Bundle> {
 
         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);
     }
index 8cc4944..edfc647 100644 (file)
@@ -45,9 +45,9 @@ public class UpdateLink extends Link<Bundle> {
 
         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);
     }
index 507e6b6..20724b9 100644 (file)
    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