Mercurial > dive4elements > river
changeset 2579:2867ae59e216
#566 Improved german translation.
flys-artifacts/trunk@4117 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 05 Mar 2012 10:53:42 +0000 |
parents | e3fd2d2fab6d |
children | 3d240200364c |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodplainChoice.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, 50 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Mon Mar 05 10:29:51 2012 +0000 +++ b/flys-artifacts/ChangeLog Mon Mar 05 10:53:42 2012 +0000 @@ -1,3 +1,17 @@ +2012-03-05 Ingo Weinzierl <ingo@intevation.de> + + flys/issue566 (ÜSK: Formalien in der Parametrisierung) + + * src/main/java/de/intevation/flys/artifacts/states/FloodplainChoice.java: + Override getLabelFor() method to return better I18N strings for selected + floodplain option. + + * 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 options + for floodplain (active/inactive) and adapted a german I18N string. + 2012-03-05 Felix Wolfsteller <felix.wolfsteller@intevation.de> Fix flys/issue 528 for csv.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodplainChoice.java Mon Mar 05 10:29:51 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodplainChoice.java Mon Mar 05 10:53:42 2012 +0000 @@ -2,6 +2,8 @@ import org.w3c.dom.Element; +import org.apache.log4j.Logger; + import de.intevation.artifacts.Artifact; import de.intevation.artifacts.CallContext; import de.intevation.artifacts.CallMeta; @@ -18,7 +20,12 @@ */ public class FloodplainChoice extends DefaultState { - public static final String OPTION = "floodplain.option"; + public static final String OPTION = "floodplain.option"; + public static final String ACTIVE = "floodplain.active"; + public static final String INACTIVE = "floodplain.inactive"; + + private static final Logger logger = + Logger.getLogger(FloodplainChoice.class); @Override @@ -44,6 +51,23 @@ } + @Override + protected String getLabelFor( + CallContext cc, + String name, + String value, + String type + ) { + logger.debug("GET LABEL FOR '" + name + "' / '" + value + "'"); + if (value != null && value.equals("true")) { + return Resources.getMsg(cc.getMeta(), ACTIVE, ACTIVE); + } + else { + return Resources.getMsg(cc.getMeta(), INACTIVE, INACTIVE); + } + } + + protected Element createItem(XMLUtils.ElementCreator cr, Object obj) { Element item = ProtocolUtils.createArtNode(cr, "item", null, null); Element label = ProtocolUtils.createArtNode(cr, "label", null, null);
--- a/flys-artifacts/src/main/resources/messages.properties Mon Mar 05 10:29:51 2012 +0000 +++ b/flys-artifacts/src/main/resources/messages.properties Mon Mar 05 10:53:42 2012 +0000 @@ -48,7 +48,10 @@ scenario.current = Current scenario.potentiel = Potentiel scenario.scenario = Scenario + floodplain.option = Use Floodplain? +floodplain.active = Activ +floodplain.inactive = Inactiv river = River calculation_mode = Calculation Mode
--- a/flys-artifacts/src/main/resources/messages_de.properties Mon Mar 05 10:29:51 2012 +0000 +++ b/flys-artifacts/src/main/resources/messages_de.properties Mon Mar 05 10:53:42 2012 +0000 @@ -46,10 +46,12 @@ reference_curve_normalized = Reduzierte Bezugslinie scenario.current = Aktuell -scenario.potentiel = Potentiell +scenario.potentiel = Potenziell scenario.scenario = Szenario floodplain.option = Talaue verwenden? +floodplain.active = Aktiv +floodplain.inactive = Inaktiv river = Fluss calculation_mode = Berechnungsart
--- a/flys-artifacts/src/main/resources/messages_de_DE.properties Mon Mar 05 10:29:51 2012 +0000 +++ b/flys-artifacts/src/main/resources/messages_de_DE.properties Mon Mar 05 10:53:42 2012 +0000 @@ -46,10 +46,12 @@ reference_curve_normalized = Reduzierte Bezugslinie scenario.current = Aktuell -scenario.potentiel = Potentiell +scenario.potentiel = Potenziell scenario.scenario = Szenario floodplain.option = Talaue verwenden? +floodplain.active = Aktiv +floodplain.inactive = Inaktiv river = Fluss calculation_mode = Berechnungsart
--- a/flys-artifacts/src/main/resources/messages_en.properties Mon Mar 05 10:29:51 2012 +0000 +++ b/flys-artifacts/src/main/resources/messages_en.properties Mon Mar 05 10:53:42 2012 +0000 @@ -48,6 +48,8 @@ scenario.scenario = Scenario floodplain.option = Use Floodplain? +floodplain.active = Activ +floodplain.inactive = Inactiv river = River calculation_mode = Calculation Mode