changeset 8712:582e970115b6

(issue1448) Localize SedimentLoadInfo Exceptions shown in the client
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 24 Apr 2015 17:18:48 +0200
parents 02162b60cf9c
children 6b68777aaeab
files gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_en.properties gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/SedLoadEpochPanel.java gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/SedLoadPeriodPanel.java gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/SedLoadSQTiPanel.java gwt-client/src/main/java/org/dive4elements/river/client/server/SedimentLoadInfoServiceImpl.java
diffstat 8 files changed, 17 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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 :
--- 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.
--- 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.
--- 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.
--- 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) {
--- 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) {
--- 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) {
--- 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();

http://dive4elements.wald.intevation.org