Mercurial > dive4elements > river
changeset 7397:8ba53c5b86a7
issue1512: improved i18n for flow velocity measurement facets.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 18 Oct 2013 12:20:55 +0200 |
parents | a94b6e057daa |
children | 5b8089bf0f27 |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityMeasurementArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightData.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightEpochData.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightSingleData.java artifacts/src/main/resources/messages.properties artifacts/src/main/resources/messages_de.properties artifacts/src/main/resources/messages_de_DE.properties artifacts/src/main/resources/messages_en.properties |
diffstat | 5 files changed, 20 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityMeasurementArtifact.java Thu Oct 17 16:15:14 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityMeasurementArtifact.java Fri Oct 18 12:20:55 2013 +0200 @@ -28,9 +28,12 @@ import org.dive4elements.river.artifacts.model.minfo.FlowVelocityMeasurementFacet; import org.dive4elements.river.artifacts.model.minfo.FlowVelocityMeasurementFactory; import org.dive4elements.river.artifacts.states.StaticState; +import org.dive4elements.river.artifacts.states.FlowVelocityState; import org.dive4elements.river.artifacts.model.FacetTypes; +import org.dive4elements.river.artifacts.resources.Resources; + import org.dive4elements.river.utils.Formatter; @@ -46,6 +49,12 @@ /** Artifact key name. */ private static final String NAME = "flowvelocitymeasurement"; + public static final String I18N_WATERLEVEL_FACET = + "facet.flow_velocity.waterlevel"; + + public static final String I18N_VELOCITY_FACET = + "facet.flow_velocity.velocity"; + /** Spawn only inactive facets. */ static { // TODO: Move to configuration. @@ -130,20 +139,19 @@ name += " - " + dateFormatter.format( flowVelocityMeasurement.getDatetime()); - // TODO naming/ i18N Facet vFacet = new FlowVelocityMeasurementFacet( FLOW_VELOCITY_MEASUREMENT, - "v " + name); + Resources.getMsg(callMeta, I18N_WATERLEVEL_FACET, FlowVelocityState.I18N_TAU_FACET, new Object[] { name})); fs.add(vFacet); Facet qFacet = new FlowVelocityMeasurementFacet( FLOW_VELOCITY_DISCHARGE, - "q " + name); + Resources.getMsg(callMeta, FlowVelocityState.I18N_DISCHARGE_FACET, FlowVelocityState.I18N_DISCHARGE_FACET, new Object[] { name})); fs.add(qFacet); Facet wFacet = new FlowVelocityMeasurementFacet( FLOW_VELOCITY_WATERLEVEL, - "w " + name); + Resources.getMsg(callMeta, I18N_VELOCITY_FACET, FlowVelocityState.I18N_TAU_FACET, new Object[] { name})); fs.add(wFacet); addFacets(state.getID(), fs);
--- a/artifacts/src/main/resources/messages.properties Thu Oct 17 16:15:14 2013 +0200 +++ b/artifacts/src/main/resources/messages.properties Fri Oct 18 12:20:55 2013 +0200 @@ -283,6 +283,8 @@ facet.flow_velocity.totalchannel.raw = v Totalchannel at {0} (raw) facet.flow_velocity.tauchannel.raw = TAU Mainchannel at {0} (raw) facet.flow_velocity.discharge = Discharge at {0} +facet.flow_velocity.waterlevel = Waterlevel {0} +facet.flow_velocity.velocity = V {0} facet.bedheight_middle.single = Bed Height {0,number,####} facet.bedheight_middle.epoch = Bed Height Epoch {0,number,####} - {1,number,####} facet.bedquality.bed.porosity.toplayer = Porosity ({0,date} - {1,date}) ({2})
--- a/artifacts/src/main/resources/messages_de.properties Thu Oct 17 16:15:14 2013 +0200 +++ b/artifacts/src/main/resources/messages_de.properties Fri Oct 18 12:20:55 2013 +0200 @@ -283,6 +283,8 @@ facet.flow_velocity.mainchannel.raw = v Hauptgerinne bei {0} (Rohdaten) facet.flow_velocity.totalchannel.raw = v Gesamtgerinne bei {0} (Rohdaten) facet.flow_velocity.tauchannel.raw = TAU Hauptgerinne bei {0} (Rohdaten) +facet.flow_velocity.velocity = V ({0} +facet.flow_velocity.waterlevel = W ({0}) facet.bedheight_middle.single = Sohlh\u00f6he {0,number,####} facet.bedheight_middle.epoch = Sohlh\u00f6he Epoche {0,number,####} - {1,number,####} facet.bedquality.bed.porosity.toplayer = Porosit\u00e4t ({0,date} - {1,date}) ({2})
--- a/artifacts/src/main/resources/messages_de_DE.properties Thu Oct 17 16:15:14 2013 +0200 +++ b/artifacts/src/main/resources/messages_de_DE.properties Fri Oct 18 12:20:55 2013 +0200 @@ -281,6 +281,8 @@ facet.flow_velocity.totalchannel.raw = v Gesamtgerinne bei {0} (Rohdaten) facet.flow_velocity.tauchannel.raw = TAU Hauptgerinne bei {0} (Rohdaten) facet.flow_velocity.discharge = Abfluss bei {0} +facet.flow_velocity.velocity = V ({0} +facet.flow_velocity.waterlevel = W ({0}) facet.bedheight_middle.single = Sohlh\u00f6he {0,number,####} facet.bedheight_middle.epoch = Sohlh\u00f6he Epoche {0,number,####} - {1,number,####} facet.bedquality.bed.porosity.toplayer = Porosit\u00e4t ({0,date} - {1,date}) ({2})
--- a/artifacts/src/main/resources/messages_en.properties Thu Oct 17 16:15:14 2013 +0200 +++ b/artifacts/src/main/resources/messages_en.properties Fri Oct 18 12:20:55 2013 +0200 @@ -287,6 +287,8 @@ facet.flow_velocity.mainchannel.raw = v Mainchannel at {0} (raw) facet.flow_velocity.totalchannel.raw = v Totalchannel at {0} (raw) facet.flow_velocity.tauchannel.raw = TAU Mainchannel at {0} (raw) +facet.flow_velocity.velocity = V {0} +facet.flow_velocity.waterlevel = Waterlevel {0} facet.bedheight_middle.single = Bed Height {0,number,####} facet.bedheight_middle.epoch = Bed Height Epoch {0,number,####} - {1,number,####} facet.bedquality.bed.porosity.toplayer = Porosity ({0,date} - {1,date}) ({2})