From de6a42d69a8064f21fa2d71152aac9b027243dd7 Mon Sep 17 00:00:00 2001 From: Geoffrey POUZET Date: Wed, 14 Oct 2020 21:16:15 +0200 Subject: [PATCH] Setting up internationalization. --- src/main/resources/messages.properties | 9 ++++++ src/main/resources/messages_en.properties | 9 ++++++ src/main/resources/messages_fr.properties | 9 ++++++ src/main/webapp/vue/animal_behavior.jsp | 3 +- src/main/webapp/vue/animal_care.jsp | 3 +- .../webapp/vue/animal_cares_and_behaviors.jsp | 2 ++ src/main/webapp/vue/animal_list.jsp | 3 +- src/main/webapp/vue/base/footer.jsp | 7 ++-- src/main/webapp/vue/base/header.jsp | 3 -- src/main/webapp/vue/base/language.jsp | 6 ++++ src/main/webapp/vue/base/navbar.jsp | 32 ++++++++++--------- src/main/webapp/vue/index.jsp | 6 ++-- 12 files changed, 67 insertions(+), 25 deletions(-) create mode 100644 src/main/resources/messages.properties create mode 100644 src/main/resources/messages_en.properties create mode 100644 src/main/resources/messages_fr.properties create mode 100644 src/main/webapp/vue/base/language.jsp diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties new file mode 100644 index 0000000..9aaf6ef --- /dev/null +++ b/src/main/resources/messages.properties @@ -0,0 +1,9 @@ +navbar.language = Language +navbar.signin = Sign in +navbar.signup = Sign up +navbar.logout = Logout +navbar.my_animals = My animals +navbar.cares_and_behaviors = Care and Behaviors + +footer.license = Application under {0} license +footer.source_code = Source code \ No newline at end of file diff --git a/src/main/resources/messages_en.properties b/src/main/resources/messages_en.properties new file mode 100644 index 0000000..c4bb5f0 --- /dev/null +++ b/src/main/resources/messages_en.properties @@ -0,0 +1,9 @@ +navbar.language = Language +navbar.signin = Sign in +navbar.signup = Sign up +navbar.logout = Logout +navbar.my_animals = My animals +navbar.cares_and_behaviors = Care and Behaviors + +footer.source_code=Source code +footer.license=Application under {0} license diff --git a/src/main/resources/messages_fr.properties b/src/main/resources/messages_fr.properties new file mode 100644 index 0000000..5bcd9ab --- /dev/null +++ b/src/main/resources/messages_fr.properties @@ -0,0 +1,9 @@ +navbar.language = Langue +navbar.signin = Connexion +navbar.signup = Cr\u00e9er un compte +navbar.logout = D\u00e9connexion +navbar.my_animals = Mes animaux +navbar.cares_and_behaviors = Soins et Comportements + +footer.source_code=Code source +footer.license=Application sous licence {0} diff --git a/src/main/webapp/vue/animal_behavior.jsp b/src/main/webapp/vue/animal_behavior.jsp index 070db67..4efddc2 100644 --- a/src/main/webapp/vue/animal_behavior.jsp +++ b/src/main/webapp/vue/animal_behavior.jsp @@ -2,9 +2,10 @@ <%@page import="java.util.List"%> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%> -<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ page isELIgnored="false" %> +<%@ include file="base/language.jsp" %> + diff --git a/src/main/webapp/vue/animal_care.jsp b/src/main/webapp/vue/animal_care.jsp index f875ae5..5be6311 100644 --- a/src/main/webapp/vue/animal_care.jsp +++ b/src/main/webapp/vue/animal_care.jsp @@ -2,9 +2,10 @@ <%@page import="java.util.List"%> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%> -<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ page isELIgnored="false" %> +<%@ include file="base/language.jsp" %> + diff --git a/src/main/webapp/vue/animal_cares_and_behaviors.jsp b/src/main/webapp/vue/animal_cares_and_behaviors.jsp index f06ee05..3ffa70d 100644 --- a/src/main/webapp/vue/animal_cares_and_behaviors.jsp +++ b/src/main/webapp/vue/animal_cares_and_behaviors.jsp @@ -9,6 +9,8 @@ +<%@ include file="base/language.jsp" %> + diff --git a/src/main/webapp/vue/animal_list.jsp b/src/main/webapp/vue/animal_list.jsp index fde1e3c..32d35ae 100644 --- a/src/main/webapp/vue/animal_list.jsp +++ b/src/main/webapp/vue/animal_list.jsp @@ -2,10 +2,11 @@ <%@page import="java.util.List"%> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%> -<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ page isELIgnored="false" %> +<%@ include file="base/language.jsp" %> + <%@ include file="base/header.jsp" %> diff --git a/src/main/webapp/vue/base/footer.jsp b/src/main/webapp/vue/base/footer.jsp index 6afaafe..0e8a743 100644 --- a/src/main/webapp/vue/base/footer.jsp +++ b/src/main/webapp/vue/base/footer.jsp @@ -18,6 +18,9 @@

Logo Koario Medical Training Tracker

-

Application sous licence MIT

-

Code source

+

+ + MIT" /> + +

\ No newline at end of file diff --git a/src/main/webapp/vue/base/header.jsp b/src/main/webapp/vue/base/header.jsp index ecb3026..fd2c8b1 100644 --- a/src/main/webapp/vue/base/header.jsp +++ b/src/main/webapp/vue/base/header.jsp @@ -2,9 +2,6 @@ - - - diff --git a/src/main/webapp/vue/base/language.jsp b/src/main/webapp/vue/base/language.jsp new file mode 100644 index 0000000..8eeb7fc --- /dev/null +++ b/src/main/webapp/vue/base/language.jsp @@ -0,0 +1,6 @@ +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> + + + + diff --git a/src/main/webapp/vue/base/navbar.jsp b/src/main/webapp/vue/base/navbar.jsp index 24198f1..9299154 100644 --- a/src/main/webapp/vue/base/navbar.jsp +++ b/src/main/webapp/vue/base/navbar.jsp @@ -1,6 +1,8 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@page import="org.springframework.security.core.Authentication"%> <%@page import="fr.geoffrey.medical_training_tracker.controller.IndexController"%> +<%@ page isELIgnored="false" %> + @@ -24,20 +26,13 @@
Logo Medical Training Tracker
diff --git a/src/main/webapp/vue/index.jsp b/src/main/webapp/vue/index.jsp index 966a88c..9c1b970 100644 --- a/src/main/webapp/vue/index.jsp +++ b/src/main/webapp/vue/index.jsp @@ -1,8 +1,10 @@ <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%> -<%@ page isELIgnored="false" %> - +<%@ include file="base/language.jsp" %> + + + <%@ include file="base/header.jsp" %>