# HG changeset patch # User Felix Wolfsteller # Date 1344601839 0 # Node ID 6442f317a0c79418bd644a954d5cf69908967ddd # Parent e9c3285f2ee2011b753bfe92d7f753b8392fb1e0 i18n and renderering of qsectors in w/q diag. flys-artifacts/trunk@5191 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r e9c3285f2ee2 -r 6442f317a0c7 flys-artifacts/ChangeLog --- 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 + + * 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 * src/main/java/de/intevation/flys/artifacts/states/QSectorSingleState.java: diff -r e9c3285f2ee2 -r 6442f317a0c7 flys-artifacts/src/main/java/de/intevation/flys/artifacts/QSectorArtifact.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 qsectors = new ArrayList(); @@ -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))); } diff -r e9c3285f2ee2 -r 6442f317a0c7 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/QSectorFacet.java --- 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); } diff -r e9c3285f2ee2 -r 6442f317a0c7 flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/QSectorSingleState.java --- 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); diff -r e9c3285f2ee2 -r 6442f317a0c7 flys-artifacts/src/main/resources/messages.properties --- 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} diff -r e9c3285f2ee2 -r 6442f317a0c7 flys-artifacts/src/main/resources/messages_de.properties --- 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} diff -r e9c3285f2ee2 -r 6442f317a0c7 flys-artifacts/src/main/resources/messages_de_DE.properties --- 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} diff -r e9c3285f2ee2 -r 6442f317a0c7 flys-artifacts/src/main/resources/messages_en.properties --- 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}