# HG changeset patch # User Felix Wolfsteller # Date 1382091655 -7200 # Node ID 8ba53c5b86a782dd557b0edf838c113b8c694359 # Parent a94b6e057daaa9cc975c48b35d111e92adf2b50b issue1512: improved i18n for flow velocity measurement facets. diff -r a94b6e057daa -r 8ba53c5b86a7 artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityMeasurementArtifact.java --- 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); diff -r a94b6e057daa -r 8ba53c5b86a7 artifacts/src/main/resources/messages.properties --- 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}) diff -r a94b6e057daa -r 8ba53c5b86a7 artifacts/src/main/resources/messages_de.properties --- 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}) diff -r a94b6e057daa -r 8ba53c5b86a7 artifacts/src/main/resources/messages_de_DE.properties --- 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}) diff -r a94b6e057daa -r 8ba53c5b86a7 artifacts/src/main/resources/messages_en.properties --- 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})