changeset 6091:75a38bc6baf2

issue1061: Adjusted facet names of bed diff.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 24 May 2013 13:57:40 +0200
parents 5239d96f84c2
children bdb316f7c552 16027599b2a9 53fca3392c9f
files artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferencesState.java
diffstat 1 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferencesState.java	Fri May 24 13:56:45 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferencesState.java	Fri May 24 13:57:40 2013 +0200
@@ -59,6 +59,8 @@
     public static final String I18N_FACET_BED_DIFF_HEIGHT2 = "facet.bedheight.diff.height2";
     public static final String I18N_FACET_BED_DIFF_HEIGHT2_RAW = "facet.bedheight.diff.height2.raw";
 
+    public static final String I18N_FACET_BED_DIFF_HEIGHT_RAW = "facet.bedheight.diff.height.raw";
+
     public DifferencesState() {
     }
 
@@ -271,21 +273,19 @@
         int ndx,
         boolean raw
     ) {
-        String range = result.getStart() + " - " + result.getEnd();
-
-        String i18nHeight1 = I18N_FACET_BED_DIFF_HEIGHT1;
-        String i18nHeight2 = I18N_FACET_BED_DIFF_HEIGHT2;
-        if (raw) {
-            i18nHeight1 = I18N_FACET_BED_DIFF_HEIGHT1_RAW;
-            i18nHeight2 = I18N_FACET_BED_DIFF_HEIGHT2_RAW;
+        if (raw && ndx == 0) {
+            return Resources.getMsg(meta, I18N_FACET_BED_DIFF_HEIGHT_RAW,
+                I18N_FACET_BED_DIFF_HEIGHT_RAW, new Object[] {result.getNameFirst()});
+        }
+        if (raw && ndx == 1) {
+            return Resources.getMsg(meta, I18N_FACET_BED_DIFF_HEIGHT_RAW,
+                I18N_FACET_BED_DIFF_HEIGHT_RAW, new Object[] {result.getNameSecond()});
         }
         if (ndx == 0) {
-            return Resources.getMsg(meta, i18nHeight1,
-                i18nHeight2, new Object[] { range });
+            return result.getNameFirst();
         }
         else {
-            return Resources.getMsg(meta, i18nHeight1,
-                i18nHeight2, new Object[] {range});
+            return result.getNameSecond();
         }
     }
 

http://dive4elements.wald.intevation.org