# HG changeset patch # User Ingo Weinzierl # Date 1271666255 0 # Node ID 21ad44ccdb8431e86ae506ecbd82c6269488c4a1 # Parent acb0cea942587a8df11c53e9496a7449f0b86784 Tooltip text of the back-button became language specific (issue227). gnv/trunk@943 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r acb0cea94258 -r 21ad44ccdb84 gnv/ChangeLog --- a/gnv/ChangeLog Mon Apr 19 08:00:05 2010 +0000 +++ b/gnv/ChangeLog Mon Apr 19 08:37:35 2010 +0000 @@ -1,3 +1,24 @@ +2010-04-19 Ingo Weinzierl + + Issue227 + + * src/main/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClient.java, + src/main/java/de/intevation/gnv/artifactdatabase/client/DefaultArtifactDatabaseClient.java: + Added a new method to retrieve the current locale. + + * src/main/java/de/intevation/gnv/action/DescribeUIAction.java: Feed the xsl + transformer with a tooltip text for the back-button. + + * src/main/resources/applicationMessages.properties, + src/main/resources/applicationMessages_en.properties: Added a tooltip text + for the back-button. + + * src/main/webapp/WEB-INF/config/templates/describe-ui-static.xsl: Use the + tooltip text that is fed in DescribeUIAction. + + * src/main/java/de/intevation/gnv/action/ChangeOptionsAction.java: Removed a + PropertiesReader which isn't used there. + 2010-04-19 Sascha L. Teichmann * src/main/resources/applicationMessages.properties: Forgot a dot. ;-) diff -r acb0cea94258 -r 21ad44ccdb84 gnv/src/main/java/de/intevation/gnv/action/ChangeOptionsAction.java --- a/gnv/src/main/java/de/intevation/gnv/action/ChangeOptionsAction.java Mon Apr 19 08:00:05 2010 +0000 +++ b/gnv/src/main/java/de/intevation/gnv/action/ChangeOptionsAction.java Mon Apr 19 08:37:35 2010 +0000 @@ -8,9 +8,6 @@ import de.intevation.gnv.artifactdatabase.objects.OutputMode; import de.intevation.gnv.artifactdatabase.objects.OutputParameter; -import de.intevation.gnv.propertiesreader.PropertiesReader; -import de.intevation.gnv.propertiesreader.PropertiesReaderFactory; - import java.text.NumberFormat; import java.text.ParseException; @@ -53,8 +50,6 @@ HttpServletResponse response) throws Exception { log.debug("NextArtifactStepAction.execute"); try { - PropertiesReaderFactory fac = PropertiesReaderFactory.getInstance(); - PropertiesReader reader = fac.getPropertiesReader(); SessionModel sm = SessionModelFactory.getInstance() .getSessionModel(request); diff -r acb0cea94258 -r 21ad44ccdb84 gnv/src/main/java/de/intevation/gnv/action/DescribeUIAction.java --- a/gnv/src/main/java/de/intevation/gnv/action/DescribeUIAction.java Mon Apr 19 08:00:05 2010 +0000 +++ b/gnv/src/main/java/de/intevation/gnv/action/DescribeUIAction.java Mon Apr 19 08:37:35 2010 +0000 @@ -8,10 +8,15 @@ import de.intevation.gnv.artifactdatabase.objects.ArtifactDescription; +import de.intevation.gnv.propertiesreader.PropertiesReader; +import de.intevation.gnv.propertiesreader.PropertiesReaderFactory; + import de.intevation.gnv.util.ArtifactNamespaceContext; import de.intevation.gnv.util.XMLUtils; import de.intevation.gnv.util.XSLTransformer; +import java.util.ResourceBundle; + import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -81,11 +86,16 @@ Node currentUI = artifactDescription.getCurrentUI(); if (currentUI != null) { + ResourceBundle res = ResourceBundle.getBundle( + "applicationMessages", adc.getLocale()); + String editText = res.getString("gnviewer.history.back.button"); + XSLTransformer transformer = new XSLTransformer(); String url = response.encodeURL( mapping.findForward("back").getPath()); transformer.addParameter("back-url", url); + transformer.addParameter("edit", editText); String fisUrl = response.encodeURL( mapping.findForward("selectfis").getPath()); diff -r acb0cea94258 -r 21ad44ccdb84 gnv/src/main/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClient.java --- a/gnv/src/main/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClient.java Mon Apr 19 08:00:05 2010 +0000 +++ b/gnv/src/main/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClient.java Mon Apr 19 08:37:35 2010 +0000 @@ -201,6 +201,12 @@ public void setLocale(Locale locale); /** + * Get the current locale. + * @return the current locale. + */ + public Locale getLocale(); + + /** * Returns some meta information about the currently selected * ArtifactFactory. * diff -r acb0cea94258 -r 21ad44ccdb84 gnv/src/main/java/de/intevation/gnv/artifactdatabase/client/DefaultArtifactDatabaseClient.java --- a/gnv/src/main/java/de/intevation/gnv/artifactdatabase/client/DefaultArtifactDatabaseClient.java Mon Apr 19 08:00:05 2010 +0000 +++ b/gnv/src/main/java/de/intevation/gnv/artifactdatabase/client/DefaultArtifactDatabaseClient.java Mon Apr 19 08:37:35 2010 +0000 @@ -1040,6 +1040,10 @@ this.locale = locale; } + public Locale getLocale() { + return locale; + } + public Collection getArtifactFactoryMetaInformation( Collection mapServices, diff -r acb0cea94258 -r 21ad44ccdb84 gnv/src/main/resources/applicationMessages.properties --- a/gnv/src/main/resources/applicationMessages.properties Mon Apr 19 08:00:05 2010 +0000 +++ b/gnv/src/main/resources/applicationMessages.properties Mon Apr 19 08:37:35 2010 +0000 @@ -19,6 +19,7 @@ gnviewer.project.load.button = Laden gnviewer.history.title=\u00dcberblick +gnviewer.history.back.button=Bearbeiten gnviewer.fis.fis_marnet = Marnet gnviewer.fis.fis_imis = IMIS diff -r acb0cea94258 -r 21ad44ccdb84 gnv/src/main/resources/applicationMessages_en.properties --- a/gnv/src/main/resources/applicationMessages_en.properties Mon Apr 19 08:00:05 2010 +0000 +++ b/gnv/src/main/resources/applicationMessages_en.properties Mon Apr 19 08:37:35 2010 +0000 @@ -15,6 +15,7 @@ gnviewer.app.title = BSH-GDI genericViewer gnviewer.history.title=Summary +gnviewer.history.back.button=Change gnviewer.project.save = Save Project gnviewer.project.load = Load Project diff -r acb0cea94258 -r 21ad44ccdb84 gnv/src/main/webapp/WEB-INF/config/templates/describe-ui-static.xsl --- a/gnv/src/main/webapp/WEB-INF/config/templates/describe-ui-static.xsl Mon Apr 19 08:00:05 2010 +0000 +++ b/gnv/src/main/webapp/WEB-INF/config/templates/describe-ui-static.xsl Mon Apr 19 08:37:35 2010 +0000 @@ -11,7 +11,7 @@ - bearbeiten +