From 222b7bae913a65cf002a257e117c0ba688d9f343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20J=C3=B6nsson?= Date: Wed, 4 Feb 2015 13:50:09 +0100 Subject: [PATCH] Initial i18n setup and translations. --- .../src/main/resources/messages_en.properties | 20 ++++++++++++++++++ .../src/main/resources/messages_sv.properties | 21 +++++++++++++++++++ .../webapp/WEB-INF/application-context.xml | 20 ++++++++++++++++++ .../main/webapp/WEB-INF/tags/aboutContent.tag | 8 +++---- .../src/main/webapp/WEB-INF/tags/header.tag | 1 + .../main/webapp/WEB-INF/tags/statsContent.tag | 3 ++- .../src/main/webapp/WEB-INF/tags/topbar.tag | 21 ++++++++++--------- 7 files changed, 78 insertions(+), 16 deletions(-) create mode 100644 openid-connect-server-webapp/src/main/resources/messages_en.properties create mode 100644 openid-connect-server-webapp/src/main/resources/messages_sv.properties diff --git a/openid-connect-server-webapp/src/main/resources/messages_en.properties b/openid-connect-server-webapp/src/main/resources/messages_en.properties new file mode 100644 index 000000000..7c924c1b4 --- /dev/null +++ b/openid-connect-server-webapp/src/main/resources/messages_en.properties @@ -0,0 +1,20 @@ +common.Edit=Edit +common.login=Log in +common.logout=Log out + +about.title=About +about.body=

\ +This OpenID Connect service is built from the MITREid Connect Open Source project, from \ +The MITRE Corporation and the MIT Kerberos and Internet Trust Consortium.\ +

\ +

\ +More information about the project can be found at \ +MITREid Connect on GitHub. \ +There, you can submit bug reports, give feedback, or even contribute code patches for additional features you'd like to see.\ +

+ +statistics.title=Statistics + +home.title=Home + +contact.title=Contact diff --git a/openid-connect-server-webapp/src/main/resources/messages_sv.properties b/openid-connect-server-webapp/src/main/resources/messages_sv.properties new file mode 100644 index 000000000..fd1cba801 --- /dev/null +++ b/openid-connect-server-webapp/src/main/resources/messages_sv.properties @@ -0,0 +1,21 @@ +common.Edit=Ändra + +common.login=Logga in +common.logout=Logga ut + +about.title=Om Tjänsten +about.body=

\ +Denna OpenID Connect är baserad på öppen källkod ifrån projektet MITREid, skapat av \ +The MITRE Corporation och MIT Kerberos and Internet Trust Consortium.\ +

\ +

\ +Mer information om projektet kan finns i projektet \ +MITREid Connect på GitHub. \ +Där kan du skicka in felrapporter, komma med återkoppling, eller till och med bidra med kodtillägg för ytterligare funktioner du skulle vilja ha.\ +

+ +statistics.title=Statistik + +home.title=Hem + +contact.title=Kontakt diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/application-context.xml b/openid-connect-server-webapp/src/main/webapp/WEB-INF/application-context.xml index 027924451..8053a586b 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/application-context.xml +++ b/openid-connect-server-webapp/src/main/webapp/WEB-INF/application-context.xml @@ -200,7 +200,27 @@ + + + + + + + + + + + classpath:custom_messages + classpath:messages + + + + + + + + diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/aboutContent.tag b/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/aboutContent.tag index 200ce5c77..774e3172f 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/aboutContent.tag +++ b/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/aboutContent.tag @@ -1,5 +1,3 @@ -

About

-

This OpenID Connect service is built from the MITREid Connect Open Source project, from The MITRE Corporation and the MIT Kerberos and Internet Trust Consortium.

-

-More information about the project can be found at MITREid Connect on GitHub. There, you can submit bug reports, give feedback, or even contribute code patches for additional features you'd like to see. -

+<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> +

+ diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/header.tag b/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/header.tag index 258893bdb..05e15f436 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/header.tag +++ b/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/header.tag @@ -1,6 +1,7 @@ <%@attribute name="title" required="false"%> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> <%@ tag import="com.google.gson.Gson" %> diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/statsContent.tag b/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/statsContent.tag index e7c8cad4d..c6b42fceb 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/statsContent.tag +++ b/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/statsContent.tag @@ -1,4 +1,5 @@ -

Current Statistics

+<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> +

There have been ${statsSummary["userCount"]} user${statsSummary["userCount"] == 1 ? "" : "s"} diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/topbar.tag b/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/topbar.tag index f7a896d3e..f2ec1b083 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/topbar.tag +++ b/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/topbar.tag @@ -1,6 +1,7 @@ <%@attribute name="pageName" required="false"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> <%@ taglib prefix="o" tagdir="/WEB-INF/tags"%> @@ -39,34 +40,34 @@