From 13b8a169ae213445380f8efabb9c8aeaa1dca756 Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Mon, 3 Mar 2025 11:30:34 +0100 Subject: [PATCH] fix: traduire le copyright. fix #10610 --- .../gwt/client/mainpage/MainPageImpl.ui.xml | 4 ++-- .../gwt/client/resources/i18n/TempoConstants.java | 12 ++++++++++++ .../soeretempo/gwt/server/servlet/PageServlet.java | 1 + .../resources/i18n/TempoConstants_fr.properties | 2 ++ .../server/resources/i18n/TempoConstants.properties | 1 + .../resources/i18n/TempoConstants_fr.properties | 1 + src/main/webapp/WEB-INF/page.jsp | 2 +- 7 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/main/java/fr/soeretempo/gwt/client/mainpage/MainPageImpl.ui.xml b/src/main/java/fr/soeretempo/gwt/client/mainpage/MainPageImpl.ui.xml index e761679d5..47ac1a54b 100644 --- a/src/main/java/fr/soeretempo/gwt/client/mainpage/MainPageImpl.ui.xml +++ b/src/main/java/fr/soeretempo/gwt/client/mainpage/MainPageImpl.ui.xml @@ -43,9 +43,9 @@ addStyleNames="{res.css.southPanel} step-southPanel"> <g:HTMLPanel addStyleNames="{res.css.leftSouthPanel}"> <b:Anchor ui:field="smallCopyright" href="https://tempo.pheno.fr/" - target="_blank" styleName="{res.css.copyright}" text="©TEMPO"/> + target="_blank" styleName="{res.css.copyright}" text="{csts.copyrightTempoNetworkSmall}"/> <b:Anchor ui:field="largeCopyright" href="https://tempo.pheno.fr/" - target="_blank" styleName="{res.css.copyright}" text="© Réseau TEMPO"/> + target="_blank" styleName="{res.css.copyright}" text="{csts.copyrightTempoNetwork}"/> <tui:ImageAnchor marginLeft="7" href="https://www.enseignementsup-recherche.gouv.fr/" resource="{res.logoMinistereRecherche}" target="_blank" alt="Ministère de l'Enseignement Supérieur et de la Recherche" title="Ministère de la Recherche"/> <tui:ImageAnchor marginLeft="3" href="https://www.allenvi.fr/" resource="{res.logoAllEnvi}" target="_blank" alt="AllEnvi" title="Alliance Nationale de Recherche pour l'Environnemennt"/> <tui:ImageAnchor href="https://www.inrae.fr/" resource="{res.logoInrae}" target="_blank" alt="INRAE" title="Institut National de Recherche pour l'Agriculture, l'Alimentation et l'Environnement"/> diff --git a/src/main/java/fr/soeretempo/gwt/client/resources/i18n/TempoConstants.java b/src/main/java/fr/soeretempo/gwt/client/resources/i18n/TempoConstants.java index 1c40d0962..adb3815a7 100644 --- a/src/main/java/fr/soeretempo/gwt/client/resources/i18n/TempoConstants.java +++ b/src/main/java/fr/soeretempo/gwt/client/resources/i18n/TempoConstants.java @@ -459,6 +459,18 @@ public interface TempoConstants extends com.google.gwt.i18n.client.ConstantsWith @DefaultStringValue("Contact") String contactUs(); + /** + * @return translation + */ + @DefaultStringValue("© TEMPO Network") + String copyrightTempoNetwork(); + + /** + * @return translation + */ + @DefaultStringValue("© TEMPO") + String copyrightTempoNetworkSmall(); + /** * @return translation */ diff --git a/src/main/java/fr/soeretempo/gwt/server/servlet/PageServlet.java b/src/main/java/fr/soeretempo/gwt/server/servlet/PageServlet.java index a1043e99f..4a3220d66 100644 --- a/src/main/java/fr/soeretempo/gwt/server/servlet/PageServlet.java +++ b/src/main/java/fr/soeretempo/gwt/server/servlet/PageServlet.java @@ -95,6 +95,7 @@ public final class PageServlet extends HttpServlet { final String title = i18n.i18n("servlet." + baseName); request.setAttribute("appurl", config.get(Key.APP_URL)); request.setAttribute("relurl", path + "?"); + request.setAttribute("copyright-tempo-network", i18n.i18n("copyrightTempoNetwork")); request.setAttribute("lang", tag); request.setAttribute("title", title); request.setAttribute("text", text); diff --git a/src/main/resources/fr/soeretempo/gwt/client/resources/i18n/TempoConstants_fr.properties b/src/main/resources/fr/soeretempo/gwt/client/resources/i18n/TempoConstants_fr.properties index b22d7f937..554766ee7 100644 --- a/src/main/resources/fr/soeretempo/gwt/client/resources/i18n/TempoConstants_fr.properties +++ b/src/main/resources/fr/soeretempo/gwt/client/resources/i18n/TempoConstants_fr.properties @@ -65,6 +65,8 @@ cities=Communes collapse=Replier communes=Communes confirmClosing=Confirmer la fermeture de l'application +copyrightTempoNetwork=© Réseau TEMPO +copyrightTempoNetworkSmall=© TEMPO countries=Pays openPanel=Ouvrir le panneau d'administration confirmDisconnect=Vous utiliserez le site de façon anonyme et certaines sources de donn\u00e9es et fonctionnalit\u00e9s ne seront pas disponibles. diff --git a/src/main/resources/fr/soeretempo/gwt/server/resources/i18n/TempoConstants.properties b/src/main/resources/fr/soeretempo/gwt/server/resources/i18n/TempoConstants.properties index afaf69841..2ac28ed36 100644 --- a/src/main/resources/fr/soeretempo/gwt/server/resources/i18n/TempoConstants.properties +++ b/src/main/resources/fr/soeretempo/gwt/server/resources/i18n/TempoConstants.properties @@ -32,6 +32,7 @@ commonDataFileDescription=The file 'common_variables.csv' contains all the data contactName=Contact name contactEmail=Contact email address contactOrganisation=Contact organisation +copyrightTempoNetwork=\u00a9 TEMPO Network additionalColumns=Additionnal data for dataSource=Data source dataSourceDescriptions=Data sources short descriptions diff --git a/src/main/resources/fr/soeretempo/gwt/server/resources/i18n/TempoConstants_fr.properties b/src/main/resources/fr/soeretempo/gwt/server/resources/i18n/TempoConstants_fr.properties index 80ecb7c05..599247763 100644 --- a/src/main/resources/fr/soeretempo/gwt/server/resources/i18n/TempoConstants_fr.properties +++ b/src/main/resources/fr/soeretempo/gwt/server/resources/i18n/TempoConstants_fr.properties @@ -34,6 +34,7 @@ commonDataFileDescription=Le fichier 'variables_communes.csv' contient toutes le contactName=Nom contact contactEmail=Adresse email contact contactOrganisation=Organisation contact +copyrightTempoNetwork=\u00a9 R\u00e9seau TEMPO additionalColumns=Donnees additionnelles pour dataSource=Source donn\u00e9es dataSourceDescriptions=Courte description des sources de donn\u00e9es diff --git a/src/main/webapp/WEB-INF/page.jsp b/src/main/webapp/WEB-INF/page.jsp index 617cb4192..4391d53c1 100644 --- a/src/main/webapp/WEB-INF/page.jsp +++ b/src/main/webapp/WEB-INF/page.jsp @@ -51,7 +51,7 @@ </div> <footer> <ul> - <li>© Réseau TEMPO</li> + <li><%=request.getAttribute("copyright-tempo-network")%></li> <li><a href="<%=request.getAttribute("appurl")%>/legal"><%=request.getAttribute("title-legal-notice")%></a></li> <li><a href="<%=request.getAttribute("appurl")%>/privacy"><%=request.getAttribute("title-privacy")%></a></li> <li><a href="<%=request.getAttribute("appurl")%>/cookies"><%=request.getAttribute("title-cookies")%></a></li> -- GitLab