diff --git a/ccm-core/src/main/java/org/libreccm/ui/MvcLocaleResolver.java b/ccm-core/src/main/java/org/libreccm/ui/MvcLocaleResolver.java
new file mode 100644
index 000000000..ca80dcbfa
--- /dev/null
+++ b/ccm-core/src/main/java/org/libreccm/ui/MvcLocaleResolver.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2020 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.ui;
+
+import org.libreccm.l10n.GlobalizationHelper;
+
+import java.util.Locale;
+
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Inject;
+import javax.mvc.locale.LocaleResolver;
+import javax.mvc.locale.LocaleResolverContext;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RequestScoped
+public class MvcLocaleResolver implements LocaleResolver {
+
+ @Inject
+ private GlobalizationHelper globalizationHelper;
+
+ @Override
+ public Locale resolveLocale(final LocaleResolverContext context) {
+ return globalizationHelper.getNegotiatedLocale();
+ }
+
+}
diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/AdminMessages.java b/ccm-core/src/main/java/org/libreccm/ui/admin/AdminMessages.java
new file mode 100644
index 000000000..6890af911
--- /dev/null
+++ b/ccm-core/src/main/java/org/libreccm/ui/admin/AdminMessages.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2020 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.ui.admin;
+
+import org.libreccm.l10n.GlobalizationHelper;
+
+import java.util.AbstractMap;
+import java.util.ResourceBundle;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import javax.annotation.PostConstruct;
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RequestScoped
+@Named("AdminMessages")
+public class AdminMessages extends AbstractMap {
+
+ @Inject
+ private GlobalizationHelper globalizationHelper;
+
+ private ResourceBundle messages;
+
+
+
+ @PostConstruct
+ private void init() {
+ messages = ResourceBundle.getBundle(
+ AdminConstants.ADMIN_BUNDLE,
+ globalizationHelper.getNegotiatedLocale()
+ );
+ }
+
+ public String getMessage(final String key) {
+ if (messages.containsKey(key)) {
+ return messages.getString(key);
+ } else {
+ return "???key???";
+ }
+ }
+
+ public String get(final String key) {
+ return getMessage(key);
+ }
+
+ @Override
+ public Set> entrySet() {
+ return messages
+ .keySet()
+ .stream()
+ .collect(
+ Collectors.toMap(key -> key, key-> messages.getString(key))
+ )
+ .entrySet();
+ }
+
+}
diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/applications/ApplicationsPage.java b/ccm-core/src/main/java/org/libreccm/ui/admin/applications/ApplicationsPage.java
index 57b5da792..0eb0e7f4a 100644
--- a/ccm-core/src/main/java/org/libreccm/ui/admin/applications/ApplicationsPage.java
+++ b/ccm-core/src/main/java/org/libreccm/ui/admin/applications/ApplicationsPage.java
@@ -67,7 +67,7 @@ public class ApplicationsPage implements AdminPage {
@Override
public String getIcon() {
- return "journals";
+ return "puzzle";
}
@Override
diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/sites/SitesPage.java b/ccm-core/src/main/java/org/libreccm/ui/admin/sites/SitesPage.java
index 3b80c3df7..bab4b12cf 100644
--- a/ccm-core/src/main/java/org/libreccm/ui/admin/sites/SitesPage.java
+++ b/ccm-core/src/main/java/org/libreccm/ui/admin/sites/SitesPage.java
@@ -66,7 +66,7 @@ public class SitesPage implements AdminPage {
@Override
public String getIcon() {
- return "bookshelf";
+ return "collection";
}
@Override
diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/systeminformation/SystemInformationController.java b/ccm-core/src/main/java/org/libreccm/ui/admin/systeminformation/SystemInformationController.java
index bbc38465e..a85cd9521 100644
--- a/ccm-core/src/main/java/org/libreccm/ui/admin/systeminformation/SystemInformationController.java
+++ b/ccm-core/src/main/java/org/libreccm/ui/admin/systeminformation/SystemInformationController.java
@@ -23,7 +23,9 @@ import org.libreccm.security.AuthorizationRequired;
import org.libreccm.security.RequiresPrivilege;
import javax.enterprise.context.RequestScoped;
+import javax.inject.Inject;
import javax.mvc.Controller;
+import javax.mvc.MvcContext;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
@@ -36,6 +38,9 @@ import javax.ws.rs.Path;
@Path("/systeminformation")
public class SystemInformationController {
+ @Inject
+ private MvcContext mvc;
+
@GET
@Path("/")
@AuthorizationRequired
diff --git a/ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/applications.xhtml b/ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/applications.xhtml
index 367fdcefb..25c5db283 100644
--- a/ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/applications.xhtml
+++ b/ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/applications.xhtml
@@ -4,13 +4,22 @@
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
-
+
+
+
+
+ #{AdminMessages['applications.label']}
+
+
+
-
Applications
+
#{AdminMessages['applications.label']}
Placeholder
+