-
Notifications
You must be signed in to change notification settings - Fork 8
Reports i18n #1216
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?
Reports i18n #1216
Conversation
@alicecaron why is this PR a breaking change ? What does it break for OpenLoadFlow users if we merge this PR ? Can you detail ? The explenations you provided are about the already done change in Core. |
src/main/resources/com/powsybl/openloadflow/reports_en_US.properties
Outdated
Show resolved
Hide resolved
src/main/resources/com/powsybl/openloadflow/reports_fr_FR.properties
Outdated
Show resolved
Hide resolved
For users using OpenLoadFlow and creating rootReportNode on their side, they now need to specified the OLF report bundle if they list them one by one to be able to have the messages of the OLF reports in their rootReportNode children generated within OLF. |
…report keys Signed-off-by: CARON Alice <[email protected]>
…Remove uses of deprecated withMessageTemplate method. Signed-off-by: CARON Alice <[email protected]>
Signed-off-by: CARON Alice <[email protected]>
…geTemplate method in tests report nodes Signed-off-by: CARON Alice <[email protected]>
…tween included/added root reports Signed-off-by: CARON Alice <[email protected]>
…the classpath Signed-off-by: CARON Alice <[email protected]>
…s to fallback on en locale for tests Signed-off-by: CARON Alice <[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.
Thanks for this migration ! Let's start with that as decided and improve as we go.
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
#1206
What kind of change does this PR introduce?
Feature: allow internationalization of reports.
Refacto: remove usages of deprecated
ReportNode::withMessageTemplate(String key, String messageTemplate)
methode and use the new one instead, loading a new ResourceBundle for open loadflow translations.What is the current behavior?
It is not possible to have report in another language.
What is the new behavior (if this is a feature change)?
It is possible to have a report in a given locale language.
Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
The third version of the report node API from powsybl-core introduces a mechanism for internationalizing messages (i18n).
For all users, when creating a new ReportNode root, the i18n bundles should be loaded. You can either:
PowsyblOpenLoadFlowReportResourceBundle.BASE_NAME