[PATCH 2 of 2] (issue1448) Localize SedimentLoadInfo Exceptions shown in the client

Wald Commits scm-commit at wald.intevation.org
Fri Apr 24 17:18:53 CEST 2015


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1429888728 -7200
# Node ID 582e970115b6cf4d3a65305f44bc0aaa80f69ac8
# Parent  02162b60cf9c5557abc44d98f113cb8e7551c5bb
(issue1448) Localize SedimentLoadInfo Exceptions shown in the client

diff -r 02162b60cf9c -r 582e970115b6 gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java	Fri Apr 24 17:17:56 2015 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java	Fri Apr 24 17:18:48 2015 +0200
@@ -1417,5 +1417,9 @@
     String upper_time();
 
     String no_data_for_year();
+
+    String error_no_sedimentloadinfo_found();
+
+    String error_no_sedimentloadinfo_data();
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
diff -r 02162b60cf9c -r 582e970115b6 gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties	Fri Apr 24 17:17:56 2015 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties	Fri Apr 24 17:18:48 2015 +0200
@@ -351,6 +351,8 @@
 error_load_parameterization = Could not load the parameterization.
 error_wrong_date = Please enter valid dates.
 error_no_gaugeoverviewinfo_found = Error while fetching the river and gauge info
+error_no_sedimentloadinfo_found = Error while fetching sedimentload info.
+error_no_sedimentloadinfo_data = No Sedimentload data for the current parameters.
 
 error_feed_no_data = No input data found.
 error_feed_from_out_of_range = The lower value is bigger than the upper value.
diff -r 02162b60cf9c -r 582e970115b6 gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties	Fri Apr 24 17:17:56 2015 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties	Fri Apr 24 17:18:48 2015 +0200
@@ -352,6 +352,8 @@
 error_load_parameterization = Fehler beim Laden der Parametrisierung.
 error_wrong_date = Bitte geben Sie g\u00fcltige Daten ein.
 error_no_gaugeoverviewinfo_found = Fehler beim Laden der Fluss- und Pegelinformationen
+error_no_sedimentloadinfo_found = Fehler beim Laden der Sedimentfracht Daten.
+error_no_sedimentloadinfo_data = F\u00fcr die gew\u00e4te Parametrisierung liegen keine Daten vor.
 
 error_feed_no_data = Keine Eingabedaten gefunden.
 error_feed_from_out_of_range = Der untere Wert liegt au\u00dferhalb des g\u00fcltigen Wertebereiches.
diff -r 02162b60cf9c -r 582e970115b6 gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_en.properties
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_en.properties	Fri Apr 24 17:17:56 2015 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_en.properties	Fri Apr 24 17:18:48 2015 +0200
@@ -350,6 +350,8 @@
 error_load_parameterization = Could not load the parameterization.
 error_wrong_date = Please enter valid dates.
 error_no_gaugeoverviewinfo_found = Error while fetching the river and gauge info
+error_no_sedimentloadinfo_found = Error while fetching sedimentload info.
+error_no_sedimentloadinfo_data = No Sedimentload data for the current parameters.
 
 error_feed_no_data = No input data found.
 error_feed_from_out_of_range = The lower value is bigger than the upper value.
diff -r 02162b60cf9c -r 582e970115b6 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/SedLoadEpochPanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/SedLoadEpochPanel.java	Fri Apr 24 17:17:56 2015 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/SedLoadEpochPanel.java	Fri Apr 24 17:18:48 2015 +0200
@@ -301,7 +301,7 @@
             new AsyncCallback<SedimentLoadInfoObject[]>() {
                 public void onFailure(Throwable caught) {
                     GWT.log("Could not recieve sediment load informations.");
-                    SC.warn(caught.getMessage());
+                    SC.warn(MSG.getString(caught.getMessage()));
                 }
 
                 public void onSuccess(SedimentLoadInfoObject[] sedLoad) {
diff -r 02162b60cf9c -r 582e970115b6 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/SedLoadPeriodPanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/SedLoadPeriodPanel.java	Fri Apr 24 17:17:56 2015 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/SedLoadPeriodPanel.java	Fri Apr 24 17:18:48 2015 +0200
@@ -256,7 +256,7 @@
             new AsyncCallback<SedimentLoadInfoObject[]>() {
                 public void onFailure(Throwable caught) {
                     GWT.log("Could not recieve sediment load informations.");
-                    SC.warn(caught.getMessage());
+                    SC.warn(MSG.getString(caught.getMessage()));
                 }
 
                 public void onSuccess(SedimentLoadInfoObject[] sedLoad) {
diff -r 02162b60cf9c -r 582e970115b6 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/SedLoadSQTiPanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/SedLoadSQTiPanel.java	Fri Apr 24 17:17:56 2015 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/SedLoadSQTiPanel.java	Fri Apr 24 17:18:48 2015 +0200
@@ -175,7 +175,7 @@
             new AsyncCallback<SedimentLoadInfoObject[]>() {
                 public void onFailure(Throwable caught) {
                     GWT.log("Could not receive sediment load informations.");
-                    SC.warn(caught.getMessage());
+                    SC.warn(MSG.getString(caught.getMessage()));
                 }
 
                 public void onSuccess(SedimentLoadInfoObject[] sedLoad) {
diff -r 02162b60cf9c -r 582e970115b6 gwt-client/src/main/java/org/dive4elements/river/client/server/SedimentLoadInfoServiceImpl.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/server/SedimentLoadInfoServiceImpl.java	Fri Apr 24 17:17:56 2015 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/SedimentLoadInfoServiceImpl.java	Fri Apr 24 17:18:48 2015 +0200
@@ -40,6 +40,9 @@
     public static final String ERROR_NO_SEDIMENTLOADINFO_FOUND =
         "error_no_sedimentloadinfo_found";
 
+    public static final String ERROR_NO_SEDIMENTLOADINFO_DATA =
+        "error_no_sedimentloadinfo_data";
+
     @Override
     public SedimentLoadInfoObject[] getSedimentLoadInfo(
         String locale,
@@ -116,7 +119,7 @@
 
         if (list == null || list.getLength() == 0) {
             log.warn("No sedimentload info found.");
-            throw new ServerException(ERROR_NO_SEDIMENTLOADINFO_FOUND);
+            throw new ServerException(ERROR_NO_SEDIMENTLOADINFO_DATA);
         }
 
         int num = list.getLength();


More information about the Dive4Elements-commits mailing list