Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java @ 1701:6e59208839ae
Expose translateable Strings as constants.
flys-artifacts/trunk@2935 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 11 Oct 2011 11:16:40 +0000 |
parents | 13a9ee6cebef |
children | e99b4bd32cd5 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java Tue Oct 11 10:44:12 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java Tue Oct 11 11:16:40 2011 +0000 @@ -35,12 +35,33 @@ private static Logger logger = Logger.getLogger(WDifferencesCurveGenerator.class); + /** Key for internationalized title of WDiff charts. */ + public final static String I18N_WDIFF_TITLE = "chart.w_differences.title"; + + /** Default for internationalized title (when no translation found). */ + public final static String I18N_WDIFF_TITLE_DEFAULT = "Differences"; + + /** Key for internationalized title of WDiff charts. */ + public final static String I18N_WDIFF_2YAXIS_LABEL = + "chart.w_differences.yaxis.second.label"; + + /** Default for label for second Y-Axis when no translation found. */ + public final static String I18N_WDIFF_2YAXIS_LABEL_DEFAULT = "W [NN + m]"; + + public final static String I18N_WDIFF_SUBTITLE = + "chart.w_differences.subtitle"; + + public final static String I18N_WDIFF_YAXIS_LABEL = + "chart.w_differences.yaxis.label"; + + public final static String I18N_WDIFF_YAXIS_LABEL_DEFAULT = "m"; + /** * Get internationalized title for chart. */ public String getChartTitle() { - return msg("chart.w_differences.title", "Differences"); + return msg(I18N_WDIFF_TITLE, I18N_WDIFF_TITLE_DEFAULT); } @@ -50,7 +71,7 @@ */ @Override protected String get2YAxisDefaultLabel() { - return "W [NN + m]"; + return I18N_WDIFF_2YAXIS_LABEL_DEFAULT; } @@ -60,7 +81,7 @@ */ @Override protected String getChartSubtitleKey() { - return "chart.w_differences.subtitle"; + return I18N_WDIFF_SUBTITLE; } @@ -69,7 +90,7 @@ */ @Override protected String get2YAxisLabelKey() { - return "chart.w_differences.yaxis.second.label"; + return I18N_WDIFF_2YAXIS_LABEL; } @@ -83,8 +104,8 @@ String unit = FLYSUtils.getRiver(flys).getWstUnit().getName(); return msg( - "chart.w_differences.yaxis.label", - "m", + I18N_WDIFF_YAXIS_LABEL, + I18N_WDIFF_YAXIS_LABEL_DEFAULT, new Object[] { unit }); }