r808 - in trunk: . coser-business/src/main/java/fr/ifremer/coser/services
Author: chatellier Date: 2011-04-14 08:57:10 +0000 (Thu, 14 Apr 2011) New Revision: 808 Log: Fix year axis label (not depend from website locale) Modified: trunk/changelog.txt trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java Modified: trunk/changelog.txt =================================================================== --- trunk/changelog.txt 2011-04-14 08:56:43 UTC (rev 807) +++ trunk/changelog.txt 2011-04-14 08:57:10 UTC (rev 808) @@ -1,6 +1,11 @@ Coser release notes =================== +1.0.4 +----- + + * Fix year axis label (not depend from website locale) + 1.0.3 ----- Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java =================================================================== --- trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java 2011-04-14 08:56:43 UTC (rev 807) +++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java 2011-04-14 08:57:10 UTC (rev 808) @@ -660,12 +660,13 @@ * @param zoneDisplayName zone full name * @param indicatorName indicatorName localized * @param unit data unit + * @param locale locale * @return generated graph image (temp file) * @throws CoserBusinessException */ public File getRsufiResultComChart(Project project, File resultDirectory, - RSufiResult rsufiResult, String indicator, - String zoneDisplayName, String indicatorName, String unit) throws CoserBusinessException { + RSufiResult rsufiResult, String indicator, String zoneDisplayName, + String indicatorName, String unit, String locale) throws CoserBusinessException { File result = null; @@ -727,7 +728,14 @@ } // configure chart - CategoryAxis categoryAxis = new CategoryAxis(_("coser.business.common.year")); + //CategoryAxis categoryAxis = new CategoryAxis(_("coser.business.common.year")); + // FIXME echatellier 20110414 hack just for year, need a real locale object here + // to call _(locale, i18nkey) + String yearAxis = "Year"; + if ("fr".equals(locale)) { + yearAxis = "Ann\u00E9e"; + } + CategoryAxis categoryAxis = new CategoryAxis(yearAxis); categoryAxis.setCategoryMargin(0); categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90); // label horizontaux @@ -781,12 +789,13 @@ * @param zoneDisplayName zone full name * @param indicatorName indicatorName localized * @param unit data unit + * @param locale locale * @return generated image file (temp file) * @throws CoserBusinessException */ public File getRsufiResultPopChart(Project project, File resultDirectory, RSufiResult rsufiResult, String species, String indicator, - String zoneDisplayName, String indicatorName, String unit) throws CoserBusinessException { + String zoneDisplayName, String indicatorName, String unit, String locale) throws CoserBusinessException { File result = null; @@ -849,8 +858,16 @@ } } + // configure chart - CategoryAxis categoryAxis = new CategoryAxis(_("coser.business.common.year")); + //CategoryAxis categoryAxis = new CategoryAxis(_("coser.business.common.year")); + // FIXME echatellier 20110414 hack just for year, need a real locale object here + // to call _(locale, i18nkey) + String yearAxis = "Year"; + if ("fr".equals(locale)) { + yearAxis = "Ann\u00E9e"; + } + CategoryAxis categoryAxis = new CategoryAxis(yearAxis); categoryAxis.setCategoryMargin(0); categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90); // label horizontaux
participants (1)
-
chatellierï¼ users.labs.libre-entreprise.org