changeset 3115:5482a8a48a3f

I18N of SQ relation charts. flys-artifacts/trunk@4715 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 20 Jun 2012 07:49:36 +0000
parents 6c91e05a5f51
children 2feed9b50047
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/conf.xml flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGeneratorA.java flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGeneratorB.java flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGeneratorC.java flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGeneratorD.java flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGeneratorE.java flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGeneratorF.java flys-artifacts/src/main/resources/messages.properties flys-artifacts/src/main/resources/messages_de.properties flys-artifacts/src/main/resources/messages_de_DE.properties flys-artifacts/src/main/resources/messages_en.properties
diffstat 13 files changed, 160 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Tue Jun 19 21:51:11 2012 +0000
+++ b/flys-artifacts/ChangeLog	Wed Jun 20 07:49:36 2012 +0000
@@ -1,3 +1,26 @@
+2012-06-20  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/exports/sq/SQRelationGeneratorA.java,
+	  src/main/java/de/intevation/flys/exports/sq/SQRelationGeneratorB.java,
+	  src/main/java/de/intevation/flys/exports/sq/SQRelationGeneratorC.java,
+	  src/main/java/de/intevation/flys/exports/sq/SQRelationGeneratorD.java,
+	  src/main/java/de/intevation/flys/exports/sq/SQRelationGeneratorE.java,
+	  src/main/java/de/intevation/flys/exports/sq/SQRelationGeneratorF.java:
+	  New concrete chart generators. Each fraction of the SQ relation
+	  calculation has its own generator now. This is because they all have
+	  different chart titles and labels.
+
+	* doc/conf/conf.xml: Let SQ relation charts use more concrete generators.
+
+	* src/main/java/de/intevation/flys/exports/sq/SQRelationGenerator.java:
+	  Implemented getDefaultXAxisLabel() getDefaultYAxisLabel().
+
+	* src/main/resources/messages.properties,
+	  src/main/resources/messages_de_DE.properties,
+	  src/main/resources/messages_en.properties,
+	  src/main/resources/messages_de.properties: Added i18n strings for chart
+	  titles and axes labels.
+
 2012-06-19	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	Fix issue681 (wrong vertical lines in duration curve q-mainvalues on
--- a/flys-artifacts/doc/conf/conf.xml	Tue Jun 19 21:51:11 2012 +0000
+++ b/flys-artifacts/doc/conf/conf.xml	Wed Jun 20 07:49:36 2012 +0000
@@ -251,12 +251,12 @@
         <output-generator name="bedheight_middle">de.intevation.flys.exports.MiddleBedHeightGenerator</output-generator>
         <output-generator name="bedheight_middle_chartinfo">de.intevation.flys.exports.MiddleBedHeightInfoGenerator</output-generator>
         <output-generator name="bedheight_middle_export">de.intevation.flys.exports.MiddleBedHeightExporter</output-generator>
-        <output-generator name="sq_relation_a">de.intevation.flys.exports.sq.SQRelationGenerator</output-generator>
-        <output-generator name="sq_relation_b">de.intevation.flys.exports.sq.SQRelationGenerator</output-generator>
-        <output-generator name="sq_relation_c">de.intevation.flys.exports.sq.SQRelationGenerator</output-generator>
-        <output-generator name="sq_relation_d">de.intevation.flys.exports.sq.SQRelationGenerator</output-generator>
-        <output-generator name="sq_relation_e">de.intevation.flys.exports.sq.SQRelationGenerator</output-generator>
-        <output-generator name="sq_relation_f">de.intevation.flys.exports.sq.SQRelationGenerator</output-generator>
+        <output-generator name="sq_relation_a">de.intevation.flys.exports.sq.SQRelationGeneratorA</output-generator>
+        <output-generator name="sq_relation_b">de.intevation.flys.exports.sq.SQRelationGeneratorB</output-generator>
+        <output-generator name="sq_relation_c">de.intevation.flys.exports.sq.SQRelationGeneratorC</output-generator>
+        <output-generator name="sq_relation_d">de.intevation.flys.exports.sq.SQRelationGeneratorD</output-generator>
+        <output-generator name="sq_relation_e">de.intevation.flys.exports.sq.SQRelationGeneratorE</output-generator>
+        <output-generator name="sq_relation_f">de.intevation.flys.exports.sq.SQRelationGeneratorF</output-generator>
         <output-generator name="sq_relation_a_chartinfo">de.intevation.flys.exports.sq.SQRelationInfoGenerator</output-generator>
         <output-generator name="sq_relation_b_chartinfo">de.intevation.flys.exports.sq.SQRelationInfoGenerator</output-generator>
         <output-generator name="sq_relation_c_chartinfo">de.intevation.flys.exports.sq.SQRelationInfoGenerator</output-generator>
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGenerator.java	Tue Jun 19 21:51:11 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGenerator.java	Wed Jun 20 07:49:36 2012 +0000
@@ -39,6 +39,14 @@
         }
     }
 
+
+    public static final String I18N_XAXIS_LABEL =
+        "chart.sq_relation.xaxis.label";
+
+    public static final String I18N_YAXIS_LABEL =
+        "chart.sq_relation.yaxis.label";
+
+
     /** The logger that is used in this generator. */
     private static Logger logger = Logger.getLogger(SQRelationGenerator.class);
 
@@ -68,13 +76,13 @@
 
     @Override
     protected String getDefaultXAxisLabel() {
-        return "TODO: XAXIS LABEL";
+        return msg(I18N_XAXIS_LABEL, I18N_XAXIS_LABEL);
     }
 
 
     @Override
     protected String getDefaultYAxisLabel(int index) {
-        return "TODO: YAXIS LABEL " + index;
+        return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL);
     }
 
 
@@ -86,7 +94,7 @@
 
     @Override
     protected NumberAxis createYAxis(int index) {
-        return new LogarithmicAxis("TODO: LABEL " + index);
+        return new LogarithmicAxis(getDefaultYAxisLabel(index));
     }
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGeneratorA.java	Wed Jun 20 07:49:36 2012 +0000
@@ -0,0 +1,14 @@
+package de.intevation.flys.exports.sq;
+
+
+public class SQRelationGeneratorA extends SQRelationGenerator {
+
+    public static final String I18N_CHART_TITLE =
+        "chart.sq_relation_a.title";
+
+
+    @Override
+    public String getDefaultChartTitle() {
+        return msg(I18N_CHART_TITLE, I18N_CHART_TITLE);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGeneratorB.java	Wed Jun 20 07:49:36 2012 +0000
@@ -0,0 +1,14 @@
+package de.intevation.flys.exports.sq;
+
+
+public class SQRelationGeneratorB extends SQRelationGenerator {
+
+    public static final String I18N_CHART_TITLE =
+        "chart.sq_relation_b.title";
+
+
+    @Override
+    public String getDefaultChartTitle() {
+        return msg(I18N_CHART_TITLE, I18N_CHART_TITLE);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGeneratorC.java	Wed Jun 20 07:49:36 2012 +0000
@@ -0,0 +1,14 @@
+package de.intevation.flys.exports.sq;
+
+
+public class SQRelationGeneratorC extends SQRelationGenerator {
+
+    public static final String I18N_CHART_TITLE =
+        "chart.sq_relation_c.title";
+
+
+    @Override
+    public String getDefaultChartTitle() {
+        return msg(I18N_CHART_TITLE, I18N_CHART_TITLE);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGeneratorD.java	Wed Jun 20 07:49:36 2012 +0000
@@ -0,0 +1,14 @@
+package de.intevation.flys.exports.sq;
+
+
+public class SQRelationGeneratorD extends SQRelationGenerator {
+
+    public static final String I18N_CHART_TITLE =
+        "chart.sq_relation_d.title";
+
+
+    @Override
+    public String getDefaultChartTitle() {
+        return msg(I18N_CHART_TITLE, I18N_CHART_TITLE);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGeneratorE.java	Wed Jun 20 07:49:36 2012 +0000
@@ -0,0 +1,14 @@
+package de.intevation.flys.exports.sq;
+
+
+public class SQRelationGeneratorE extends SQRelationGenerator {
+
+    public static final String I18N_CHART_TITLE =
+        "chart.sq_relation_e.title";
+
+
+    @Override
+    public String getDefaultChartTitle() {
+        return msg(I18N_CHART_TITLE, I18N_CHART_TITLE);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGeneratorF.java	Wed Jun 20 07:49:36 2012 +0000
@@ -0,0 +1,14 @@
+package de.intevation.flys.exports.sq;
+
+
+public class SQRelationGeneratorF extends SQRelationGenerator {
+
+    public static final String I18N_CHART_TITLE =
+        "chart.sq_relation_f.title";
+
+
+    @Override
+    public String getDefaultChartTitle() {
+        return msg(I18N_CHART_TITLE, I18N_CHART_TITLE);
+    }
+}
--- a/flys-artifacts/src/main/resources/messages.properties	Tue Jun 19 21:51:11 2012 +0000
+++ b/flys-artifacts/src/main/resources/messages.properties	Wed Jun 20 07:49:36 2012 +0000
@@ -139,6 +139,15 @@
 
 chart.normalized.reference.curve.title = Reduced Reference Curve
 
+chart.sq_relation.xaxis.label = Discharge [m\u00b3/s]
+chart.sq_relation.yaxis.label = Transport [kg/s]
+chart.sq_relation_a.title = Feinkornanteil
+chart.sq_relation_b.title = Sand (Suspensionstransport)
+chart.sq_relation_c.title = Sand (Geschiebetransport)
+chart.sq_relation_d.title = Fein- und Mittelkies
+chart.sq_relation_e.title = Grobkornanteil (> Mittelkies)
+chart.sq_relation_f.title = Geschiebetransport gesamt
+
 facet.longitudinal_section.annotations = POIs
 facet.discharge_curves.mainvalues.q = Q (main values)
 facet.discharge_curves.mainvalues.w = W (main values)
--- a/flys-artifacts/src/main/resources/messages_de.properties	Tue Jun 19 21:51:11 2012 +0000
+++ b/flys-artifacts/src/main/resources/messages_de.properties	Wed Jun 20 07:49:36 2012 +0000
@@ -138,6 +138,15 @@
 chart.w_differences.yaxis.label = m
 chart.w_differences.yaxis.second.label = W [NN + m]
 
+chart.sq_relation.xaxis.label = Abfluss [m\u00b3/s]
+chart.sq_relation.yaxis.label = Transport [kg/s]
+chart.sq_relation_a.title = Feinkornanteil
+chart.sq_relation_b.title = Sand (Suspensionstransport)
+chart.sq_relation_c.title = Sand (Geschiebetransport)
+chart.sq_relation_d.title = Fein- und Mittelkies
+chart.sq_relation_e.title = Grobkornanteil (> Mittelkies)
+chart.sq_relation_f.title = Geschiebetransport gesamt
+
 facet.longitudinal_section.annotations = Streckenfavoriten
 facet.discharge_curves.mainvalues.q = Q (Haupt- und Extremwerte)
 facet.discharge_curves.mainvalues.w = W (Haupt- und Extremwerte)
--- a/flys-artifacts/src/main/resources/messages_de_DE.properties	Tue Jun 19 21:51:11 2012 +0000
+++ b/flys-artifacts/src/main/resources/messages_de_DE.properties	Wed Jun 20 07:49:36 2012 +0000
@@ -136,6 +136,15 @@
 chart.w_differences.yaxis.label = m
 chart.w_differences.yaxis.second.label = W [NN + m]
 
+chart.sq_relation.xaxis.label = Abfluss [m\u00b3/s]
+chart.sq_relation.yaxis.label = Transport [kg/s]
+chart.sq_relation_a.title = Feinkornanteil
+chart.sq_relation_b.title = Sand (Suspensionstransport)
+chart.sq_relation_c.title = Sand (Geschiebetransport)
+chart.sq_relation_d.title = Fein- und Mittelkies
+chart.sq_relation_e.title = Grobkornanteil (> Mittelkies)
+chart.sq_relation_f.title = Geschiebetransport gesamt
+
 facet.longitudinal_section.annotations = Streckenfavoriten
 facet.discharge_curves.mainvalues.q = Q (Haupt- und Extremwerte)
 facet.discharge_curves.mainvalues.w = W (Haupt- und Extremwerte)
--- a/flys-artifacts/src/main/resources/messages_en.properties	Tue Jun 19 21:51:11 2012 +0000
+++ b/flys-artifacts/src/main/resources/messages_en.properties	Wed Jun 20 07:49:36 2012 +0000
@@ -138,6 +138,15 @@
 chart.w_differences.yaxis.label = m
 chart.w_differences.yaxis.second.label = W [NN + m]
 
+chart.sq_relation.xaxis.label = Discharge [m\u00b3/s]
+chart.sq_relation.yaxis.label = Transport [kg/s]
+chart.sq_relation_a.title = Feinkornanteil
+chart.sq_relation_b.title = Sand (Suspensionstransport)
+chart.sq_relation_c.title = Sand (Geschiebetransport)
+chart.sq_relation_d.title = Fein- und Mittelkies
+chart.sq_relation_e.title = Grobkornanteil (> Mittelkies)
+chart.sq_relation_f.title = Geschiebetransport gesamt
+
 facet.longitudinal_section.annotations = POIs
 facet.discharge_curves.mainvalues.q = Q (main values)
 facet.discharge_curves.mainvalues.w = W (main values)

http://dive4elements.wald.intevation.org