Mercurial > dive4elements > river
changeset 2263:bdd032bfd978
Minor i18n for reference curve chart added.
flys-artifacts/trunk@3919 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 06 Feb 2012 13:04:52 +0000 |
parents | 07d6b386ca76 |
children | d974e4589f5a |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/ReferenceCurveGenerator.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 | 6 files changed, 42 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- 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 <felix.wolfsteller@intevation.de> + + * 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 <ingo@intevation.de> * doc/conf/conf.xml: Registered the HistoricalDischargeCurveInfoGenerator.
--- 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;
--- 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
--- 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
--- 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
--- 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