Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityModelArtifact.java @ 7534:00950f79b0d9
issue1512: i18n.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 07 Nov 2013 11:10:58 +0100 |
parents | 9eef5004ff21 |
children | 8d5ca5175038 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityModelArtifact.java Thu Nov 07 10:27:41 2013 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityModelArtifact.java Thu Nov 07 11:10:58 2013 +0100 @@ -33,6 +33,7 @@ import org.dive4elements.river.artifacts.model.FacetTypes; +import org.dive4elements.river.artifacts.resources.Resources; /** Artifact to access flow velocity models. */ public class FlowVelocityModelArtifact @@ -46,6 +47,18 @@ /** Artifact key name. */ private static final String NAME = "flowvelocitymodel"; + private static final String I18N_MAINCHANNEL = + "facet.flow_velocity.model.mainchannel"; + + private static final String I18N_TAU = + "facet.flow_velocity.model.tau"; + + private static final String I18N_TOTALCHANNEL = + "facet.flow_velocity.model.totalchannel"; + + private static final String I18N_Q = + "facet.flow_velocity.model.q"; + /** Spawn only inactive facets. */ static { // TODO: Move to configuration. @@ -147,28 +160,36 @@ Facet facet = new FlowVelocityFacet( 0, FLOW_VELOCITY_MAINCHANNEL, - "mainchannel " + name, + Resources.getMsg(callMeta, + I18N_MAINCHANNEL, + new Object[] { name } ), ComputeType.ADVANCE, state.getID(), "hash" ); fs.add(facet); Facet tauFacet = new FlowVelocityFacet( 0, FLOW_VELOCITY_TAU, - "tau " + name, + Resources.getMsg(callMeta, + I18N_TAU, + new Object[] { name} ), ComputeType.ADVANCE, state.getID(), "hash" ); fs.add(tauFacet); Facet qFacet = new FlowVelocityFacet( 0, FLOW_VELOCITY_DISCHARGE, - "Q " + name, + Resources.getMsg(callMeta, + I18N_Q, + new Object[] { name} ), ComputeType.ADVANCE, state.getID(), "hash" ); fs.add(qFacet); Facet tFacet = new FlowVelocityFacet( 0, FLOW_VELOCITY_TOTALCHANNEL, - "total "+ name, + Resources.getMsg(callMeta, + I18N_TOTALCHANNEL, + new Object[] { name} ), ComputeType.ADVANCE, state.getID(), "hash" ); fs.add(tFacet);