changeset 3835:11d74b9d428a

i18n (#872) flys-client/trunk@5541 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Christian Lins <christian.lins@intevation.de>
date Thu, 20 Sep 2012 14:17:21 +0000
parents 52109c4bc5de
children 06c76de19b51
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixMultiPeriodPanel.java
diffstat 6 files changed, 32 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Thu Sep 20 09:58:10 2012 +0000
+++ b/flys-client/ChangeLog	Thu Sep 20 14:17:21 2012 +0000
@@ -1,9 +1,18 @@
-2012-09-19	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+2012-09-20	Christian Lins	<christian.lins@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/FLYSConstants.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties,
+	  src/main/java/de/intevation/flys/client/client/ui/fixation/FixMultiPeriodPanel.java,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants.java:
+	  i18n for FixMultiPeriodPanel (#872).
+
+2012-09-20	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java:
 	  Prevent AIOOB exception.
 
-2012-09-19	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+2012-09-20	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java:
 	  Removed superfluous import.
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java	Thu Sep 20 09:58:10 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java	Thu Sep 20 14:17:21 2012 +0000
@@ -8,6 +8,8 @@
  */
 public interface FLYSConstants extends ConstantsWithLookup {
 
+    String add();
+
     String unexpected_exception();
 
     String title();
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties	Thu Sep 20 09:58:10 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties	Thu Sep 20 14:17:21 2012 +0000
@@ -84,6 +84,7 @@
 start_year = Start
 end_year = End
 period = Period
+
 # Header images
 flysLogo = images/flys_logo.gif
 bfgLogo = images/bfg_logo.gif
@@ -191,6 +192,7 @@
 zoom_back = images/mag_zoom_back.png
 pan = images/hand.png
 askThemeRemove = Are you sure that you want to remove the selected theme / themes?
+add = Add
 
 discharge_curve = Discharge Curves at Gauges
 computed_discharge_curve = Discharge Curve
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Thu Sep 20 09:58:10 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Thu Sep 20 14:17:21 2012 +0000
@@ -178,6 +178,7 @@
 zoom_back = images/mag_zoom_back.png
 pan = images/hand.png
 askThemeRemove = Sind Sie sicher, dass sie die gew\u00e4hlten / das gew\u00e4lte Thema l\u00f6eschen wollen?
+add = Hinzuf\u00fcgen
 
 addPointsTooltip = Manuelle Punkte hinzuf\u00fcgen
 addWSPTooltip = Manuelle WSP hinzuf\u00fcgen
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties	Thu Sep 20 09:58:10 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties	Thu Sep 20 14:17:21 2012 +0000
@@ -192,6 +192,7 @@
 zoom_back = images/mag_zoom_back.png
 pan = images/hand.png
 askThemeRemove = Are you sure that you want to remove the selected theme / themes?
+add = Add
 
 discharge_curve = Discharge Curves at Gauges
 computed_discharge_curve = Discharge Curve
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixMultiPeriodPanel.java	Thu Sep 20 09:58:10 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixMultiPeriodPanel.java	Thu Sep 20 14:17:21 2012 +0000
@@ -1,38 +1,33 @@
 package de.intevation.flys.client.client.ui.fixation;
 
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Date;
-
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.i18n.client.DateTimeFormat;
 
-import com.smartgwt.client.data.Record;
-
+import com.smartgwt.client.types.ListGridFieldType;
+import com.smartgwt.client.widgets.Button;
 import com.smartgwt.client.widgets.Canvas;
 import com.smartgwt.client.widgets.Label;
-import com.smartgwt.client.widgets.Button;
 import com.smartgwt.client.widgets.events.ClickEvent;
 import com.smartgwt.client.widgets.events.ClickHandler;
-
 import com.smartgwt.client.widgets.grid.ListGrid;
 import com.smartgwt.client.widgets.grid.ListGridField;
 import com.smartgwt.client.widgets.grid.ListGridRecord;
-
+import com.smartgwt.client.widgets.grid.events.RecordClickEvent;
+import com.smartgwt.client.widgets.grid.events.RecordClickHandler;
 import com.smartgwt.client.widgets.layout.HLayout;
 import com.smartgwt.client.widgets.layout.VLayout;
 
-import com.smartgwt.client.types.ListGridFieldType;
-
-import com.smartgwt.client.widgets.grid.events.RecordClickEvent;
-import com.smartgwt.client.widgets.grid.events.RecordClickHandler;
-
+import de.intevation.flys.client.client.FLYSConstants;
 import de.intevation.flys.client.shared.model.Data;
 import de.intevation.flys.client.shared.model.DataItem;
 import de.intevation.flys.client.shared.model.DataList;
 import de.intevation.flys.client.shared.model.DefaultData;
 import de.intevation.flys.client.shared.model.DefaultDataItem;
 
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
 /**
  * This UIProvider creates a panel for location or distance input.
  *
@@ -41,6 +36,8 @@
 public class FixMultiPeriodPanel
 extends      FixPeriodPanel
 {
+    /** The message class that provides i18n strings. */
+    protected FLYSConstants MESSAGES = GWT.create(FLYSConstants.class);
 
     protected ListGrid elements;
 
@@ -54,12 +51,13 @@
         super(startName, endName);
     }
 
+    @Override
     public Canvas createWidget(DataList data) {
         HLayout input = new HLayout();
         VLayout root = new VLayout();
         VLayout grid = new VLayout();
         VLayout layout = (VLayout) super.createWidget(data);
-        Button add = new Button("Add");
+        Button add = new Button(MESSAGES.add());
         elements = new ListGrid();
 
         add.addClickHandler(new ClickHandler() {
@@ -169,6 +167,7 @@
      *
      * @return the selected/inserted data.
      */
+    @Override
     public Data[] getData() {
         List<Data> data = new ArrayList<Data>();
 
@@ -185,6 +184,7 @@
     }
 
 
+    @Override
     protected boolean saveDateValues() {
         ListGridRecord[] lgr = elements.getRecords();
         if (lgr.length == 0) {

http://dive4elements.wald.intevation.org