Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityMeasurementArtifact.java @ 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 | ea5da3e140ef |
children | 20b1cfa1e005 |
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);