Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 36317436 by Tony Chemit at 2023-05-19T12:40:24+02:00 On aimerait voir cet espace supprimé - Closes #2694 - - - - - 6fe294dd by Tony Chemit at 2023-05-19T12:53:28+02:00 update pom - - - - - 24113b74 by Tony Chemit at 2023-05-19T13:19:25+02:00 Erreur en consultation des utilisations d'un référentiel - Closes #2701 - - - - - 50b70dcd by Tony Chemit at 2023-05-19T13:19:25+02:00 Assistant traduction, le bouton Export (du fichier) ne fonctionne pas - Closes #2703 - - - - - 18 changed files: - client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/tree/node/ReferentialSynchroNodeSupport.java - client/runner/pom.xml - core/api/dto-decoration/src/main/java/fr/ird/observe/dto/data/ll/logbook/CatchDtoDecoratorDefinition.java - core/api/dto-decoration/src/main/java/fr/ird/observe/dto/data/ll/logbook/CatchReferenceDecoratorDefinition.java - core/api/dto-decoration/src/main/java/fr/ird/observe/dto/data/ll/observation/CatchDtoDecoratorDefinition.java - core/api/dto-decoration/src/main/java/fr/ird/observe/dto/data/ll/observation/CatchReferenceDecoratorDefinition.java - core/api/dto-decoration/src/main/java/fr/ird/observe/dto/data/ll/observation/TdrDtoDecoratorDefinition.java - core/api/dto-decoration/src/main/java/fr/ird/observe/dto/data/ll/observation/TdrReferenceDecoratorDefinition.java - core/persistence/decoration/src/main/java/fr/ird/observe/entities/data/ll/logbook/CatchDecoratorDefinition.java - core/persistence/decoration/src/main/java/fr/ird/observe/entities/data/ll/observation/CatchDecoratorDefinition.java - core/persistence/decoration/src/main/java/fr/ird/observe/entities/data/ll/observation/TdrDecoratorDefinition.java - model/src/main/models/Observe/dto/class/decorator.properties - pom.xml - toolkit/api-decoration/src/main/i18n/getters/java.getter - toolkit/api-decoration/src/main/java/fr/ird/observe/decoration/DefaultDecoratorRenderer.java - toolkit/api-i18n/src/main/i18n/translations/toolkit-api-i18n_en_GB.properties - toolkit/api-i18n/src/main/i18n/translations/toolkit-api-i18n_es_ES.properties - toolkit/api-i18n/src/main/i18n/translations/toolkit-api-i18n_fr_FR.properties Changes: ===================================== client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/tree/node/ReferentialSynchroNodeSupport.java ===================================== @@ -98,7 +98,7 @@ public abstract class ReferentialSynchroNodeSupport extends SynchroNodeSupport { String text = "<html><body>" + dto.toString(); text += " <i>(" + dto.getTopiaVersion() + " - " + DATE_FORMAT.format(dto.getLastUpdateDate()) + ")</i>"; if (!isLeaf()) { - text += "( " + getChildCount() + ")"; + text += "(" + getChildCount() + ")"; } return text; } ===================================== client/runner/pom.xml ===================================== @@ -109,6 +109,18 @@ <version>${project.version}</version> <scope>runtime</scope> </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>core-services-i18n</artifactId> + <version>${project.version}</version> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>toolkit-api-i18n</artifactId> + <version>${project.version}</version> + <scope>runtime</scope> + </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-jcl</artifactId> ===================================== core/api/dto-decoration/src/main/java/fr/ird/observe/dto/data/ll/logbook/CatchDtoDecoratorDefinition.java ===================================== @@ -42,7 +42,7 @@ public final class CatchDtoDecoratorDefinition extends DecoratorDefinition<Catch public final String decorateContext(Locale locale, ObserveDtoDecoratorRenderer<CatchDto> renderer, CatchDto source, int index) { switch (index) { case 0: - return renderer.onNullValue("homeId", locale, source.getHomeId()); + return renderer.onHomeId(locale, source.getHomeId()); default: throw new IllegalStateException("No index with value: " + index); } ===================================== core/api/dto-decoration/src/main/java/fr/ird/observe/dto/data/ll/logbook/CatchReferenceDecoratorDefinition.java ===================================== @@ -42,7 +42,7 @@ public final class CatchReferenceDecoratorDefinition extends DecoratorDefinition public final String decorateContext(Locale locale, ObserveDtoReferenceDecoratorRenderer<CatchReference> renderer, CatchReference source, int index) { switch (index) { case 0: - return renderer.onNullValue("homeId", locale, source.getHomeId()); + return renderer.onHomeId(locale, source.getHomeId()); default: throw new IllegalStateException("No index with value: " + index); } ===================================== core/api/dto-decoration/src/main/java/fr/ird/observe/dto/data/ll/observation/CatchDtoDecoratorDefinition.java ===================================== @@ -42,7 +42,7 @@ public final class CatchDtoDecoratorDefinition extends DecoratorDefinition<Catch public final String decorateContext(Locale locale, ObserveDtoDecoratorRenderer<CatchDto> renderer, CatchDto source, int index) { switch (index) { case 0: - return renderer.onNullValue("homeId", locale, source.getHomeId()); + return renderer.onHomeId(locale, source.getHomeId()); default: throw new IllegalStateException("No index with value: " + index); } ===================================== core/api/dto-decoration/src/main/java/fr/ird/observe/dto/data/ll/observation/CatchReferenceDecoratorDefinition.java ===================================== @@ -42,7 +42,7 @@ public final class CatchReferenceDecoratorDefinition extends DecoratorDefinition public final String decorateContext(Locale locale, ObserveDtoReferenceDecoratorRenderer<CatchReference> renderer, CatchReference source, int index) { switch (index) { case 0: - return renderer.onNullValue("homeId", locale, source.getHomeId()); + return renderer.onHomeId(locale, source.getHomeId()); default: throw new IllegalStateException("No index with value: " + index); } ===================================== core/api/dto-decoration/src/main/java/fr/ird/observe/dto/data/ll/observation/TdrDtoDecoratorDefinition.java ===================================== @@ -42,7 +42,7 @@ public final class TdrDtoDecoratorDefinition extends DecoratorDefinition<TdrDto, public final String decorateContext(Locale locale, ObserveDtoDecoratorRenderer<TdrDto> renderer, TdrDto source, int index) { switch (index) { case 0: - return renderer.onNullValue("homeId", locale, source.getHomeId()); + return renderer.onHomeId(locale, source.getHomeId()); default: throw new IllegalStateException("No index with value: " + index); } ===================================== core/api/dto-decoration/src/main/java/fr/ird/observe/dto/data/ll/observation/TdrReferenceDecoratorDefinition.java ===================================== @@ -42,7 +42,7 @@ public final class TdrReferenceDecoratorDefinition extends DecoratorDefinition<T public final String decorateContext(Locale locale, ObserveDtoReferenceDecoratorRenderer<TdrReference> renderer, TdrReference source, int index) { switch (index) { case 0: - return renderer.onNullValue("homeId", locale, source.getHomeId()); + return renderer.onHomeId(locale, source.getHomeId()); default: throw new IllegalStateException("No index with value: " + index); } ===================================== core/persistence/decoration/src/main/java/fr/ird/observe/entities/data/ll/logbook/CatchDecoratorDefinition.java ===================================== @@ -42,7 +42,7 @@ public final class CatchDecoratorDefinition extends DecoratorDefinition<Catch, O public final String decorateContext(Locale locale, ObserveEntityDecoratorRenderer<Catch> renderer, Catch source, int index) { switch (index) { case 0: - return renderer.onNullValue("homeId", locale, source.getHomeId()); + return renderer.onHomeId(locale, source.getHomeId()); default: throw new IllegalStateException("No index with value: " + index); } ===================================== core/persistence/decoration/src/main/java/fr/ird/observe/entities/data/ll/observation/CatchDecoratorDefinition.java ===================================== @@ -42,7 +42,7 @@ public final class CatchDecoratorDefinition extends DecoratorDefinition<Catch, O public final String decorateContext(Locale locale, ObserveEntityDecoratorRenderer<Catch> renderer, Catch source, int index) { switch (index) { case 0: - return renderer.onNullValue("homeId", locale, source.getHomeId()); + return renderer.onHomeId(locale, source.getHomeId()); default: throw new IllegalStateException("No index with value: " + index); } ===================================== core/persistence/decoration/src/main/java/fr/ird/observe/entities/data/ll/observation/TdrDecoratorDefinition.java ===================================== @@ -42,7 +42,7 @@ public final class TdrDecoratorDefinition extends DecoratorDefinition<Tdr, Obser public final String decorateContext(Locale locale, ObserveEntityDecoratorRenderer<Tdr> renderer, Tdr source, int index) { switch (index) { case 0: - return renderer.onNullValue("homeId", locale, source.getHomeId()); + return renderer.onHomeId(locale, source.getHomeId()); default: throw new IllegalStateException("No index with value: " + index); } ===================================== model/src/main/models/Observe/dto/class/decorator.properties ===================================== @@ -29,7 +29,7 @@ data.ll.logbook.Activity=${startTimeStamp::timestamp}##${vesselActivity::label} data.ll.logbook.ActivitySample=${timeStamp::timestamp}##${coordinateStr} data.ll.logbook.BaitsComposition=${baitType::label}##${proportion} data.ll.logbook.BranchlinesComposition=${length}##${proportion} -data.ll.logbook.Catch=${homeId} +data.ll.logbook.Catch=${homeId::onHomeId} data.ll.logbook.FloatlinesComposition=${lineType::label}##${proportion} data.ll.logbook.HooksComposition=${hookType::label}##${proportion} data.ll.logbook.Sample=${timeStamp::timestamp}##${coordinateStr} @@ -40,7 +40,7 @@ data.ll.observation.BaitsComposition=${baitType::label}##${proportion} data.ll.observation.Basket=${settingIdentifier} ( $(observe.Common.settingIdentifier) )##${haulingIdentifier} ( $(observe.Common.haulingIdentifier) ) data.ll.observation.Branchline=${settingIdentifier} ( $(observe.Common.settingIdentifier) )##${haulingIdentifier} ( $(observe.Common.haulingIdentifier) ) data.ll.observation.BranchlinesComposition=${length}##${proportion} -data.ll.observation.Catch=${homeId} +data.ll.observation.Catch=${homeId::onHomeId} data.ll.observation.Encounter=${encounterType::label}##${species::speciesLabel} data.ll.observation.FloatlinesComposition=${lineType::label}##${proportion} data.ll.observation.HooksComposition=${hookType::label}##${proportion} @@ -49,7 +49,7 @@ data.ll.observation.SectionTemplate=${id}##${floatlineLengths} data.ll.observation.SensorUsed=${sensorType::label}$ data.ll.observation.Set=$(observe.data.ll.observation.Set.type) data.ll.observation.SizeMeasure=${sizeMeasureType::label}##${size} -data.ll.observation.Tdr=${homeId} +data.ll.observation.Tdr=${homeId::onHomeId} data.ll.observation.TripActivityStub=${timeStamp::timestamp} data.ll.observation.WeightMeasure=${weightMeasureType::label}##${weight} data.ll.pairing.ActivityPairingResultItem=${observationActivity}##$(observe.data.ll.pairing.ActivityPairingResultItem.computedDistance) ${computedDistance}##$(observe.data.ll.pairing.ActivityPairingResultItem.computedTime) ${computedTimeStr} ===================================== pom.xml ===================================== @@ -23,7 +23,7 @@ <parent> <groupId>io.ultreia.maven</groupId> <artifactId>pom</artifactId> - <version>2023.22</version> + <version>2023.23</version> </parent> <groupId>fr.ird.observe</groupId> <artifactId>ird-observe</artifactId> ===================================== toolkit/api-decoration/src/main/i18n/getters/java.getter ===================================== @@ -1,6 +1,7 @@ observe.Common.dataGroupBy.count observe.Common.dataGroupBy.count.null observe.Common.no.date +observe.Common.no.homeId observe.Common.no.time observe.Common.no.unit observe.Common.nocode ===================================== toolkit/api-decoration/src/main/java/fr/ird/observe/decoration/DefaultDecoratorRenderer.java ===================================== @@ -63,6 +63,13 @@ public class DefaultDecoratorRenderer<O> extends DecoratorRenderer<O> { return value; } + public String onHomeId(Locale locale, String value) { + if (value == null || value.isEmpty()) { + return I18n.l(locale, "observe.Common.no.homeId"); + } + return value; + } + @Override public String onNullValue(Locale locale, Object value) { if (value == null) return I18n.l(locale, "observe.Common.none"); ===================================== toolkit/api-i18n/src/main/i18n/translations/toolkit-api-i18n_en_GB.properties ===================================== @@ -41,6 +41,7 @@ observe.Common.navigation.config.moduleName=Business domain observe.Common.navigation.config.moduleName.description=Business domain to use observe.Common.no.coordinate=Unknown coordinate observe.Common.no.date=No date +observe.Common.no.homeId=No homeId observe.Common.no.time=No time observe.Common.no.unit=No unit observe.Common.no.value=No value ===================================== toolkit/api-i18n/src/main/i18n/translations/toolkit-api-i18n_es_ES.properties ===================================== @@ -41,6 +41,7 @@ observe.Common.navigation.config.moduleName=Module observe.Common.navigation.config.moduleName.description=Module to use observe.Common.no.coordinate=Unknown coordinate \#TODO observe.Common.no.date=No date +observe.Common.no.homeId=No homeId \#TODO observe.Common.no.time=No time observe.Common.no.unit=No unit \#TODO observe.Common.no.value=No value ===================================== toolkit/api-i18n/src/main/i18n/translations/toolkit-api-i18n_fr_FR.properties ===================================== @@ -41,6 +41,7 @@ observe.Common.navigation.config.moduleName=Domaine métier observe.Common.navigation.config.moduleName.description=Domaine métier à utiliser observe.Common.no.coordinate=Position inconnue observe.Common.no.date=Date non définie +observe.Common.no.homeId=Pas d'identifiant observe.Common.no.time=Heure non définie observe.Common.no.unit=Pas d'unité observe.Common.no.value=Valeur non définie View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/fe986ff594cfdb08e13441fab... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/fe986ff594cfdb08e13441fab... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT (@tchemit)