Skip to content
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

ReportNode i18n #3299

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

ReportNode i18n #3299

wants to merge 6 commits into from

Conversation

flo-dup
Copy link
Contributor

@flo-dup flo-dup commented Jan 30, 2025

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem?
No

What kind of change does this PR introduce?
Feature

What is the current behavior?
Language can hardly be changed

What is the new behavior (if this is a feature change)?
Language can be set by setting Locale to root ReportNode.

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)
All the message templates should be moved to a ResourceBundle.
Translation into french is expected - please request for help if needed.
withLocaleMessageTemplate(key, bundleBaseName) should be used instead of deprecated withMessageTemplate(key, messageTemplate)

@flo-dup flo-dup added the Deprecated Methods have been deprecated label Jan 30, 2025
@flo-dup flo-dup requested a review from alicecaron January 30, 2025 15:29
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
71.7% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@flo-dup
Copy link
Contributor Author

flo-dup commented Feb 11, 2025

It seems more natural to use java.text.MessageFormat now that we use ResourcesBundle, as it is the usual way to encode variable references inside. This would be quite a breaking change but it seems needed.
https://docs.oracle.com/javase/tutorial/i18n/format/messageFormat.html

@olperr1
Copy link
Member

olperr1 commented Feb 19, 2025

To help for this PR, some scripts are already in development in powsybl/powsybl-dev-tools#121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecated Methods have been deprecated Release 03/2025
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants