Mercurial > dive4elements > river
changeset 4034:46c1210be26b
Set translated data descriptions
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Thu, 04 Oct 2012 16:26:48 +0200 |
parents | 936abc73463a |
children | 470a61d644cd |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/GaugeDischargeCurveArtifact.java |
diffstat | 2 files changed, 21 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Thu Oct 04 16:21:20 2012 +0200 +++ b/flys-artifacts/ChangeLog Thu Oct 04 16:26:48 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-04 Björn Ricks <bjoern.ricks@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/GaugeDischargeCurveArtifact.java: + Set translated data descriptions. + 2012-10-04 Björn Ricks <bjoern.ricks@intevation.de> * src/main/resources/messages.properties,
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/GaugeDischargeCurveArtifact.java Thu Oct 04 16:21:20 2012 +0200 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/GaugeDischargeCurveArtifact.java Thu Oct 04 16:26:48 2012 +0200 @@ -9,6 +9,7 @@ import de.intevation.artifactdatabase.state.DefaultOutput; import de.intevation.artifactdatabase.state.Facet; +import de.intevation.artifactdatabase.data.DefaultStateData; import de.intevation.artifacts.ArtifactFactory; import de.intevation.artifacts.CallMeta; @@ -63,16 +64,28 @@ String rivername = XMLUtils.xpathString(data, XPATH_RIVER, ArtifactNamespaceContext.INSTANCE); - addStringData("river", rivername); - addStringData("reference_gauge", gaugeref); + addData("river", new DefaultStateData("river", + Resources.getMsg(callmeta, + "facet.gauge_discharge_curve.river", + "Name of the river"), + "String", rivername)); + addData("reference_gauge", new DefaultStateData("reference_gauge", + Resources.getMsg(callmeta, + "facet.gauge_discharge_curve.reference_gauge", + "Gauge official number"), + "Double", gaugeref)); Gauge gauge = FLYSUtils.getReferenceGauge(this); + String gaugename = ""; + if (gauge != null) { + gaugename = gauge.getName(); + } String description = Resources.format(callmeta, "facet.gauge_discharge_curve.description", "Discharge curve on gauge", rivername, - gauge.getName()); + gaugename); Facet gfacet = new GaugeDischargeCurveFacet(description);