Mercurial > dive4elements > river
changeset 7534:00950f79b0d9
issue1512: i18n.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 07 Nov 2013 11:10:58 +0100 |
parents | 20b1cfa1e005 |
children | bccc08a46bab |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityModelArtifact.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, 41 insertions(+), 4 deletions(-) [+] |
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);
--- a/artifacts/src/main/resources/messages.properties Thu Nov 07 10:27:41 2013 +0100 +++ b/artifacts/src/main/resources/messages.properties Thu Nov 07 11:10:58 2013 +0100 @@ -279,6 +279,10 @@ facet.discharge_curves.mainvalues.w = W (main values) historical_discharge.mainvalues.q = Q Main Values historical_discharge.mainvalues.w = W Main Values +facet.flow_velocity.model.mainchannel = Mainchannel {0} +facet.flow_velocity.model.totalchannel = Totalchannel {0} +facet.flow_velocity.model.tau = Tau {0} +facet.flow_velocity.model.q = Q {0} facet.flow_velocity.mainchannel = v Mainchannel at {0} facet.flow_velocity.totalchannel = v Totalchannel at {0} facet.flow_velocity.tauchannel = TAU Mainchannel at {0}
--- a/artifacts/src/main/resources/messages_de.properties Thu Nov 07 10:27:41 2013 +0100 +++ b/artifacts/src/main/resources/messages_de.properties Thu Nov 07 11:10:58 2013 +0100 @@ -279,6 +279,10 @@ facet.discharge_curves.mainvalues.w = W (Haupt- und Extremwerte) historical_discharge.mainvalues.q = Q (Haupt- und Extremwerte) historical_discharge.mainvalues.w = W (Haupt- und Extremwerte) +facet.flow_velocity.model.mainchannel = Hauptgerinne {0} +facet.flow_velocity.model.totalchannel = Gesamtgerinne {0} +facet.flow_velocity.model.tau = Tau {0} +facet.flow_velocity.model.q = Q {0} facet.flow_velocity.mainchannel = v Hauptgerinne bei {0} facet.flow_velocity.totalchannel = v Gesamtgerinne bei {0} facet.flow_velocity.discharge = Abfluss bei {0}
--- a/artifacts/src/main/resources/messages_de_DE.properties Thu Nov 07 10:27:41 2013 +0100 +++ b/artifacts/src/main/resources/messages_de_DE.properties Thu Nov 07 11:10:58 2013 +0100 @@ -277,6 +277,10 @@ facet.discharge_curves.mainvalues.w = W (Haupt- und Extremwerte) historical_discharge.mainvalues.q = Q (Haupt- und Extremwerte) historical_discharge.mainvalues.w = W (Haupt- und Extremwerte) +facet.flow_velocity.model.mainchannel = Hauptgerinne {0} +facet.flow_velocity.model.totalchannel = Gesamtgerinne {0} +facet.flow_velocity.model.tau = Tau {0} +facet.flow_velocity.model.q = Q {0} facet.flow_velocity.mainchannel = v Hauptgerinne bei {0} facet.flow_velocity.totalchannel = v Gesamtgerinne bei {0} facet.flow_velocity.tauchannel = TAU Hauptgerinne bei {0}
--- a/artifacts/src/main/resources/messages_en.properties Thu Nov 07 10:27:41 2013 +0100 +++ b/artifacts/src/main/resources/messages_en.properties Thu Nov 07 11:10:58 2013 +0100 @@ -283,6 +283,10 @@ facet.discharge_curves.mainvalues.w = W (main values) historical_discharge.mainvalues.q = Q Main Values historical_discharge.mainvalues.w = W Main Values +facet.flow_velocity.model.mainchannel = Mainchannel {0} +facet.flow_velocity.model.totalchannel = Totalchannel {0} +facet.flow_velocity.model.tau = Tau {0} +facet.flow_velocity.model.q = Q {0} facet.flow_velocity.mainchannel = v Mainchannel at {0} facet.flow_velocity.discharge = Discharge at {0} facet.flow_velocity.totalchannel = v Totalchannel at {0}