-
Notifications
You must be signed in to change notification settings - Fork 0
Use resource bundle for reports #445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Rename 'automaton' reports with 'automationSystem' Signed-off-by: lisrte <[email protected]>
Signed-off-by: lisrte <[email protected]>
Fix commons pom.xml Signed-off-by: lisrte <[email protected]>
Signed-off-by: lisrte <[email protected]>
commons/src/main/java/com/powsybl/dynawo/commons/PowsyblDynawoReportResourceBundle.java
Show resolved
Hide resolved
commons/src/main/resources/com/powsybl/dynawo/commons/reports_en_US.properties
Outdated
Show resolved
Hide resolved
dynawo-integration-tests/src/test/java/com/powsybl/dynawo/it/DynaFlowTest.java
Outdated
Show resolved
Hide resolved
dynawo-simulation/src/main/java/com/powsybl/dynawo/DynawoSimulationReports.java
Outdated
Show resolved
Hide resolved
...calculation/src/main/java/com/powsybl/dynawo/margincalculation/MarginCalculationReports.java
Show resolved
Hide resolved
dynawo-simulation/src/main/java/com/powsybl/dynawo/DynawoSimulationReports.java
Outdated
Show resolved
Hide resolved
Add TypedValue ID to static id reports Signed-off-by: lisrte <[email protected]>
@@ -24,7 +24,7 @@ private BuilderReports() { | |||
|
|||
public static ReportNode createModelInstantiationReportNode(ReportNode reportNode) { | |||
return reportNode.newReportNode() | |||
.withMessageTemplate("modelInstantiation", "Model ${modelName} ${dynamicId} instantiation ${state}") | |||
.withMessageTemplate("dynawo.dynasim.modelInstantiation") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this report shouldn't we have 2 keys? One for the success case and one for the failure one?
There might still be a problem as we need to know during the instanciation of the ReportNode
in which case we are one (maybe in the future we could change the API to allow to modify a ReportNode
message template afterwards @flo-dup ).
But as it is right now the untyped value state
of this report node will not be translated : successful
or failed
will appear even with french locale for instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could admit a KO/OK string for now in all languages (rather than failed/successful). But that's one argument towards a message template key added after creation.
Remove withResourceBundles call in non-root report node Signed-off-by: lisrte <[email protected]>
Signed-off-by: lisrte <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still some en_US.properties files which could be removed
Signed-off-by: lisrte <[email protected]>
Fixed it. |
|
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
#440
What kind of change does this PR introduce?
Refactor
What is the current behavior?
Use deprecated
withMessageTemplate
method.What is the new behavior (if this is a feature change)?
Use resource bundle for reports
Does this PR introduce a breaking change or deprecate an API?