Mercurial > dive4elements > river
changeset 3576:6442f317a0c7
i18n and renderering of qsectors in w/q diag.
flys-artifacts/trunk@5191 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 10 Aug 2012 12:30:39 +0000 (2012-08-10) |
parents | e9c3285f2ee2 |
children | 25cce741d03c |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/QSectorArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/QSectorFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/QSectorSingleState.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 | 8 files changed, 27 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Fri Aug 10 11:33:48 2012 +0000 +++ b/flys-artifacts/ChangeLog Fri Aug 10 12:30:39 2012 +0000 @@ -1,3 +1,19 @@ +2012-08-10 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/model/QSectorFacet.java, + src/main/java/de/intevation/flys/artifacts/states/QSectorSingleState.java, + src/main/java/de/intevation/flys/artifacts/QSectorArtifact.java: + Wording and i18n of qsectors. + + * src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java: + Add Markers to plot for qsectors. + + * src/main/resources/messages.properties, + src/main/resources/messages_de_DE.properties, + src/main/resources/messages_en.properties, + src/main/resources/messages_de.properties: + i18n for qsectors. + 2012-08-10 Felix Wolfsteller <felix.wolfsteller@intevation.de> * src/main/java/de/intevation/flys/artifacts/states/QSectorSingleState.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/QSectorArtifact.java Fri Aug 10 11:33:48 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/QSectorArtifact.java Fri Aug 10 12:30:39 2012 +0000 @@ -12,6 +12,7 @@ import de.intevation.artifacts.Artifact; import de.intevation.artifacts.ArtifactFactory; import de.intevation.artifacts.CallMeta; +import de.intevation.artifacts.CallContext; import de.intevation.flys.artifacts.model.FacetTypes; import de.intevation.flys.artifacts.model.GaugeFinder; @@ -23,6 +24,7 @@ import de.intevation.flys.artifacts.states.DefaultState; +import de.intevation.flys.artifacts.resources.Resources; /** @@ -71,7 +73,7 @@ /** Get list of NamedDouble s (QSectors). */ - public Object getQSectors(double km) { + public Object getQSectors(double km, CallContext context) { String river = getDataAsString("river"); List<NamedDouble> qsectors = new ArrayList<NamedDouble>(); @@ -98,7 +100,7 @@ for (int i = 0; i < FixingsKMChartService.I18N_Q_SECTOR_BOARDERS.length; ++i) { String key = FixingsKMChartService.I18N_Q_SECTOR_BOARDERS[i]; String def = FixingsKMChartService.DEFAULT_Q_SECTOR_BORDERS[i]; - String label = "label";//Resources.getMsg(meta, key, def); + String label = Resources.getMsg(context.getMeta(), key, def); qsectors.add(new NamedDouble(label, gr.getSectorBorder(i))); }
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/QSectorFacet.java Fri Aug 10 11:33:48 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/QSectorFacet.java Fri Aug 10 12:30:39 2012 +0000 @@ -51,7 +51,7 @@ QSectorArtifact qsectorArtifact = (QSectorArtifact) artifact; double currentKm = ((Double)context.getContextValue("currentKm")).doubleValue(); - return qsectorArtifact.getQSectors(currentKm); + return qsectorArtifact.getQSectors(currentKm, context); }
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/QSectorSingleState.java Fri Aug 10 11:33:48 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/QSectorSingleState.java Fri Aug 10 12:30:39 2012 +0000 @@ -54,8 +54,8 @@ QSectorFacet qfacet = new QSectorFacet( 0, - "qsectors", //FacetTypes - "qsectors"); + QSECTOR, + Resources.getMsg(meta, "qsectors", "Q Sectors")); facets.add(qfacet);
--- a/flys-artifacts/src/main/resources/messages.properties Fri Aug 10 11:33:48 2012 +0000 +++ b/flys-artifacts/src/main/resources/messages.properties Fri Aug 10 12:30:39 2012 +0000 @@ -352,6 +352,7 @@ fix.vollmer.wq.curve=W/Q fix.vollmer.wq.outliers=Outliers fix.vollmer.wq.events=Events +qsectors=Discharge Sectors chart.fix.deltawt.title=Difference from compensating curve at kilometer {0} chart.fix.deltawt.subtitle=Water: {0}; Period: {1,date,short} to {2,date,short}; Reference period: {3,date,short} bis {4,date,short}
--- a/flys-artifacts/src/main/resources/messages_de.properties Fri Aug 10 11:33:48 2012 +0000 +++ b/flys-artifacts/src/main/resources/messages_de.properties Fri Aug 10 12:30:39 2012 +0000 @@ -354,6 +354,7 @@ fix.vollmer.wq.curve=W/Q fix.vollmer.wq.outliers=Ausrei\u00dfer fix.vollmer.wq.events=Ereignisse +qsectors=Abfluss-Sektoren chart.fix.deltawt.title=Abweichungen von der Ausgleichskurve an Kilometer {0} chart.fix.deltawt.subtitle=Gew\u00e4sser: {0}; Darstellungszeitraum: {1,date,short} bis {2,date,short}; Bezugszeitraum: {3,date,short} bis {4,date,short}
--- a/flys-artifacts/src/main/resources/messages_de_DE.properties Fri Aug 10 11:33:48 2012 +0000 +++ b/flys-artifacts/src/main/resources/messages_de_DE.properties Fri Aug 10 12:30:39 2012 +0000 @@ -351,6 +351,7 @@ fix.vollmer.wq.curve=W/Q fix.vollmer.wq.outliers=Ausrei\u00dfer fix.vollmer.wq.events=Ereignisse +qsectors=Abfluss-Sektoren chart.fix.deltawt.title=Abweichungen von der Ausgleichskurve an Kilometer {0} chart.fix.deltawt.subtitle=Gew\u00e4sser: {0}; Darstellungszeitraum: {1,date,short} bis {2,date,short}; Bezugszeitraum: {3,date,short} bis {4,date,short}
--- a/flys-artifacts/src/main/resources/messages_en.properties Fri Aug 10 11:33:48 2012 +0000 +++ b/flys-artifacts/src/main/resources/messages_en.properties Fri Aug 10 12:30:39 2012 +0000 @@ -355,6 +355,7 @@ fix.vollmer.wq.curve=W/Q fix.vollmer.wq.outliers=Outliers fix.vollmer.wq.events=Events +qsectors=Discharge Sectors chart.fix.deltawt.title=Difference from compensating curve at kilometer {0} chart.fix.deltawt.subtitle=Water: {0}; Period: {1,date,short} to {2,date,short}; Reference period: {3,date,short} bis {4,date,short}