changeset 4928:57652f905a87

HistoricalDischargeComputeState: Fix flys/issue664 i18n numbered facettes.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 31 Jan 2013 11:22:43 +0100
parents eb1cde786abf
children 1366277655b9
files flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeComputeState.java
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeComputeState.java	Thu Jan 31 11:21:37 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeComputeState.java	Thu Jan 31 11:22:43 2013 +0100
@@ -1,5 +1,7 @@
 package de.intevation.flys.artifacts.states;
 
+import java.text.NumberFormat;
+
 import java.util.List;
 
 import org.apache.log4j.Logger;
@@ -137,15 +139,17 @@
         double[] ws = access.getWs();
         double[] qs = access.getQs();
 
+        NumberFormat format = NumberFormat.getInstance(
+                        Resources.getLocale(cc.getMeta()));
         for (int k = 0; k < ws.length; k++) {
             facets.add(new HistoricalDischargeWQFacet(k,
-                HISTORICAL_DISCHARGE_WQ_W, "W=" + ws[k], ComputeType.ADVANCE,
+                HISTORICAL_DISCHARGE_WQ_W, "W=" + format.format(ws[k]), ComputeType.ADVANCE,
                 hash, getID(), ws[k]));
         }
 
         for (int k = 0; k < qs.length; k++) {
             facets.add(new HistoricalDischargeWQFacet(k,
-                HISTORICAL_DISCHARGE_WQ_Q, "Q=" + qs[k], ComputeType.ADVANCE,
+                HISTORICAL_DISCHARGE_WQ_Q, "Q=" + format.format(qs[k]), ComputeType.ADVANCE,
                 hash, getID(), qs[k]));
         }
 

http://dive4elements.wald.intevation.org