# HG changeset patch # User Felix Wolfsteller # Date 1328533492 0 # Node ID bdd032bfd9785b1b0056a0ac9c1755cb665b920b # Parent 07d6b386ca76c44f2ff05f3426348819d49ea15f Minor i18n for reference curve chart added. flys-artifacts/trunk@3919 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 07d6b386ca76 -r bdd032bfd978 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Mon Feb 06 11:14:57 2012 +0000 +++ b/flys-artifacts/ChangeLog Mon Feb 06 13:04:52 2012 +0000 @@ -1,3 +1,14 @@ +2012-02-06 Felix Wolfsteller + + * src/main/java/de/intevation/flys/exports/ReferenceCurveGenerator.java: + Enabled some i18n of labels. + + * src/main/resources/messages.properties, + src/main/resources/messages_de_DE.properties, + src/main/resources/messages_en.properties, + src/main/resources/messages_de.properties: Basic i18n for reference + curves added. + 2012-02-06 Ingo Weinzierl * doc/conf/conf.xml: Registered the HistoricalDischargeCurveInfoGenerator. diff -r 07d6b386ca76 -r bdd032bfd978 flys-artifacts/src/main/java/de/intevation/flys/exports/ReferenceCurveGenerator.java --- a/flys-artifacts/src/main/java/de/intevation/flys/exports/ReferenceCurveGenerator.java Mon Feb 06 11:14:57 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/ReferenceCurveGenerator.java Mon Feb 06 13:04:52 2012 +0000 @@ -1,25 +1,25 @@ package de.intevation.flys.exports; -import de.intevation.artifactdatabase.state.ArtifactAndFacet; - -import de.intevation.flys.artifacts.model.FacetTypes; - -import de.intevation.flys.artifacts.model.WW.ApplyFunctionIterator; - -import de.intevation.flys.artifacts.model.WW; -import de.intevation.flys.artifacts.model.WWAxisTypes; - -import de.intevation.flys.jfree.StyledXYSeries; +import org.w3c.dom.Document; import java.awt.Font; import org.apache.log4j.Logger; +import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.NumberAxis; +import org.jfree.chart.title.TextTitle; import org.jfree.data.xy.XYSeries; -import org.w3c.dom.Document; +import de.intevation.artifactdatabase.state.ArtifactAndFacet; + +import de.intevation.flys.artifacts.model.FacetTypes; +import de.intevation.flys.artifacts.model.WW; +import de.intevation.flys.artifacts.model.WW.ApplyFunctionIterator; +import de.intevation.flys.artifacts.model.WWAxisTypes; + +import de.intevation.flys.jfree.StyledXYSeries; /** @@ -40,22 +40,23 @@ private static Logger logger = Logger.getLogger(ReferenceCurveGenerator.class); - /* public static final String I18N_CHART_TITLE = "chart.reference.curve.title"; public static final String I18N_CHART_SUBTITLE = "chart.reference.curve.subtitle"; + /* + public static final String I18N_XAXIS_LABEL = "chart.reference.curve.xaxis.label"; public static final String I18N_YAXIS_LABEL = "chart.reference.curve.yaxis.label"; - +*/ public static final String I18N_CHART_TITLE_DEFAULT = "Bezugslinie"; - +/* public static final String I18N_XAXIS_LABEL_DEFAULT = "W [NN+m]"; @@ -85,22 +86,17 @@ return axis; } + /** Get default chart title. */ @Override protected String getDefaultChartTitle() { - // TODO i18n return msg(I18N_CHART_TITLE, I18N_CHART_TITLE_DEFAULT); - return "Bezugslinien"; + return msg(I18N_CHART_TITLE, I18N_CHART_TITLE_DEFAULT); } - /* - // TODO i18n @Override protected String getDefaultChartSubtitle() { - double[] dist = getRange(); - Object[] args = new Object[] { getRiverName(), - dist[0] }; return msg(I18N_CHART_SUBTITLE, "", args); @@ -115,14 +111,13 @@ chart.addSubtitle(new TextTitle(subtitle)); } } - */ /** Get Label for X-axis (W). */ @Override protected String getDefaultXAxisLabel() { // TODO i18nreturn msg(I18N_XAXIS_LABEL, I18N_XAXIS_LABEL_DEFAULT); - return "W!"; + return "W am Bezugsort- oder Pegel."; } @@ -136,7 +131,7 @@ if (index == YAXIS.W.idx) { //label = msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); //TODO i18n - return "W over W over W"; + return "W am Zielort oder -pegel"; } return label; diff -r 07d6b386ca76 -r bdd032bfd978 flys-artifacts/src/main/resources/messages.properties --- a/flys-artifacts/src/main/resources/messages.properties Mon Feb 06 11:14:57 2012 +0000 +++ b/flys-artifacts/src/main/resources/messages.properties Mon Feb 06 13:04:52 2012 +0000 @@ -87,6 +87,9 @@ chart.historical.discharge.yaxis.label = Q [m\u00b3/s] chart.historical.discharge.yaxis.second.label = W [cm] +chart.reference.curve.title = Reference Curve +chart.reference.curve.subtitle = {0} + chart.w_differences.title = Differences chart.w_differences.subtitle = Range: {0}-km {1,number,#.###} - {2,number,#.###} chart.w_differences.yaxis.label = m diff -r 07d6b386ca76 -r bdd032bfd978 flys-artifacts/src/main/resources/messages_de.properties --- a/flys-artifacts/src/main/resources/messages_de.properties Mon Feb 06 11:14:57 2012 +0000 +++ b/flys-artifacts/src/main/resources/messages_de.properties Mon Feb 06 13:04:52 2012 +0000 @@ -87,6 +87,9 @@ chart.historical.discharge.yaxis.label = Q [m\u00b3/s] chart.historical.discharge.yaxis.second.label = W [cm] +chart.reference.curve.title = Bezugslinie +chart.reference.curve.subtitle = {0} + chart.w_differences.title = Differenzen chart.w_differences.subtitle = Range: {0}-km {1,number,#.###} - {2,number,#.###} chart.w_differences.yaxis.label = m diff -r 07d6b386ca76 -r bdd032bfd978 flys-artifacts/src/main/resources/messages_de_DE.properties --- a/flys-artifacts/src/main/resources/messages_de_DE.properties Mon Feb 06 11:14:57 2012 +0000 +++ b/flys-artifacts/src/main/resources/messages_de_DE.properties Mon Feb 06 13:04:52 2012 +0000 @@ -87,6 +87,9 @@ chart.historical.discharge.yaxis.label = Q [m\u00b3/s] chart.historical.discharge.yaxis.second.label = W [cm] +chart.reference.curve.title = Bezugslinie +chart.reference.curve.subtitle = {0} + chart.w_differences.title = Differenzen chart.w_differences.subtitle = Range: {0}-km {1,number,#.###} - {2,number,#.###} chart.w_differences.yaxis.label = m diff -r 07d6b386ca76 -r bdd032bfd978 flys-artifacts/src/main/resources/messages_en.properties --- a/flys-artifacts/src/main/resources/messages_en.properties Mon Feb 06 11:14:57 2012 +0000 +++ b/flys-artifacts/src/main/resources/messages_en.properties Mon Feb 06 13:04:52 2012 +0000 @@ -85,6 +85,9 @@ chart.historical.discharge.yaxis.label = Q [m\u00b3/s] chart.historical.discharge.yaxis.second.label = W [cm] +chart.reference.curve.title = Reference Curve +chart.reference.curve.subtitle = {0} + chart.w_differences.title = Differences chart.w_differences.subtitle = Range: {0}-km {1,number,#.###} - {2,number,#.###} chart.w_differences.yaxis.label = m