This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git commit 51d4fbd6016c989a284620eafe7f2b0f9e78d627 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sun Aug 28 14:48:00 2016 +0200 Remove i18n from service api module... --- ...e-application-swing-decoration_en_GB.properties | 1 + ...e-application-swing-decoration_es_ES.properties | 1 + observe-application-swing/pom.xml | 2 + .../swing/ui/content/ContentUIInitializer.java | 2 +- .../ui/content/impl/seine/SetSeineUIHandler.java | 2 +- .../application/swing/ui/util/I18nEnumUtil.java | 101 +++++++++++++++++++++ .../ui/util/tripMap/TripMapContentBuilder.java | 2 +- .../observe-application-swing_en_GB.properties | 68 +++++++++++--- .../observe-application-swing_es_ES.properties | 68 +++++++++++--- .../observe-application-swing_fr_FR.properties | 34 +++++++ observe-services-api/pom.xml | 12 --- .../ConsolidateActivitySeineDataResult.java | 49 +++++----- .../fr/ird/observe/services/util/I18nEnumUtil.java | 99 -------------------- .../i18n/observe-services-api_en_GB.properties | 40 -------- .../i18n/observe-services-api_es_ES.properties | 40 -------- .../i18n/observe-services-api_fr_FR.properties | 40 -------- .../ConsolidateActivitySeineDataResultBuilder.java | 18 ++-- pom.xml | 7 +- 18 files changed, 288 insertions(+), 298 deletions(-) diff --git a/observe-application-swing-decoration/src/main/resources/i18n/observe-application-swing-decoration_en_GB.properties b/observe-application-swing-decoration/src/main/resources/i18n/observe-application-swing-decoration_en_GB.properties index 7400508..ba2e84d 100644 --- a/observe-application-swing-decoration/src/main/resources/i18n/observe-application-swing-decoration_en_GB.properties +++ b/observe-application-swing-decoration/src/main/resources/i18n/observe-application-swing-decoration_en_GB.properties @@ -25,6 +25,7 @@ observe.common.gear= observe.common.gearCaracteristic= observe.common.gearCaracteristicType= observe.common.gearUseFeaturesLongline= +observe.common.gearUseFeaturesMeasurementLongline= observe.common.gearUseFeaturesMeasurementSeine= observe.common.gearUseFeaturesSeine= observe.common.gender= diff --git a/observe-application-swing-decoration/src/main/resources/i18n/observe-application-swing-decoration_es_ES.properties b/observe-application-swing-decoration/src/main/resources/i18n/observe-application-swing-decoration_es_ES.properties index b82dc63..61b2e38 100644 --- a/observe-application-swing-decoration/src/main/resources/i18n/observe-application-swing-decoration_es_ES.properties +++ b/observe-application-swing-decoration/src/main/resources/i18n/observe-application-swing-decoration_es_ES.properties @@ -25,6 +25,7 @@ observe.common.gear= observe.common.gearCaracteristic= observe.common.gearCaracteristicType= observe.common.gearUseFeaturesLongline= +observe.common.gearUseFeaturesMeasurementLongline= observe.common.gearUseFeaturesMeasurementSeine= observe.common.gearUseFeaturesSeine= observe.common.gender= diff --git a/observe-application-swing/pom.xml b/observe-application-swing/pom.xml index b4bf07f..403d001 100644 --- a/observe-application-swing/pom.xml +++ b/observe-application-swing/pom.xml @@ -60,6 +60,8 @@ <i18n.bundleOutputName>${projectId}-i18n</i18n.bundleOutputName> <i18n.bundleCsvFile>${projectId}-i18n.csv</i18n.bundleCsvFile> <i18n.bundleCsvSeparator>|</i18n.bundleCsvSeparator> + <!-- FIXME remove this when i18n will be safe --> + <i18n.failsIfWarning>false</i18n.failsIfWarning> <!-- generate license bundled files --> <license.generateBundle>true</license.generateBundle> diff --git a/observe-application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIInitializer.java b/observe-application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIInitializer.java index 13dffdb..23e5b6d 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIInitializer.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIInitializer.java @@ -35,7 +35,7 @@ import fr.ird.observe.services.dto.Form; import fr.ird.observe.services.dto.IdDto; import fr.ird.observe.services.dto.referential.ReferentialDto; import fr.ird.observe.services.dto.referential.ReferentialReference; -import fr.ird.observe.services.util.I18nEnumUtil; +import fr.ird.observe.application.swing.ui.util.I18nEnumUtil; import fr.ird.observe.application.swing.ui.actions.shared.AbstractUIAction; import fr.ird.observe.application.swing.ui.util.BooleanEditor; import fr.ird.observe.application.swing.ui.util.tripMap.ObserveMapPane; diff --git a/observe-application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/SetSeineUIHandler.java b/observe-application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/SetSeineUIHandler.java index afa82ab..7d898ed 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/SetSeineUIHandler.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/SetSeineUIHandler.java @@ -35,7 +35,7 @@ import fr.ird.observe.services.dto.seine.SetSeineDto; import fr.ird.observe.services.dto.seine.SetSeineDtos; import fr.ird.observe.services.service.seine.RouteService; import fr.ird.observe.services.service.seine.SetSeineService; -import fr.ird.observe.services.util.I18nEnumUtil; +import fr.ird.observe.application.swing.ui.util.I18nEnumUtil; import fr.ird.observe.application.swing.ui.content.ContentMode; import fr.ird.observe.application.swing.ui.content.ContentUIHandler; import fr.ird.observe.application.swing.ui.content.ContentUIModel; diff --git a/observe-application-swing/src/main/java/fr/ird/observe/application/swing/ui/util/I18nEnumUtil.java b/observe-application-swing/src/main/java/fr/ird/observe/application/swing/ui/util/I18nEnumUtil.java new file mode 100644 index 0000000..8778375 --- /dev/null +++ b/observe-application-swing/src/main/java/fr/ird/observe/application/swing/ui/util/I18nEnumUtil.java @@ -0,0 +1,101 @@ +package fr.ird.observe.application.swing.ui.util; + +/*- + * #%L + * ObServe :: Services API + * %% + * Copyright (C) 2008 - 2016 IRD, Codelutin, Tony Chemit + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import java.beans.Introspector; +import java.util.Locale; + +import static org.nuiton.i18n.I18n.l; +import static org.nuiton.i18n.I18n.n; +import static org.nuiton.i18n.I18n.t; + +/** + * Pour gérer les traductions des énumérations (qu'elles viennent de la persistence ou du modèle de service). + * + * Created on 08/03/16. + * + * @author Tony Chemit - chemit@codelutin.com + */ +public class I18nEnumUtil { + + static { + + n("observe.enum.schoolType.undefined"); + n("observe.enum.schoolType.objet"); + n("observe.enum.schoolType.libre"); + + n("observe.enum.typeTransmittingBuoyOperation.pasDeBalise"); + n("observe.enum.typeTransmittingBuoyOperation.visite"); + n("observe.enum.typeTransmittingBuoyOperation.recuperation"); + n("observe.enum.typeTransmittingBuoyOperation.pose"); + n("observe.enum.typeTransmittingBuoyOperation.recuperationEtRemplacement"); + + n("observe.enum.ownership.unknown"); + n("observe.enum.ownership.ceVessel"); + n("observe.enum.ownership.autreVessel"); + + n("observe.enum.nonTargetCatchComputedValueSource.fromData"); + n("observe.enum.nonTargetCatchComputedValueSource.fromSample"); + n("observe.enum.nonTargetCatchComputedValueSource.fromReferentiel"); + + n("observe.enum.gearType.longline"); + n("observe.enum.gearType.seine"); + + n("observe.enum.referenceStatus.enabled"); + n("observe.enum.referenceStatus.disabled"); + + n("observe.enum.tripMapPointType.seineDepartureHarbour"); + n("observe.enum.tripMapPointType.seineLandingHarbour"); + n("observe.enum.tripMapPointType.seineActivity"); + n("observe.enum.tripMapPointType.seineActivityInHarbour"); + n("observe.enum.tripMapPointType.seineActivityWithFreeSchoolType"); + n("observe.enum.tripMapPointType.seineActivityWithObjectSchoolType"); + n("observe.enum.tripMapPointType.longlineActivity"); + n("observe.enum.tripMapPointType.longlineDepartureHarbour"); + n("observe.enum.tripMapPointType.longlineLandingHarbour"); + n("observe.enum.tripMapPointType.longlineActivityInHarbour"); + n("observe.enum.tripMapPointType.longlineActivityWithSettingStart"); + n("observe.enum.tripMapPointType.longlineActivityWithSettingEnd"); + n("observe.enum.tripMapPointType.longlineActivityWithHaulingStart"); + n("observe.enum.tripMapPointType.longlineActivityWithHaulingEnd"); + n("observe.enum.tripMapPointType.longlineActivityWithInteraction"); + n("observe.enum.tripMapPointType.longlineActivityWithStation"); + + } + + public static <E extends Enum<E>> String getLabel(E e) { + return t(getLabelKey(e)); + } + + public static <E extends Enum<E>> String getLabel(Locale locale, E e) { + return l(locale, getLabelKey(e)); + } + + protected static <E extends Enum<E>> String getLabelKey(E e) { + String simpleName = e.getClass().getSimpleName(); + simpleName = simpleName.replace("Persist", ""); + + return "observe.enum." + Introspector.decapitalize(simpleName) + "." + e.name(); + } + +} diff --git a/observe-application-swing/src/main/java/fr/ird/observe/application/swing/ui/util/tripMap/TripMapContentBuilder.java b/observe-application-swing/src/main/java/fr/ird/observe/application/swing/ui/util/tripMap/TripMapContentBuilder.java index 52582be..42b8786 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/application/swing/ui/util/tripMap/TripMapContentBuilder.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/application/swing/ui/util/tripMap/TripMapContentBuilder.java @@ -33,7 +33,7 @@ import com.vividsolutions.jts.geom.Polygon; import fr.ird.observe.application.swing.ObserveSwingTechnicalException; import fr.ird.observe.services.dto.TripMapPointDto; import fr.ird.observe.services.dto.constants.TripMapPointType; -import fr.ird.observe.services.util.I18nEnumUtil; +import fr.ird.observe.application.swing.ui.util.I18nEnumUtil; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.time.DateUtils; import org.geotools.data.FileDataStore; diff --git a/observe-application-swing/src/main/resources/i18n/observe-application-swing_en_GB.properties b/observe-application-swing/src/main/resources/i18n/observe-application-swing_en_GB.properties index 612c9b8..64696e0 100644 --- a/observe-application-swing/src/main/resources/i18n/observe-application-swing_en_GB.properties +++ b/observe-application-swing/src/main/resources/i18n/observe-application-swing_en_GB.properties @@ -66,6 +66,7 @@ observe.action.copy.column.headers= observe.action.copy.column.headers.tip= observe.action.copy.row.headers= observe.action.copy.row.headers.tip= +observe.action.copy.to.clipBoard= observe.action.create=Create observe.action.db.locale.es.tip=Change database language in spanish observe.action.db.locale.fr.tip=Change database language in french @@ -306,7 +307,16 @@ observe.actions.validate.config.report= observe.actions.validate.continue.with.no.save.report= observe.actions.validate.description= observe.actions.validate.invalid.data.list= +observe.actions.validate.message.detected= observe.actions.validate.message.list= +observe.actions.validate.message.no.validation.detected= +observe.actions.validate.message.not.save.report= +observe.actions.validate.message.nothing.to.do= +observe.actions.validate.message.operation.done= +observe.actions.validate.message.operation.needFix= +observe.actions.validate.message.prepare.validators= +observe.actions.validate.message.save.report= +observe.actions.validate.message.use.storage= observe.actions.validate.model.type.all= observe.actions.validate.model.type.all.description= observe.actions.validate.model.type.data= @@ -330,14 +340,12 @@ observe.actions.validate.step.description= observe.actions.validate.title=Validate datas observe.actions.validate.title.choose.report.directory= observe.actions.validate.title.tip=Validate datas of a storage -observe.actions.validate.message.detected= -observe.actions.validate.message.not.save.report= -observe.actions.validate.message.nothing.to.do= -observe.actions.validate.message.operation.done= -observe.actions.validate.message.operation.needFix= -observe.actions.validate.message.prepare.validators= -observe.actions.validate.message.save.report= -observe.actions.validate.message.use.storage= +observe.actions.validate.validator.field.header= +observe.actions.validate.validator.field.header.tip= +observe.actions.validate.validator.message.header= +observe.actions.validate.validator.message.header.tip= +observe.actions.validate.validator.scope.header= +observe.actions.validate.validator.scope.header.tip= observe.admin.resume.no.operation.done= observe.admin.resume.operation.canceled= observe.admin.resume.operation.done= @@ -824,12 +832,10 @@ observe.content.action.mitigationType.delete.tip= observe.content.action.mitigationType.detail.tip= observe.content.action.mitigationType.modify.tip= observe.content.action.mitigationType.save.tip= -observe.content.action.move.activities= observe.content.action.move.activities.longline= observe.content.action.move.activities.longline.tip= observe.content.action.move.activities.seine= observe.content.action.move.activities.seine.tip= -observe.content.action.move.activities.tip= observe.content.action.move.routes= observe.content.action.move.routes.tip= observe.content.action.move.trips= @@ -1794,7 +1800,44 @@ observe.content.type.referential= observe.content.vessel.tab.general=General caracteristics observe.content.vessel.tab.other=Other caracteristics observe.content.weightMeasure.delete.message=Confirm to delete current weight measure. +observe.converter.error.float.format= +observe.converter.error.no.convertor= +observe.converter.error.noValue= observe.entity.message.updating= +observe.enum.gearType.longline=Longline gear type +observe.enum.gearType.seine=Senne gear type +observe.enum.nonTargetCatchComputedValueSource.fromData=Computed from data +observe.enum.nonTargetCatchComputedValueSource.fromReferentiel=Computed from referential +observe.enum.nonTargetCatchComputedValueSource.fromSample=Computed from samples +observe.enum.ownership.autreVessel=Other vessel +observe.enum.ownership.ceVessel=This vessel +observe.enum.ownership.unknown=Unknown +observe.enum.referenceStatus.disabled=Disabled +observe.enum.referenceStatus.enabled=Enabled +observe.enum.schoolType.libre=Free school type +observe.enum.schoolType.objet=Object school type +observe.enum.schoolType.undefined=Undefined school type +observe.enum.tripMapPointType.longlineActivity=Activity +observe.enum.tripMapPointType.longlineActivityInHarbour=Au Harbour +observe.enum.tripMapPointType.longlineActivityWithHaulingEnd=Hauling end +observe.enum.tripMapPointType.longlineActivityWithHaulingStart=Hauling start +observe.enum.tripMapPointType.longlineActivityWithInteraction=Encounter +observe.enum.tripMapPointType.longlineActivityWithSettingEnd=Setting end +observe.enum.tripMapPointType.longlineActivityWithSettingStart=Setting start +observe.enum.tripMapPointType.longlineActivityWithStation=Station +observe.enum.tripMapPointType.longlineDepartureHarbour=Harbour departure +observe.enum.tripMapPointType.longlineLandingHarbour=Harbour landing +observe.enum.tripMapPointType.seineActivity=Activity +observe.enum.tripMapPointType.seineActivityInHarbour=In harbour +observe.enum.tripMapPointType.seineActivityWithFreeSchoolType=Free School type +observe.enum.tripMapPointType.seineActivityWithObjectSchoolType=Object School type +observe.enum.tripMapPointType.seineDepartureHarbour=Harbour departure +observe.enum.tripMapPointType.seineLandingHarbour=Harbour landing +observe.enum.typeTransmittingBuoyOperation.pasDeBalise=No Beacon +observe.enum.typeTransmittingBuoyOperation.pose=Posing +observe.enum.typeTransmittingBuoyOperation.recuperation=Grab +observe.enum.typeTransmittingBuoyOperation.recuperationEtRemplacement=Grab and change +observe.enum.typeTransmittingBuoyOperation.visite=Visit observe.error.can.not.create.directory= observe.error.no.activity.6= observe.error.storage.could.not.backup.unsane.local.db= @@ -1845,7 +1888,6 @@ observe.message.no.route.for.maree= observe.message.no.species.selected= observe.message.no.trip.for.program= observe.message.no.usage.for.entity= -observe.actions.validate.message.no.validation.detected= observe.message.quit.invalid.edit= observe.message.quit.valid.edit= observe.message.referentiel.editable= @@ -2217,9 +2259,11 @@ observe.tree.vesselType=Boat type observe.tree.weightCategory=Weight category observe.tree.weightMeasureType=Weight measure type observe.tree.wind=Wind +observe.validator.field.tip= +observe.validator.message.tip= +observe.validator.scope.tip= observe.view.message=Messages observe.view.navigation=Navigation observe.view.server= observe.warning.nimbus.landf=Could not use Look and Fell Nimbus, need at least version 1.6u10 of java. observe.warning.no.ui=No gui environment found -observe.action.copy.to.clipBoard= \ No newline at end of file diff --git a/observe-application-swing/src/main/resources/i18n/observe-application-swing_es_ES.properties b/observe-application-swing/src/main/resources/i18n/observe-application-swing_es_ES.properties index 601d9e2..1c2656e 100644 --- a/observe-application-swing/src/main/resources/i18n/observe-application-swing_es_ES.properties +++ b/observe-application-swing/src/main/resources/i18n/observe-application-swing_es_ES.properties @@ -66,6 +66,7 @@ observe.action.copy.column.headers=Copiar los encabezados de columnas observe.action.copy.column.headers.tip=Añadir al resultado las cabeceras de columna observe.action.copy.row.headers=Copiar las cabeceras de linea observe.action.copy.row.headers.tip=Añadir al resultado las cabeceras de linea (ej. la primera columna) +observe.action.copy.to.clipBoard= observe.action.create=Crear observe.action.db.locale.es.tip=Cambia el idioma del referencial al español observe.action.db.locale.fr.tip=Cambiar el idioma del referencial al francés @@ -306,7 +307,16 @@ observe.actions.validate.config.report=Informe de validación observe.actions.validate.continue.with.no.save.report=Continuar sin guardar el informe observe.actions.validate.description= observe.actions.validate.invalid.data.list= +observe.actions.validate.message.detected=Se ha encontrado el validador para el tipo %1$s observe.actions.validate.message.list= +observe.actions.validate.message.no.validation.detected=Ningún validador encontrado. +observe.actions.validate.message.not.save.report=No hay informe que guardar. +observe.actions.validate.message.nothing.to.do=Los datos son válidos y no necesitan corrección. +observe.actions.validate.message.operation.done=Ha terminado la operación de validación de %1$td/%1$tm/%1$tY à %1$tH\:%1$tM\:%1$ts. +observe.actions.validate.message.operation.needFix=Los datos no son válidos y necesitan ser corregidos. +observe.actions.validate.message.prepare.validators=Detección de validadores +observe.actions.validate.message.save.report=El informe de validación se ha guardado en el archivo %1$s +observe.actions.validate.message.use.storage=Se realizará la validación de %1$s observe.actions.validate.model.type.all=Datos y referenciales observe.actions.validate.model.type.all.description=Datos y referenciales observe.actions.validate.model.type.data=Datos del observador @@ -330,14 +340,12 @@ observe.actions.validate.step.description= observe.actions.validate.title= observe.actions.validate.title.choose.report.directory= observe.actions.validate.title.tip= -observe.actions.validate.message.detected=Se ha encontrado el validador para el tipo %1$s -observe.actions.validate.message.not.save.report=No hay informe que guardar. -observe.actions.validate.message.nothing.to.do=Los datos son válidos y no necesitan corrección. -observe.actions.validate.message.operation.done=Ha terminado la operación de validación de %1$td/%1$tm/%1$tY à %1$tH\:%1$tM\:%1$ts. -observe.actions.validate.message.operation.needFix=Los datos no son válidos y necesitan ser corregidos. -observe.actions.validate.message.prepare.validators=Detección de validadores -observe.actions.validate.message.save.report=El informe de validación se ha guardado en el archivo %1$s -observe.actions.validate.message.use.storage=Se realizará la validación de %1$s +observe.actions.validate.validator.field.header= +observe.actions.validate.validator.field.header.tip= +observe.actions.validate.validator.message.header= +observe.actions.validate.validator.message.header.tip= +observe.actions.validate.validator.scope.header= +observe.actions.validate.validator.scope.header.tip= observe.admin.resume.no.operation.done=Ninguna operación realizada observe.admin.resume.operation.canceled=operación cancelada observe.admin.resume.operation.done=operacion realizada @@ -824,12 +832,10 @@ observe.content.action.mitigationType.delete.tip= observe.content.action.mitigationType.detail.tip= observe.content.action.mitigationType.modify.tip= observe.content.action.mitigationType.save.tip= -observe.content.action.move.activities= observe.content.action.move.activities.longline= observe.content.action.move.activities.longline.tip= observe.content.action.move.activities.seine= observe.content.action.move.activities.seine.tip= -observe.content.action.move.activities.tip= observe.content.action.move.routes= observe.content.action.move.routes.tip= observe.content.action.move.trips= @@ -1794,7 +1800,44 @@ observe.content.type.referential= observe.content.vessel.tab.general= observe.content.vessel.tab.other= observe.content.weightMeasure.delete.message= +observe.converter.error.float.format= +observe.converter.error.no.convertor= +observe.converter.error.noValue= observe.entity.message.updating=Se está modificando el objeto actual '%1$s'. +observe.enum.gearType.longline=Palangre +observe.enum.gearType.seine=Senne +observe.enum.nonTargetCatchComputedValueSource.fromData=Calculado a partir de otros datos +observe.enum.nonTargetCatchComputedValueSource.fromReferentiel=Calculado a partir del Referencial +observe.enum.nonTargetCatchComputedValueSource.fromSample=Calculado a partir de las muestras +observe.enum.ownership.autreVessel=Barco ajeno +observe.enum.ownership.ceVessel=Este barco o un barco del mismo armador +observe.enum.ownership.unknown=Desconocido +observe.enum.referenceStatus.disabled= +observe.enum.referenceStatus.enabled= +observe.enum.schoolType.libre=Banco libre +observe.enum.schoolType.objet=Banco a objeto +observe.enum.schoolType.undefined=Banco indeterminado +observe.enum.tripMapPointType.longlineActivity=Activity +observe.enum.tripMapPointType.longlineActivityInHarbour=Au Harbour +observe.enum.tripMapPointType.longlineActivityWithHaulingEnd=Hauling end +observe.enum.tripMapPointType.longlineActivityWithHaulingStart=Hauling start +observe.enum.tripMapPointType.longlineActivityWithInteraction=Encounter +observe.enum.tripMapPointType.longlineActivityWithSettingEnd=Setting end +observe.enum.tripMapPointType.longlineActivityWithSettingStart=Setting start +observe.enum.tripMapPointType.longlineActivityWithStation=Station +observe.enum.tripMapPointType.longlineDepartureHarbour=Harbour departure +observe.enum.tripMapPointType.longlineLandingHarbour=Harbour landing +observe.enum.tripMapPointType.seineActivity=Activity +observe.enum.tripMapPointType.seineActivityInHarbour=In harbour +observe.enum.tripMapPointType.seineActivityWithFreeSchoolType=Banco libre +observe.enum.tripMapPointType.seineActivityWithObjectSchoolType=Banco a objeto +observe.enum.tripMapPointType.seineDepartureHarbour=Harbour departure +observe.enum.tripMapPointType.seineLandingHarbour=Harbour landing +observe.enum.typeTransmittingBuoyOperation.pasDeBalise=DCP sin balizar +observe.enum.typeTransmittingBuoyOperation.pose=Colocación de nueva baliza +observe.enum.typeTransmittingBuoyOperation.recuperation=Recogida de baliza sin regreso al agua +observe.enum.typeTransmittingBuoyOperation.recuperationEtRemplacement=Recuperación y colocación de una nueva baliza +observe.enum.typeTransmittingBuoyOperation.visite=Visita a la baliza observe.error.can.not.create.directory=¡Imposible crear el directorio %1$s\! observe.error.no.activity.6=La actividad con código 6 no se ha encontrado en la base de datos. observe.error.storage.could.not.backup.unsane.local.db= @@ -1845,7 +1888,6 @@ observe.message.no.route.for.maree=Ninguna ruta en la marea actual observe.message.no.species.selected=Ninguna especie seleccionada observe.message.no.trip.for.program=Ninguna marea para el programa actual observe.message.no.usage.for.entity=Ningún usuario encontrado. -observe.actions.validate.message.no.validation.detected=Ningún validador encontrado. observe.message.quit.invalid.edit=¡Datos no validos, no se pueden guardar\!\n\nNota\: Si continúa se cancelarán todas las modificaciones. observe.message.quit.valid.edit=¡Los datos han sido modificados y son válidos\! observe.message.referentiel.editable=El referencial es editable. @@ -2217,9 +2259,11 @@ observe.tree.vesselType=Pesquería observe.tree.weightCategory=Categoría de peso observe.tree.weightMeasureType= observe.tree.wind=Fuerza del viento +observe.validator.field.tip= +observe.validator.message.tip= +observe.validator.scope.tip= observe.view.message= observe.view.navigation= observe.view.server= observe.warning.nimbus.landf= observe.warning.no.ui= -observe.action.copy.to.clipBoard= diff --git a/observe-application-swing/src/main/resources/i18n/observe-application-swing_fr_FR.properties b/observe-application-swing/src/main/resources/i18n/observe-application-swing_fr_FR.properties index b83eea0..47cd21f 100644 --- a/observe-application-swing/src/main/resources/i18n/observe-application-swing_fr_FR.properties +++ b/observe-application-swing/src/main/resources/i18n/observe-application-swing_fr_FR.properties @@ -1804,6 +1804,40 @@ observe.converter.error.float.format=Format de décimal incorrecte pour la valeu observe.converter.error.no.convertor=Impossible de convertir le décimal %s depuis le convertisseur %s observe.converter.error.noValue=Aucune valeur à convertir pour le convertisseur %s observe.entity.message.updating=L'objet '%1$s' est en cours de modification. +observe.enum.gearType.longline=longline +observe.enum.gearType.seine=Seine +observe.enum.nonTargetCatchComputedValueSource.fromData=calculé à partir des autres données +observe.enum.nonTargetCatchComputedValueSource.fromReferentiel=calculé à partir du référentiel +observe.enum.nonTargetCatchComputedValueSource.fromSample=calculé à partir des échantillons +observe.enum.ownership.autreVessel=Navire d'un autre armement +observe.enum.ownership.ceVessel=Ce navire ou cet armement +observe.enum.ownership.unknown=Inconnue +observe.enum.referenceStatus.disabled=Désactivé +observe.enum.referenceStatus.enabled=Actif +observe.enum.schoolType.libre=Banc libre +observe.enum.schoolType.objet=Banc objet +observe.enum.schoolType.undefined=Banc indéterminé +observe.enum.tripMapPointType.longlineActivity=point d'activité +observe.enum.tripMapPointType.longlineActivityInHarbour=Au port +observe.enum.tripMapPointType.longlineActivityWithHaulingEnd=Fin de virage +observe.enum.tripMapPointType.longlineActivityWithHaulingStart=Début de virage +observe.enum.tripMapPointType.longlineActivityWithInteraction=Rencontre +observe.enum.tripMapPointType.longlineActivityWithSettingEnd=Fin de filage +observe.enum.tripMapPointType.longlineActivityWithSettingStart=Début de filage +observe.enum.tripMapPointType.longlineActivityWithStation=Station océanographique +observe.enum.tripMapPointType.longlineDepartureHarbour=Port de départ +observe.enum.tripMapPointType.longlineLandingHarbour=Port d'arrivée +observe.enum.tripMapPointType.seineActivity=point d'activité +observe.enum.tripMapPointType.seineActivityInHarbour=Au port +observe.enum.tripMapPointType.seineActivityWithFreeSchoolType=Banc libre +observe.enum.tripMapPointType.seineActivityWithObjectSchoolType=Banc objet +observe.enum.tripMapPointType.seineDepartureHarbour=Port de départ +observe.enum.tripMapPointType.seineLandingHarbour=Port d'arrivée +observe.enum.typeTransmittingBuoyOperation.pasDeBalise=Pas de balise liée au DCP +observe.enum.typeTransmittingBuoyOperation.pose=Pose d'une nouvelle balise +observe.enum.typeTransmittingBuoyOperation.recuperation=Récupération d'une balise sans remise à l'eau +observe.enum.typeTransmittingBuoyOperation.recuperationEtRemplacement=Récupération et pose d'une nouvelle balise +observe.enum.typeTransmittingBuoyOperation.visite=Simple visite de la balise observe.error.can.not.create.directory=Création du répertoire %1$s impossible\! observe.error.no.activity.6=L'activité de type 6 n'a pas été trouvée en base. observe.error.storage.could.not.backup.unsane.local.db=Impossible d'enregistrer une base non endommagée diff --git a/observe-services-api/pom.xml b/observe-services-api/pom.xml index 909ead0..fc8a592 100644 --- a/observe-services-api/pom.xml +++ b/observe-services-api/pom.xml @@ -119,18 +119,6 @@ </testResources> <plugins> <plugin> - <groupId>org.nuiton.i18n</groupId> - <artifactId>i18n-maven-plugin</artifactId> - <executions> - <execution> - <goals> - <goal>parserJava</goal> - <goal>gen</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> diff --git a/observe-services-api/src/main/java/fr/ird/observe/services/service/actions/consolidate/ConsolidateActivitySeineDataResult.java b/observe-services-api/src/main/java/fr/ird/observe/services/service/actions/consolidate/ConsolidateActivitySeineDataResult.java index cf15f73..6dc846a 100644 --- a/observe-services-api/src/main/java/fr/ird/observe/services/service/actions/consolidate/ConsolidateActivitySeineDataResult.java +++ b/observe-services-api/src/main/java/fr/ird/observe/services/service/actions/consolidate/ConsolidateActivitySeineDataResult.java @@ -24,6 +24,7 @@ package fr.ird.observe.services.service.actions.consolidate; import com.google.common.collect.ImmutableSet; import fr.ird.observe.services.dto.ObserveDto; +import fr.ird.observe.services.dto.constants.seine.SchoolType; import java.io.Serializable; @@ -50,15 +51,15 @@ public class ConsolidateActivitySeineDataResult implements Serializable,ObserveD */ protected String activitySeineLabel; - /** - * L'ancien type de banc (si le type de banc a été modifié). - */ - protected String oldSchoolType; - - /** - * Le nouveau type de banc (s'il a été modifié). - */ - protected String newSchoolType; +// /** +// * L'ancien type de banc (si le type de banc a été modifié). +// */ +// protected String oldSchoolType; +// +// /** +// * Le nouveau type de banc (s'il a été modifié). +// */ +// protected String newSchoolType; /** * L'ensemble des modifications sur les échantillons cibles. @@ -74,6 +75,8 @@ public class ConsolidateActivitySeineDataResult implements Serializable,ObserveD * L'ensemble des modifications sur les captures non cibles. */ protected ImmutableSet<NonTargetCatchModification> nonTargetCatchModifications; + private SchoolType oldSchoolType; + private SchoolType newSchoolType; public String getActivitySeineId() { return activitySeineId; @@ -83,18 +86,6 @@ public class ConsolidateActivitySeineDataResult implements Serializable,ObserveD return activitySeineLabel; } - public boolean isSchoolTypeModified() { - return newSchoolType != null; - } - - public String getOldSchoolType() { - return oldSchoolType; - } - - public String getNewSchoolType() { - return newSchoolType; - } - public ImmutableSet<TargetLengthModification> getTargetLengthModifications() { return targetLengthModifications; } @@ -107,6 +98,14 @@ public class ConsolidateActivitySeineDataResult implements Serializable,ObserveD return nonTargetCatchModifications; } + public SchoolType getOldSchoolType() { + return oldSchoolType; + } + + public SchoolType getNewSchoolType() { + return newSchoolType; + } + public static class TargetLengthModification implements Serializable { private static final long serialVersionUID = 1L; @@ -179,8 +178,6 @@ public class ConsolidateActivitySeineDataResult implements Serializable,ObserveD protected Number newValue; - protected String computeValueSource; - public String getNonTargetCatchId() { return nonTargetCatchId; } @@ -197,10 +194,6 @@ public class ConsolidateActivitySeineDataResult implements Serializable,ObserveD return newValue; } - public String getComputeValueSource() { - return computeValueSource; - } - } void setActivitySeineId(String activitySeineId) { @@ -211,7 +204,7 @@ public class ConsolidateActivitySeineDataResult implements Serializable,ObserveD this.activitySeineLabel = activitySeineLabel; } - void setSchoolTypeChanged(String oldSchoolType, String newSchoolType) { + void setSchoolTypeChanged(SchoolType oldSchoolType, SchoolType newSchoolType) { this.oldSchoolType = oldSchoolType; this.newSchoolType = newSchoolType; } diff --git a/observe-services-api/src/main/java/fr/ird/observe/services/util/I18nEnumUtil.java b/observe-services-api/src/main/java/fr/ird/observe/services/util/I18nEnumUtil.java deleted file mode 100644 index 8c0a99f..0000000 --- a/observe-services-api/src/main/java/fr/ird/observe/services/util/I18nEnumUtil.java +++ /dev/null @@ -1,99 +0,0 @@ -package fr.ird.observe.services.util; - -/*- - * #%L - * ObServe :: Services API - * %% - * Copyright (C) 2008 - 2016 IRD, Codelutin, Tony Chemit - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. - * #L% - */ - -import java.util.Locale; - -import static org.nuiton.i18n.I18n.l; -import static org.nuiton.i18n.I18n.n; -import static org.nuiton.i18n.I18n.t; - -/** - * Pour gérer les traductions des énumérations (qu'elles viennent de la persistence ou du modèle de service). - * - * Created on 08/03/16. - * - * @author Tony Chemit - chemit@codelutin.com - */ -public class I18nEnumUtil { - - static { - n("observe.service.enum.schoolType.undefined"); - n("observe.service.enum.schoolType.objet"); - n("observe.service.enum.schoolType.libre"); - - n("observe.service.enum.typeTransmittingBuoyOperation.pasDeBalise"); - n("observe.service.enum.typeTransmittingBuoyOperation.visite"); - n("observe.service.enum.typeTransmittingBuoyOperation.recuperation"); - n("observe.service.enum.typeTransmittingBuoyOperation.pose"); - n("observe.service.enum.typeTransmittingBuoyOperation.recuperationEtRemplacement"); - - n("observe.service.enum.ownership.unknown"); - n("observe.service.enum.ownership.ceVessel"); - n("observe.service.enum.ownership.autreVessel"); - - n("observe.service.enum.nonTargetCatchComputedValueSource.fromData"); - n("observe.service.enum.nonTargetCatchComputedValueSource.fromSample"); - n("observe.service.enum.nonTargetCatchComputedValueSource.fromReferentiel"); - - n("observe.service.enum.gearType.longline"); - n("observe.service.enum.gearType.seine"); - - n("observe.service.enum.referenceStatus.enabled"); - n("observe.service.enum.referenceStatus.disabled"); - - n("observe.service.enum.tripMapPointType.seineDepartureHarbour"); - n("observe.service.enum.tripMapPointType.seineLandingHarbour"); - n("observe.service.enum.tripMapPointType.seineActivity"); - n("observe.service.enum.tripMapPointType.seineActivityInHarbour"); - n("observe.service.enum.tripMapPointType.seineActivityWithFreeSchoolType"); - n("observe.service.enum.tripMapPointType.seineActivityWithObjectSchoolType"); - n("observe.service.enum.tripMapPointType.longlineActivity"); - n("observe.service.enum.tripMapPointType.longlineDepartureHarbour"); - n("observe.service.enum.tripMapPointType.longlineLandingHarbour"); - n("observe.service.enum.tripMapPointType.longlineActivityInHarbour"); - n("observe.service.enum.tripMapPointType.longlineActivityWithSettingStart"); - n("observe.service.enum.tripMapPointType.longlineActivityWithSettingEnd"); - n("observe.service.enum.tripMapPointType.longlineActivityWithHaulingStart"); - n("observe.service.enum.tripMapPointType.longlineActivityWithHaulingEnd"); - n("observe.service.enum.tripMapPointType.longlineActivityWithInteraction"); - n("observe.service.enum.tripMapPointType.longlineActivityWithStation"); - - } - - public static <E extends Enum<E>> String getLabel(E e) { - return t(getLabelKey(e)); - } - - public static <E extends Enum<E>> String getLabel(Locale locale, E e) { - return l(locale, getLabelKey(e)); - } - - protected static <E extends Enum<E>> String getLabelKey(E e) { - String simpleName = e.getClass().getSimpleName(); - simpleName = simpleName.replace("Persist", ""); - - return "observe.service.enum." + simpleName + "." + e.name(); - } - -} diff --git a/observe-services-api/src/main/resources/i18n/observe-services-api_en_GB.properties b/observe-services-api/src/main/resources/i18n/observe-services-api_en_GB.properties deleted file mode 100644 index 5adb0f9..0000000 --- a/observe-services-api/src/main/resources/i18n/observe-services-api_en_GB.properties +++ /dev/null @@ -1,40 +0,0 @@ -observe.service.enum.gearType.longline=Longline gear type -observe.service.enum.gearType.seine=Senne gear type -observe.service.enum.nonTargetCatchComputedValueSource.fromData=Computed from data -observe.service.enum.nonTargetCatchComputedValueSource.fromReferentiel=Computed from referential -observe.service.enum.nonTargetCatchComputedValueSource.fromSample=Computed from samples -observe.service.enum.ownership.autreVessel=Other vessel -observe.service.enum.ownership.ceVessel=This vessel -observe.service.enum.ownership.unknown=Unknown -observe.service.enum.referenceStatus.disabled=Disabled -observe.service.enum.referenceStatus.enabled=Enabled -observe.service.enum.schoolType.libre=Free school type -observe.service.enum.schoolType.objet=Object school type -observe.service.enum.schoolType.undefined=Undefined school type -observe.service.enum.synchro.referential.mode.both=Bi-directional -observe.service.enum.synchro.referential.mode.both.description=To authorize modifications of data in both data sources -observe.service.enum.synchro.referential.mode.fromLeftToRight=From left to right -observe.service.enum.synchro.referential.mode.fromLeftToRight.description=To authorize modifications only in right data source -observe.service.enum.synchro.referential.mode.fromRightToLeft=From right to left -observe.service.enum.synchro.referential.mode.fromRightToLeft.description=To authorize modifications only in left data source -observe.service.enum.tripMapPointType.longlineActivity=Activity -observe.service.enum.tripMapPointType.longlineActivityInHarbour=Au Harbour -observe.service.enum.tripMapPointType.longlineActivityWithHaulingEnd=Hauling end -observe.service.enum.tripMapPointType.longlineActivityWithHaulingStart=Hauling start -observe.service.enum.tripMapPointType.longlineActivityWithInteraction=Encounter -observe.service.enum.tripMapPointType.longlineActivityWithSettingEnd=Setting end -observe.service.enum.tripMapPointType.longlineActivityWithSettingStart=Setting start -observe.service.enum.tripMapPointType.longlineActivityWithStation=Station -observe.service.enum.tripMapPointType.longlineDepartureHarbour=Harbour departure -observe.service.enum.tripMapPointType.longlineLandingHarbour=Harbour landing -observe.service.enum.tripMapPointType.seineActivity=Activity -observe.service.enum.tripMapPointType.seineActivityInHarbour=In harbour -observe.service.enum.tripMapPointType.seineActivityWithFreeSchoolType=Free School type -observe.service.enum.tripMapPointType.seineActivityWithObjectSchoolType=Object School type -observe.service.enum.tripMapPointType.seineDepartureHarbour=Harbour departure -observe.service.enum.tripMapPointType.seineLandingHarbour=Harbour landing -observe.service.enum.typeTransmittingBuoyOperation.pasDeBalise=No Beacon -observe.service.enum.typeTransmittingBuoyOperation.pose=Posing -observe.service.enum.typeTransmittingBuoyOperation.recuperation=Grab -observe.service.enum.typeTransmittingBuoyOperation.recuperationEtRemplacement=Grab and change -observe.service.enum.typeTransmittingBuoyOperation.visite=Visit diff --git a/observe-services-api/src/main/resources/i18n/observe-services-api_es_ES.properties b/observe-services-api/src/main/resources/i18n/observe-services-api_es_ES.properties deleted file mode 100644 index 1af2f22..0000000 --- a/observe-services-api/src/main/resources/i18n/observe-services-api_es_ES.properties +++ /dev/null @@ -1,40 +0,0 @@ -observe.service.enum.gearType.longline=Palangre -observe.service.enum.gearType.seine=Senne -observe.service.enum.nonTargetCatchComputedValueSource.fromData=Calculado a partir de otros datos -observe.service.enum.nonTargetCatchComputedValueSource.fromReferentiel=Calculado a partir del Referencial -observe.service.enum.nonTargetCatchComputedValueSource.fromSample=Calculado a partir de las muestras -observe.service.enum.ownership.autreVessel=Barco ajeno -observe.service.enum.ownership.ceVessel=Este barco o un barco del mismo armador -observe.service.enum.ownership.unknown=Desconocido -observe.service.enum.referenceStatus.disabled= -observe.service.enum.referenceStatus.enabled= -observe.service.enum.schoolType.libre=Banco libre -observe.service.enum.schoolType.objet=Banco a objeto -observe.service.enum.schoolType.undefined=Banco indeterminado -observe.service.enum.synchro.referential.mode.both= -observe.service.enum.synchro.referential.mode.both.description= -observe.service.enum.synchro.referential.mode.fromLeftToRight= -observe.service.enum.synchro.referential.mode.fromLeftToRight.description= -observe.service.enum.synchro.referential.mode.fromRightToLeft= -observe.service.enum.synchro.referential.mode.fromRightToLeft.description= -observe.service.enum.tripMapPointType.longlineActivity=Activity -observe.service.enum.tripMapPointType.longlineActivityInHarbour=Au Harbour -observe.service.enum.tripMapPointType.longlineActivityWithHaulingEnd=Hauling end -observe.service.enum.tripMapPointType.longlineActivityWithHaulingStart=Hauling start -observe.service.enum.tripMapPointType.longlineActivityWithInteraction=Encounter -observe.service.enum.tripMapPointType.longlineActivityWithSettingEnd=Setting end -observe.service.enum.tripMapPointType.longlineActivityWithSettingStart=Setting start -observe.service.enum.tripMapPointType.longlineActivityWithStation=Station -observe.service.enum.tripMapPointType.longlineDepartureHarbour=Harbour departure -observe.service.enum.tripMapPointType.longlineLandingHarbour=Harbour landing -observe.service.enum.tripMapPointType.seineActivity=Activity -observe.service.enum.tripMapPointType.seineActivityInHarbour=In harbour -observe.service.enum.tripMapPointType.seineActivityWithFreeSchoolType=Banco libre -observe.service.enum.tripMapPointType.seineActivityWithObjectSchoolType=Banco a objeto -observe.service.enum.tripMapPointType.seineDepartureHarbour=Harbour departure -observe.service.enum.tripMapPointType.seineLandingHarbour=Harbour landing -observe.service.enum.typeTransmittingBuoyOperation.pasDeBalise=DCP sin balizar -observe.service.enum.typeTransmittingBuoyOperation.pose=Colocación de nueva baliza -observe.service.enum.typeTransmittingBuoyOperation.recuperation=Recogida de baliza sin regreso al agua -observe.service.enum.typeTransmittingBuoyOperation.recuperationEtRemplacement=Recuperación y colocación de una nueva baliza -observe.service.enum.typeTransmittingBuoyOperation.visite=Visita a la baliza diff --git a/observe-services-api/src/main/resources/i18n/observe-services-api_fr_FR.properties b/observe-services-api/src/main/resources/i18n/observe-services-api_fr_FR.properties deleted file mode 100644 index e0d7bde..0000000 --- a/observe-services-api/src/main/resources/i18n/observe-services-api_fr_FR.properties +++ /dev/null @@ -1,40 +0,0 @@ -observe.service.enum.gearType.longline=longline -observe.service.enum.gearType.seine=Seine -observe.service.enum.nonTargetCatchComputedValueSource.fromData=calculé à partir des autres données -observe.service.enum.nonTargetCatchComputedValueSource.fromReferentiel=calculé à partir du référentiel -observe.service.enum.nonTargetCatchComputedValueSource.fromSample=calculé à partir des échantillons -observe.service.enum.ownership.autreVessel=Navire d'un autre armement -observe.service.enum.ownership.ceVessel=Ce navire ou cet armement -observe.service.enum.ownership.unknown=Inconnue -observe.service.enum.referenceStatus.disabled=Désactivé -observe.service.enum.referenceStatus.enabled=Actif -observe.service.enum.schoolType.libre=Banc libre -observe.service.enum.schoolType.objet=Banc objet -observe.service.enum.schoolType.undefined=Banc indéterminé -observe.service.enum.synchro.referential.mode.both=Bi-directionnelle -observe.service.enum.synchro.referential.mode.both.description=Pour autoriser les modifications sur les deux sources. -observe.service.enum.synchro.referential.mode.fromLeftToRight=Uni-directionnelle de la gauche vers la droite -observe.service.enum.synchro.referential.mode.fromLeftToRight.description=Pour autoriser les modification que sur la base de droite. -observe.service.enum.synchro.referential.mode.fromRightToLeft=Uni-directionnelle de la droite vers la gauche -observe.service.enum.synchro.referential.mode.fromRightToLeft.description=Pour autoriser les modifications que sur la base de gauche. -observe.service.enum.tripMapPointType.longlineActivity=point d'activité -observe.service.enum.tripMapPointType.longlineActivityInHarbour=Au port -observe.service.enum.tripMapPointType.longlineActivityWithHaulingEnd=Fin de virage -observe.service.enum.tripMapPointType.longlineActivityWithHaulingStart=Début de virage -observe.service.enum.tripMapPointType.longlineActivityWithInteraction=Rencontre -observe.service.enum.tripMapPointType.longlineActivityWithSettingEnd=Fin de filage -observe.service.enum.tripMapPointType.longlineActivityWithSettingStart=Début de filage -observe.service.enum.tripMapPointType.longlineActivityWithStation=Station océanographique -observe.service.enum.tripMapPointType.longlineDepartureHarbour=Port de départ -observe.service.enum.tripMapPointType.longlineLandingHarbour=Port d'arrivée -observe.service.enum.tripMapPointType.seineActivity=point d'activité -observe.service.enum.tripMapPointType.seineActivityInHarbour=Au port -observe.service.enum.tripMapPointType.seineActivityWithFreeSchoolType=Banc libre -observe.service.enum.tripMapPointType.seineActivityWithObjectSchoolType=Banc objet -observe.service.enum.tripMapPointType.seineDepartureHarbour=Port de départ -observe.service.enum.tripMapPointType.seineLandingHarbour=Port d'arrivée -observe.service.enum.typeTransmittingBuoyOperation.pasDeBalise=Pas de balise liée au DCP -observe.service.enum.typeTransmittingBuoyOperation.pose=Pose d'une nouvelle balise -observe.service.enum.typeTransmittingBuoyOperation.recuperation=Récupération d'une balise sans remise à l'eau -observe.service.enum.typeTransmittingBuoyOperation.recuperationEtRemplacement=Récupération et pose d'une nouvelle balise -observe.service.enum.typeTransmittingBuoyOperation.visite=Simple visite de la balise diff --git a/observe-services-topia/src/main/java/fr/ird/observe/services/service/actions/consolidate/ConsolidateActivitySeineDataResultBuilder.java b/observe-services-topia/src/main/java/fr/ird/observe/services/service/actions/consolidate/ConsolidateActivitySeineDataResultBuilder.java index 05244cb..311d15a 100644 --- a/observe-services-topia/src/main/java/fr/ird/observe/services/service/actions/consolidate/ConsolidateActivitySeineDataResultBuilder.java +++ b/observe-services-topia/src/main/java/fr/ird/observe/services/service/actions/consolidate/ConsolidateActivitySeineDataResultBuilder.java @@ -35,7 +35,7 @@ import fr.ird.observe.entities.seine.NonTargetCatch; import fr.ird.observe.entities.seine.NonTargetLength; import fr.ird.observe.entities.seine.TargetLength; import fr.ird.observe.services.dto.constants.ReferentialLocale; -import fr.ird.observe.services.util.I18nEnumUtil; +import fr.ird.observe.services.dto.constants.seine.SchoolType; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -70,9 +70,9 @@ public class ConsolidateActivitySeineDataResultBuilder { protected final ActivitySeine activitySeine; - protected String oldSchoolType; + protected SchoolType oldSchoolType; - protected String newSchoolType; + protected SchoolType newSchoolType; protected final ImmutableSet.Builder<String> lengthWeightParameterNotFoundBuilder = new ImmutableSet.Builder<>(); @@ -151,7 +151,7 @@ public class ConsolidateActivitySeineDataResultBuilder { element.speciesLabel = speciesLabel; element.propertyName = NonTargetCatch.PROPERTY_MEAN_LENGTH; element.newValue = nonTargetCatch.getMeanLength(); - element.computeValueSource = I18nEnumUtil.getLabel(locale, nonTargetCatch.getMeanLengthComputedSource()); +// element.computeValueSource = I18nEnumUtil.getLabel(locale, nonTargetCatch.getMeanLengthComputedSource()); nonTargetCatchModificationBuilder.add(element); break; @@ -163,7 +163,7 @@ public class ConsolidateActivitySeineDataResultBuilder { element.speciesLabel = speciesLabel; element.propertyName = NonTargetCatch.PROPERTY_MEAN_WEIGHT; element.newValue = nonTargetCatch.getMeanWeight(); - element.computeValueSource = I18nEnumUtil.getLabel(locale, nonTargetCatch.getMeanWeightComputedSource()); +// element.computeValueSource = I18nEnumUtil.getLabel(locale, nonTargetCatch.getMeanWeightComputedSource()); nonTargetCatchModificationBuilder.add(element); break; @@ -175,7 +175,7 @@ public class ConsolidateActivitySeineDataResultBuilder { element.speciesLabel = speciesLabel; element.propertyName = NonTargetCatch.PROPERTY_CATCH_WEIGHT; element.newValue = nonTargetCatch.getCatchWeight(); - element.computeValueSource = I18nEnumUtil.getLabel(locale, nonTargetCatch.getCatchWeightComputedSource()); +// element.computeValueSource = I18nEnumUtil.getLabel(locale, nonTargetCatch.getCatchWeightComputedSource()); nonTargetCatchModificationBuilder.add(element); break; @@ -187,7 +187,7 @@ public class ConsolidateActivitySeineDataResultBuilder { element.speciesLabel = speciesLabel; element.propertyName = NonTargetCatch.PROPERTY_TOTAL_COUNT; element.newValue = nonTargetCatch.getTotalCount(); - element.computeValueSource = I18nEnumUtil.getLabel(locale, nonTargetCatch.getTotalCountComputedSource()); +// element.computeValueSource = I18nEnumUtil.getLabel(locale, nonTargetCatch.getTotalCountComputedSource()); nonTargetCatchModificationBuilder.add(element); break; @@ -210,8 +210,8 @@ public class ConsolidateActivitySeineDataResultBuilder { } public ConsolidateActivitySeineDataResultBuilder setSchoolTypeChanged(SchoolTypePersist oldSchoolType, SchoolTypePersist newSchoolType) { - this.oldSchoolType = l(locale, I18nEnumUtil.getLabel(oldSchoolType)); - this.newSchoolType = l(locale, I18nEnumUtil.getLabel(newSchoolType)); + this.oldSchoolType = SchoolType.valueOf(oldSchoolType.name()); + this.newSchoolType = SchoolType.valueOf(newSchoolType.name()); return this; } diff --git a/pom.xml b/pom.xml index d4055dd..5feaacc 100644 --- a/pom.xml +++ b/pom.xml @@ -148,11 +148,12 @@ <!-- i18n configuration --> <!--FIXME Traduire en es et en --> - <!--<i18n.bundles>fr_FR,en_GB,es_ES</i18n.bundles>--> - <i18n.bundles>fr_FR</i18n.bundles> + <i18n.bundles>fr_FR,en_GB,es_ES</i18n.bundles> + <!--<i18n.bundles>fr_FR</i18n.bundles>--> <i18n.silent>true</i18n.silent> - <i18n.failsIfWarning>true</i18n.failsIfWarning> + <i18n.failsIfWarning>false</i18n.failsIfWarning> <i18n.checkBundle>true</i18n.checkBundle> + <i18n.showEmpty>true</i18n.showEmpty> <!-- Site configuration --> <locales>fr</locales> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.