changeset 1638:f45bbc80bd3d

Bugfix: #296 Set i18n titles for WSPLGEN and barriers WMS layers. flys-artifacts/trunk@2823 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 26 Sep 2011 13:10:40 +0000
parents 866c1f37f2bd
children 12235a2ace21
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java flys-artifacts/src/main/resources/messages.properties flys-artifacts/src/main/resources/messages_de.properties flys-artifacts/src/main/resources/messages_de_DE.properties flys-artifacts/src/main/resources/messages_en.properties
diffstat 6 files changed, 44 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Mon Sep 26 13:10:17 2011 +0000
+++ b/flys-artifacts/ChangeLog	Mon Sep 26 13:10:40 2011 +0000
@@ -1,3 +1,16 @@
+2011-09-26  Ingo Weinzierl <ingo@intevation.de>
+
+	flys/issue296 (Karte: Bezeichnungen verbessern)
+
+	* src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java:
+	  I18N of the WSPLGEN and barriers facets (WMS layers).
+
+	* src/main/resources/messages.properties,
+	  src/main/resources/messages_de_DE.properties,
+	  src/main/resources/messages_en.properties,
+	  src/main/resources/messages_de.properties: Added strings for the wsplgen
+	  and barriers WMS layers.
+
 2011-09-23  Felix Wolfsteller <felix.wolfsteller@intevation.de>
 
  Fix (revert) access to position in ManagedDomFacet.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java	Mon Sep 26 13:10:17 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java	Mon Sep 26 13:10:40 2011 +0000
@@ -78,6 +78,11 @@
     public static final String WSPLGEN_WSP_FILE       = "waterlevel.wst";
     public static final String WSPLGEN_OUTPUT_FILE    = "wsplgen.shp";
 
+    public static final String I18N_WSPLGEN_RESULT   = "floodmap.uesk";
+    public static final String I18N_WSPLGEN_DEFAULT  = "floodmap.uesk";
+    public static final String I18N_BARRIERS         = "floodmap.barriers";
+    public static final String I18N_BARRIERS_DEFAULT = "floodmap.barriers";
+
     public static final int WSPLGEN_DEFAULT_OUTPUT = 0;
 
 
@@ -88,14 +93,21 @@
      */
     private static class FacetCreator {
         protected FLYSArtifact artifact;
+        protected CallContext  cc;
         protected List<Facet>  facets;
         protected String url;
         protected String hash;
         protected String stateId;
 
-        public FacetCreator(FLYSArtifact artifact, String hash, String sId) {
+        public FacetCreator(
+            FLYSArtifact artifact,
+            CallContext  cc,
+            String       hash,
+            String       sId
+        ) {
             this.facets     = new ArrayList<Facet>(2);
             this.artifact   = artifact;
+            this.cc         = cc;
             this.hash       = hash;
             this.stateId    = sId;
         }
@@ -126,7 +138,10 @@
             WMSLayerFacet wsplgen = new WMSLayerFacet(
                 0,
                 FLOODMAP_WSPLGEN,
-                "Ergebnis der WSPLGEN Berechnung",
+                Resources.getMsg(
+                    cc.getMeta(),
+                    I18N_WSPLGEN_RESULT,
+                    I18N_WSPLGEN_DEFAULT),
                 ComputeType.ADVANCE,
                 stateId,
                 hash,
@@ -144,7 +159,10 @@
             WMSLayerFacet barriers = new WMSLayerFacet(
                 1,
                 FLOODMAP_WSPLGEN,
-                "Rohre/Graeben/Daemme",
+                Resources.getMsg(
+                    cc.getMeta(),
+                    I18N_BARRIERS,
+                    I18N_BARRIERS_DEFAULT),
                 ComputeType.ADVANCE,
                 stateId,
                 hash,
@@ -180,7 +198,8 @@
 
         WSPLGENCalculation calculation = new WSPLGENCalculation();
 
-        FacetCreator facetCreator = new FacetCreator(artifact, hash, getID());
+        FacetCreator facetCreator = new FacetCreator(
+            artifact, context, hash, getID());
 
         WSPLGENJob job = prepareWSPLGENJob(
             artifact,
--- a/flys-artifacts/src/main/resources/messages.properties	Mon Sep 26 13:10:17 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages.properties	Mon Sep 26 13:10:40 2011 +0000
@@ -76,6 +76,8 @@
 
 floodmap.wmsbackground = Background Map
 floodmap.riveraxis = River Axis
+floodmap.uesk = Floodmap
+floodmap.barriers = Digitized Objects
 
 wsplgen.job.queued = WSPLGEN job in queue.
 wsplgen.job.error = An unexpected error while starting WSPLGEN occured.
--- a/flys-artifacts/src/main/resources/messages_de.properties	Mon Sep 26 13:10:17 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages_de.properties	Mon Sep 26 13:10:40 2011 +0000
@@ -77,6 +77,8 @@
 
 floodmap.wmsbackground = Hintergrundkarte
 floodmap.riveraxis = Flussachse
+floodmap.uesk = \u00dcberschwemmungsfl\u00e4che
+floodmap.barriers = Digitalisierte Objekte
 
 wsplgen.job.queued = WSPLGEN Berechnung befindet sich in Warteschlange.
 wsplgen.job.error = Ein unerwarteter Fehler beim Starten von WSPLGEN ist aufgetreten.
--- a/flys-artifacts/src/main/resources/messages_de_DE.properties	Mon Sep 26 13:10:17 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages_de_DE.properties	Mon Sep 26 13:10:40 2011 +0000
@@ -76,6 +76,8 @@
 
 floodmap.wmsbackground = Hintergrundkarte
 floodmap.riveraxis = Flussachse
+floodmap.uesk = \u00dcberschwemmungsfl\u00e4che
+floodmap.barriers = Digitalisierte Objekte
 
 wsplgen.job.queued = WSPLGEN Berechnung befindet sich in Warteschlange.
 wsplgen.job.error = Ein unerwarteter Fehler beim Starten von WSPLGEN ist aufgetreten.
--- a/flys-artifacts/src/main/resources/messages_en.properties	Mon Sep 26 13:10:17 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages_en.properties	Mon Sep 26 13:10:40 2011 +0000
@@ -74,6 +74,8 @@
 
 floodmap.wmsbackground = Background Map
 floodmap.riveraxis = River Axis
+floodmap.uesk = Floodmap
+floodmap.barriers = Digitized Objects
 
 wsplgen.job.queued = WSPLGEN job in queue.
 wsplgen.job.error = An unexpected error while starting WSPLGEN occured.

http://dive4elements.wald.intevation.org