Author: chatellier Date: 2009-11-02 10:11:36 +0000 (Mon, 02 Nov 2009) New Revision: 2722 Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/entities/PopulationImpl.java isis-fish/trunk/src/main/java/fr/ifremer/isisfish/entities/PopulationSeasonInfoImpl.java Log: Restore previous mecanism (store i18n key non-translated) Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/entities/PopulationImpl.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/entities/PopulationImpl.java 2009-10-30 17:12:08 UTC (rev 2721) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/entities/PopulationImpl.java 2009-11-02 10:11:36 UTC (rev 2722) @@ -507,10 +507,10 @@ if (mat == null) { log.debug("Capturability is null, create new matrix"); mat = MatrixFactory.getInstance().create( - _("isisfish.population.capturability"), + n_("isisfish.population.capturability"), sems, - new String[] { _("isisfish.population.group"), - _("isisfish.population.season") }); + new String[] { n_("isisfish.population.group"), + n_("isisfish.population.season") }); // we don't call setCapturability because is better to create a valid // matrix when capturability is null instead check validity and // create new one and paste the old @@ -518,10 +518,10 @@ log.debug("Capturability has changed, create new matrix and copy old: " + mat.getSemantics() + " " + sems); MatrixND newmat = MatrixFactory.getInstance().create( - _("isisfish.population.capturability"), + n_("isisfish.population.capturability"), sems, - new String[] { _("isisfish.population.group"), - _("isisfish.population.season") }); + new String[] { n_("isisfish.population.group"), + n_("isisfish.population.season") }); boolean allNull = true; for (List l : mat.getSemantics()) { @@ -559,17 +559,17 @@ mat = MatrixFactory.getInstance().create( n_("isisfish.population.mappingZoneReproZoneRecru"), sems, - new String[] { _("isisfish.population.reproduction"), - _("isisfish.population.recruitment") }); + new String[] { n_("isisfish.population.reproduction"), + n_("isisfish.population.recruitment") }); // we don't call setMappingZoneReproZoneRecru because is better to create a valid // matrix when MappingZoneReproZoneRecru is null instead check validity and // create new one and paste the old } else if (!Arrays.equals(mat.getSemantics(), sems)) { MatrixND newmat = MatrixFactory.getInstance().create( - _("isisfish.population.mappingZoneReproZoneRecru"), + n_("isisfish.population.mappingZoneReproZoneRecru"), sems, - new String[] { _("isisfish.population.reproduction"), - _("isisfish.population.recruitment") }); + new String[] { n_("isisfish.population.reproduction"), + n_("isisfish.population.recruitment") }); newmat.paste(mat); mat = newmat; } @@ -588,7 +588,7 @@ int maxY = N.getDim(1); MatrixND result = MatrixFactory.getInstance().create( - _("isisfish.population.matrixAbundance1D"), + n_("isisfish.population.matrixAbundance1D"), new int[] { 1, maxX * maxY }); for (int x = 0; x < maxX; x++) { @@ -612,10 +612,10 @@ int nbZone = zones.size(); MatrixND result = MatrixFactory.getInstance().create( - _("isisfish.population.matrixAbundance"), + n_("isisfish.population.matrixAbundance"), new List[] { groups, zones }, - new String[] { _("isisfish.population.groups"), - _("isisfish.population.zones") }); + new String[] { n_("isisfish.population.groups"), + n_("isisfish.population.zones") }); try { int c = 0; Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/entities/PopulationSeasonInfoImpl.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/entities/PopulationSeasonInfoImpl.java 2009-10-30 17:12:08 UTC (rev 2721) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/entities/PopulationSeasonInfoImpl.java 2009-11-02 10:11:36 UTC (rev 2722) @@ -77,9 +77,9 @@ if (!months.equals(oldMonths)) { MatrixND tmp = MatrixFactory.getInstance().create( - _("isisfish.populationSeasonInfo.distributionSpawing"), + n_("isisfish.populationSeasonInfo.distributionSpawing"), new List[] { months }, - new String[] { _("isisfish.populationSeasonInfo.months") }); + new String[] { n_("isisfish.populationSeasonInfo.months") }); tmp.pasteSemantics(result); result = tmp; } @@ -107,23 +107,23 @@ if (mat == null) { mat = MatrixFactory.getInstance().create( - _("isisfish.populationSeasonInfo.migration"), + n_("isisfish.populationSeasonInfo.migration"), sems, new String[] { - _("isisfish.populationSeasonInfo.group"), - _("isisfish.populationSeasonInfo.departure"), - _("isisfish.populationSeasonInfo.arrival") }); + n_("isisfish.populationSeasonInfo.group"), + n_("isisfish.populationSeasonInfo.departure"), + n_("isisfish.populationSeasonInfo.arrival") }); // we don't call setCapturability because is better to create a valid // matrix when capturability is null instead check validity and // create new one and paste the old } else if (!Arrays.equals(mat.getSemantics(), sems)) { MatrixND newmat = MatrixFactory.getInstance().create( - _("isisfish.populationSeasonInfo.migration"), + n_("isisfish.populationSeasonInfo.migration"), sems, new String[] { - _("isisfish.populationSeasonInfo.group"), - _("isisfish.populationSeasonInfo.departure"), - _("isisfish.populationSeasonInfo.arrival") }); + n_("isisfish.populationSeasonInfo.group"), + n_("isisfish.populationSeasonInfo.departure"), + n_("isisfish.populationSeasonInfo.arrival") }); newmat.pasteSemantics(mat); mat = newmat; // perhaps call setCapturability, but if possible wait the user @@ -147,11 +147,11 @@ if (mat == null) { mat = MatrixFactory.getInstance().create( - _("isisfish.populationSeasonInfo.emigration"), + n_("isisfish.populationSeasonInfo.emigration"), sems, new String[] { - _("isisfish.populationSeasonInfo.group"), - _("isisfish.populationSeasonInfo.departure") }); + n_("isisfish.populationSeasonInfo.group"), + n_("isisfish.populationSeasonInfo.departure") }); // we don't call setCapturability because is better to create a valid // matrix when capturability is null instead check validity and // create new one and paste the old @@ -160,8 +160,8 @@ n_("isisfish.populationSeasonInfo.emigration"), sems, new String[] { - _("isisfish.populationSeasonInfo.group"), - _("isisfish.populationSeasonInfo.departure") }); + n_("isisfish.populationSeasonInfo.group"), + n_("isisfish.populationSeasonInfo.departure") }); newmat.pasteSemantics(mat); mat = newmat; // perhaps call setCapturability, but if possible wait the user @@ -185,11 +185,11 @@ if (mat == null) { mat = MatrixFactory.getInstance().create( - _("isisfish.populationSeasonInfo.immigration"), + n_("isisfish.populationSeasonInfo.immigration"), sems, new String[] { - _("isisfish.populationSeasonInfo.group"), - _("isisfish.populationSeasonInfo.arrival") }); + n_("isisfish.populationSeasonInfo.group"), + n_("isisfish.populationSeasonInfo.arrival") }); // we don't call setCapturability because is better to create a valid // matrix when capturability is null instead check validity and // create new one and paste the old @@ -198,8 +198,8 @@ n_("isisfish.populationSeasonInfo.immigration"), sems, new String[] { - _("isisfish.populationSeasonInfo.group"), - _("isisfish.populationSeasonInfo.arrival") }); + n_("isisfish.populationSeasonInfo.group"), + n_("isisfish.populationSeasonInfo.arrival") }); newmat.pasteSemantics(mat); mat = newmat; // perhaps call setCapturability, but if possible wait the user