diff --git a/pom.xml b/pom.xml index 0386ea8c5..de03bb4ee 100644 --- a/pom.xml +++ b/pom.xml @@ -42,11 +42,11 @@ - 38.0.0 + 38.1.0-SNAPSHOT org.gridsuite.study.server 5.0.0-alpha.14 5.3 - 0.14.0 + 0.15.0-SNAPSHOT 1.0.5 gridsuite org.gridsuite:study-server diff --git a/src/main/java/org/gridsuite/study/server/report/StudyServerReportResourceBundle.java b/src/main/java/org/gridsuite/study/server/report/StudyServerReportResourceBundle.java new file mode 100644 index 000000000..2f1ecf358 --- /dev/null +++ b/src/main/java/org/gridsuite/study/server/report/StudyServerReportResourceBundle.java @@ -0,0 +1,24 @@ +/** + * Copyright (c) 2025, RTE (http://www.rte-france.com) + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + */ +package org.gridsuite.study.server.report; + +import com.google.auto.service.AutoService; +import com.powsybl.commons.report.ReportResourceBundle; + +/** + * @author Charly Boutier {@literal } + */ +@AutoService(ReportResourceBundle.class) +public final class StudyServerReportResourceBundle implements ReportResourceBundle { + + public static final String BASE_NAME = "org.gridsuite.study.server.reports"; + + public String getBaseName() { + return BASE_NAME; + } +} diff --git a/src/main/java/org/gridsuite/study/server/service/NetworkModificationTreeService.java b/src/main/java/org/gridsuite/study/server/service/NetworkModificationTreeService.java index 519c785f3..9d351d40a 100644 --- a/src/main/java/org/gridsuite/study/server/service/NetworkModificationTreeService.java +++ b/src/main/java/org/gridsuite/study/server/service/NetworkModificationTreeService.java @@ -460,7 +460,10 @@ public void createBasicTree(StudyEntity studyEntity) { .build(); NetworkModificationNode networkModificationNode = createNode(studyEntity, rootNodeEntity.getIdNode(), modificationNode, InsertMode.AFTER, null); - ReportNode reportNode = ReportNode.newRootReportNode().withMessageTemplate(modificationNode.getId().toString(), modificationNode.getId().toString()).build(); + ReportNode reportNode = ReportNode.newRootReportNode() + .withAllResourceBundlesFromClasspath() + .withMessageTemplate("study.server.modificationNodeId") + .withUntypedValue("modificationNodeId", modificationNode.getId().toString()).build(); reportService.sendReport(getModificationReportUuid(networkModificationNode.getId(), firstRootNetworkUuid, networkModificationNode.getId()), reportNode); BuildInfos buildInfos = getBuildInfos(modificationNode.getId(), firstRootNetworkUuid); diff --git a/src/main/resources/org/gridsuite/study/server/reports.properties b/src/main/resources/org/gridsuite/study/server/reports.properties new file mode 100644 index 000000000..8afa470ea --- /dev/null +++ b/src/main/resources/org/gridsuite/study/server/reports.properties @@ -0,0 +1 @@ +study.server.modificationNodeId = ${modificationNodeId} diff --git a/src/main/resources/org/gridsuite/study/server/reports_en_US.properties b/src/main/resources/org/gridsuite/study/server/reports_en_US.properties new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/src/main/resources/org/gridsuite/study/server/reports_en_US.properties @@ -0,0 +1 @@ +