[PATCH 1 of 4] issue1225 Add i18n for bedheight and use wst height system as unit

Wald Commits scm-commit at wald.intevation.org
Thu Nov 21 15:40:09 CET 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1385044422 -3600
# Node ID fab06617afb2276d8791a816d019e66e15aec03f
# Parent  a52b820c9006c05d325f275ec93662efec7130d7
issue1225 Add i18n for bedheight and use wst height system as unit

diff -r a52b820c9006 -r fab06617afb2 artifacts/src/main/java/org/dive4elements/river/exports/process/BedHeightProcessor.java
--- 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 });
     }
 }
diff -r a52b820c9006 -r fab06617afb2 artifacts/src/main/resources/messages.properties
--- 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]
diff -r a52b820c9006 -r fab06617afb2 artifacts/src/main/resources/messages_de.properties
--- 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]
diff -r a52b820c9006 -r fab06617afb2 artifacts/src/main/resources/messages_de_DE.properties
--- 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]
diff -r a52b820c9006 -r fab06617afb2 artifacts/src/main/resources/messages_en.properties
--- 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]


More information about the Dive4elements-commits mailing list