changeset 7591:fab06617afb2

issue1225 Add i18n for bedheight and use wst height system as unit
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 21 Nov 2013 15:33:42 +0100
parents a52b820c9006
children c2acc840963b
files artifacts/src/main/java/org/dive4elements/river/exports/process/BedHeightProcessor.java artifacts/src/main/resources/messages.properties artifacts/src/main/resources/messages_de.properties artifacts/src/main/resources/messages_de_DE.properties artifacts/src/main/resources/messages_en.properties
diffstat 5 files changed, 16 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/BedHeightProcessor.java	Wed Nov 20 11:06:17 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/BedHeightProcessor.java	Thu Nov 21 15:33:42 2013 +0100
@@ -15,6 +15,7 @@
 
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
 import org.dive4elements.artifacts.CallContext;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.minfo.BedHeightSingleData;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.exports.XYChartGenerator;
@@ -22,6 +23,7 @@
 import org.dive4elements.river.jfree.StyledXYSeries;
 import org.dive4elements.river.model.BedHeightSingleValue;
 import org.dive4elements.river.themes.ThemeDocument;
+import org.dive4elements.river.utils.RiverUtils;
 
 public class BedHeightProcessor extends DefaultProcessor {
 
@@ -94,8 +96,13 @@
 
     @Override
     public String getAxisLabel(DiagramGenerator generator) {
+        D4EArtifact flys = (D4EArtifact) generator.getMaster();
+
+        String unit = RiverUtils.getRiver(flys).getWstUnit().getName();
+
         return generator.msg(
                 I18N_AXIS_LABEL,
-                I18N_AXIS_LABEL_DEFAULT);
+                I18N_AXIS_LABEL_DEFAULT,
+                new Object[] { unit });
     }
 }
--- a/artifacts/src/main/resources/messages.properties	Wed Nov 20 11:06:17 2013 +0100
+++ b/artifacts/src/main/resources/messages.properties	Thu Nov 21 15:33:42 2013 +0100
@@ -224,6 +224,8 @@
 chart.bedheight_middle.section.yaxis.label=middle Bed Height [{0}]
 chart.bedheight_middle.sounding.yaxis.label=Sounding Width [m]
 
+chart.bedheight.height.yaxis.label=Bed Height [{0}]
+
 chart.flow_velocity.section.title=Geschwindigkeit- und Schubspannung
 chart.flow_velocity.section.yaxis.label=Speed v [m/s]
 chart.flow_velocity.section.yaxis.second.label=Bottom shear stress [N/m\u00b2]
--- a/artifacts/src/main/resources/messages_de.properties	Wed Nov 20 11:06:17 2013 +0100
+++ b/artifacts/src/main/resources/messages_de.properties	Thu Nov 21 15:33:42 2013 +0100
@@ -224,6 +224,8 @@
 chart.bedheight_middle.section.yaxis.label=mittlere Sohlh\u00f6hen [{0}]
 chart.bedheight_middle.sounding.yaxis.label=Gepeilte Breite [m]
 
+chart.bedheight.height.yaxis.label=Sohlh\u00f6he [{0}]
+
 chart.flow_velocity.section.title=Geschwindigkeit- und Schubspannung
 chart.flow_velocity.section.yaxis.label=Geschwindigkeit v [m/s]
 chart.flow_velocity.section.yaxis.second.label=Sohlschubspannung [N/m\u00b2]
--- a/artifacts/src/main/resources/messages_de_DE.properties	Wed Nov 20 11:06:17 2013 +0100
+++ b/artifacts/src/main/resources/messages_de_DE.properties	Thu Nov 21 15:33:42 2013 +0100
@@ -222,6 +222,8 @@
 chart.bedheight_middle.section.yaxis.label=mittlere Sohlh\u00f6hen [{0}]
 chart.bedheight_middle.sounding.yaxis.label=Gepeilte Breite [m]
 
+chart.bedheight.height.yaxis.label=Sohlh\u00f6he [{0}]
+
 chart.flow_velocity.section.title=Geschwindigkeit- und Schubspannung
 chart.flow_velocity.section.yaxis.label=Geschwindigkeit v [m/s]
 chart.flow_velocity.section.yaxis.second.label=Sohlschubspannung [N/m\u00b2]
--- a/artifacts/src/main/resources/messages_en.properties	Wed Nov 20 11:06:17 2013 +0100
+++ b/artifacts/src/main/resources/messages_en.properties	Thu Nov 21 15:33:42 2013 +0100
@@ -227,6 +227,8 @@
 chart.bedheight_middle.section.yaxis.label=middle Bed Height [{0}]
 chart.bedheight_middle.sounding.yaxis.label=Sounding Width [m]
 
+chart.bedheight.height.yaxis.label=Bed Height [{0}]
+
 chart.flow_velocity.section.title=Geschwindigkeit- und Schubspannung
 chart.flow_velocity.section.yaxis.label=Speed v [m/s]
 chart.flow_velocity.section.yaxis.second.label=Bottom shear stress [N/m\u00b2]

http://dive4elements.wald.intevation.org