Mercurial > dive4elements > gnv-client
changeset 966:13de46229f63
I18N of links to insert example linestrings/polygons (issue272).
gnv/trunk@1123 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 25 May 2010 14:30:25 +0000 |
parents | b7c6bf3cd7c9 |
children | c7f8a9b4b006 |
files | gnv/ChangeLog gnv/src/main/java/de/intevation/gnv/action/DescribeUIAction.java gnv/src/main/resources/applicationMessages.properties gnv/src/main/resources/applicationMessages_en.properties gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl |
diffstat | 5 files changed, 35 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gnv/ChangeLog Tue May 25 07:41:31 2010 +0000 +++ b/gnv/ChangeLog Tue May 25 14:30:25 2010 +0000 @@ -1,3 +1,19 @@ +2010-05-25 Ingo Weinzierl <ingo.weinzierl@intevation.de> + + Issue272 + + * src/main/java/de/intevation/gnv/action/DescribeUIAction.java: Read strings + for example linestring/polygon from resource bundle and put them into the + XSL-transformator. + + * src/main/resources/applicationMessages.properties, + src/main/resources/applicationMessages_en.properties: Added labels for + links to insert example linestring/polygon. + + * src/main/webapp/WEB-INF/config/templates/describe-ui.xsl: Don't use static + strings for example linestring/polygon links but use the parameter that + have been added in DescribeUIAction - which are i18n. + 2010-05-25 Ingo Weinzierl <ingo.weinzierl@intevation.de> Issue266
--- a/gnv/src/main/java/de/intevation/gnv/action/DescribeUIAction.java Tue May 25 07:41:31 2010 +0000 +++ b/gnv/src/main/java/de/intevation/gnv/action/DescribeUIAction.java Tue May 25 14:30:25 2010 +0000 @@ -98,7 +98,12 @@ if (currentUI != null) { ResourceBundle res = ResourceBundle.getBundle( "applicationMessages", locale); - String editText = res.getString("gnviewer.history.back.button"); + String editText = res.getString( + "gnviewer.history.back.button"); + String exampleLinestring = res.getString( + "gnviewer.example.linestring"); + String examplePolygon = res.getString( + "gnviewer.example.polygon"); XSLTransformer transformer = new XSLTransformer(); @@ -106,6 +111,10 @@ mapping.findForward("back").getPath()); transformer.addParameter("back-url", url); transformer.addParameter("edit", editText); + transformer.addParameter("example-polygon", examplePolygon); + transformer.addParameter( + "example-linestring", + exampleLinestring); String fisUrl = response.encodeURL( mapping.findForward("selectfis").getPath());
--- a/gnv/src/main/resources/applicationMessages.properties Tue May 25 07:41:31 2010 +0000 +++ b/gnv/src/main/resources/applicationMessages.properties Tue May 25 14:30:25 2010 +0000 @@ -44,6 +44,8 @@ gnviewer.select.button = Ausw\u00e4hlen gnviewer.select.button.src = ./images/auswaehlen.png gnviewer.draw.button = Aktualisieren +gnviewer.example.linestring=Beispiel WKT-Linestring einf\u00fcgen +gnviewer.example.polygon=Beispiel WKT-Polygon einf\u00fcgen gnviewer.productselection.overlay.title = Die Anfrage wird bearbeitet. Bitte gedulden Sie sich einen Moment. gnviewer.productselection.fisselection.title = Fachinformationssystem
--- a/gnv/src/main/resources/applicationMessages_en.properties Tue May 25 07:41:31 2010 +0000 +++ b/gnv/src/main/resources/applicationMessages_en.properties Tue May 25 14:30:25 2010 +0000 @@ -44,6 +44,8 @@ gnviewer.select.button = Choose gnviewer.select.button.src = ./images/choose.png gnviewer.draw.button = Update +gnviewer.example.linestring=Insert an example linestring as wkt +gnviewer.example.polygon=Insert an example polygon as wkt gnviewer.productselection.overlay.title = Your request will be processed. Please wait... gnviewer.productselection.fisselection.title = Data set
--- a/gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl Tue May 25 07:41:31 2010 +0000 +++ b/gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl Tue May 25 14:30:25 2010 +0000 @@ -9,6 +9,9 @@ <xsl:output method="html" version="1.0" encoding="UTF-8" omit-xml-declaration="no" /> + <xsl:param name="example-linestring"/> + <xsl:param name="example-polygon"/> + <!-- single select --> <xsl:template match="xform:select1"> <xsl:variable name="selectName" select="@ref"/> @@ -157,10 +160,10 @@ <!-- TODO: Remove this when we have the GIS interface. (slt) --> <xsl:choose> <xsl:when test="$inputName = 'mesh_linestring'"> - <a href="javascript:copy_demo_wkt_line();"><xsl:text>Beispiel WKT-Linestring einfügen:</xsl:text></a><br/> + <a href="javascript:copy_demo_wkt_line();"><xsl:value-of select="$example-linestring"/>:</a><br/> </xsl:when> <xsl:when test="$inputName = 'mesh_polygon'"> - <a href="javascript:copy_demo_wkt_polygon();"><xsl:text>Beispiel WKT-Polygon einfügen:</xsl:text></a><br/> + <a href="javascript:copy_demo_wkt_polygon();"><xsl:value-of select="$example-polygon"/>:</a><br/> </xsl:when> </xsl:choose>