[PATCH 2 of 2] issue1512: i18n

Wald Commits scm-commit at wald.intevation.org
Thu Nov 7 11:10:46 CET 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1383819058 -3600
# Node ID 00950f79b0d956edd3dbdc76ace5d383af480db2
# Parent  20b1cfa1e0051111f509e5b9731fdf90a72b166e
issue1512: i18n.

diff -r 20b1cfa1e005 -r 00950f79b0d9 artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityModelArtifact.java
--- 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);
diff -r 20b1cfa1e005 -r 00950f79b0d9 artifacts/src/main/resources/messages.properties
--- 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}
diff -r 20b1cfa1e005 -r 00950f79b0d9 artifacts/src/main/resources/messages_de.properties
--- 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}
diff -r 20b1cfa1e005 -r 00950f79b0d9 artifacts/src/main/resources/messages_de_DE.properties
--- 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}
diff -r 20b1cfa1e005 -r 00950f79b0d9 artifacts/src/main/resources/messages_en.properties
--- 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}


More information about the Dive4elements-commits mailing list