Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FixationCompute.java @ 3049:5e9533687a0c
Added i18n in fix analysis.
flys-artifacts/trunk@4621 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 07 Jun 2012 09:44:00 +0000 |
parents | fa763b270e78 |
children | bac0b2721451 |
comparison
equal
deleted
inserted
replaced
3048:fa763b270e78 | 3049:5e9533687a0c |
---|---|
26 | 26 |
27 import de.intevation.flys.artifacts.model.fixings.DateRange; | 27 import de.intevation.flys.artifacts.model.fixings.DateRange; |
28 | 28 |
29 import de.intevation.flys.artifacts.states.DefaultState; | 29 import de.intevation.flys.artifacts.states.DefaultState; |
30 | 30 |
31 import de.intevation.flys.artifacts.resources.Resources; | |
32 | |
31 import java.util.List; | 33 import java.util.List; |
32 | 34 |
33 import org.apache.log4j.Logger; | 35 import org.apache.log4j.Logger; |
34 | 36 |
35 /** | 37 /** |
41 { | 43 { |
42 | 44 |
43 /** The log used in this class. */ | 45 /** The log used in this class. */ |
44 private static Logger log = Logger.getLogger(FixationCompute.class); | 46 private static Logger log = Logger.getLogger(FixationCompute.class); |
45 | 47 |
48 private static final String I18N_REFERENCEPERIOD = "fix.reference.period"; | |
49 | |
50 private static final String I18N_ANALYSISPERIODS = "fix.analysis.periods"; | |
51 | |
52 private static final String I18N_DERIVATIVE = "fix.derivative"; | |
53 | |
54 private static final String I18N_OUTLIER = "fix.outlier"; | |
46 | 55 |
47 /** | 56 /** |
48 * The default constructor that initializes an empty State object. | 57 * The default constructor that initializes an empty State object. |
49 */ | 58 */ |
50 public FixationCompute() { | 59 public FixationCompute() { |
130 eventDesc)); | 139 eventDesc)); |
131 facets.add(new FixAnalysisEventsFacet(i, | 140 facets.add(new FixAnalysisEventsFacet(i, |
132 FIX_ANALYSIS_EVENTS_WQ, | 141 FIX_ANALYSIS_EVENTS_WQ, |
133 eventDesc)); | 142 eventDesc)); |
134 } | 143 } |
144 | |
145 String i18n_ref = Resources.getMsg(context.getMeta(), | |
146 I18N_REFERENCEPERIOD, | |
147 I18N_REFERENCEPERIOD); | |
148 | |
135 facets.add(new FixReferenceEventsFacet(0, | 149 facets.add(new FixReferenceEventsFacet(0, |
136 FIX_REFERENCE_EVENTS_DWT, | 150 FIX_REFERENCE_EVENTS_DWT, |
137 "Referenceperiod")); | 151 i18n_ref)); |
138 facets.add(new FixReferenceEventsFacet(1, | 152 facets.add(new FixReferenceEventsFacet(1, |
139 FIX_REFERENCE_EVENTS_LS, | 153 FIX_REFERENCE_EVENTS_LS, |
140 "Referenceperiod")); | 154 i18n_ref)); |
141 facets.add(new FixReferenceEventsFacet(2, | 155 facets.add(new FixReferenceEventsFacet(2, |
142 FIX_REFERENCE_EVENTS_WQ, | 156 FIX_REFERENCE_EVENTS_WQ, |
143 "Referenceperiod")); | 157 i18n_ref)); |
144 | 158 |
159 String i18n_ana = Resources.getMsg(context.getMeta(), | |
160 I18N_ANALYSISPERIODS, | |
161 I18N_ANALYSISPERIODS); | |
145 facets.add(new FixAnalysisPeriodsFacet(0, | 162 facets.add(new FixAnalysisPeriodsFacet(0, |
146 FIX_ANALYSIS_PERIODS_DWT, | 163 FIX_ANALYSIS_PERIODS_DWT, |
147 "Analysis periods")); | 164 i18n_ana)); |
148 facets.add(new FixAnalysisPeriodsFacet(1, | 165 facets.add(new FixAnalysisPeriodsFacet(1, |
149 FIX_ANALYSIS_PERIODS_LS, | 166 FIX_ANALYSIS_PERIODS_LS, |
150 "Analysis periods")); | 167 i18n_ana)); |
151 facets.add(new FixAnalysisPeriodsFacet(2, | 168 facets.add(new FixAnalysisPeriodsFacet(2, |
152 FIX_ANALYSIS_PERIODS_WQ, | 169 FIX_ANALYSIS_PERIODS_WQ, |
153 "Analysis periods")); | 170 i18n_ana)); |
154 | 171 |
155 facets.add(new FixWQCurveFacet("W/Q")); | 172 facets.add(new FixWQCurveFacet("W/Q")); |
156 facets.add(new FixOutlierFacet(FIX_OUTLIER, "Outlier")); | 173 facets.add(new FixOutlierFacet(FIX_OUTLIER, |
157 facets.add(new FixDerivateFacet(FIX_DERIVATE, "Derivative")); | 174 Resources.getMsg(context.getMeta(), I18N_OUTLIER, I18N_OUTLIER))); |
175 facets.add(new FixDerivateFacet(FIX_DERIVATE, | |
176 Resources.getMsg(context.getMeta(), | |
177 I18N_DERIVATIVE, | |
178 I18N_DERIVATIVE))); | |
158 | 179 |
159 return res; | 180 return res; |
160 } | 181 } |
161 } | 182 } |
162 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : | 183 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |