Skip to content

feat(i18n): add locale-aware toString() and stateless Messages API#805

Merged
mivek merged 1 commit into
mainfrom
deepseek
May 29, 2026
Merged

feat(i18n): add locale-aware toString() and stateless Messages API#805
mivek merged 1 commit into
mainfrom
deepseek

Conversation

@mivek
Copy link
Copy Markdown
Owner

@mivek mivek commented May 29, 2026

  • Add getString(Locale, String) and getString(Locale, String, Object...) stateless overloads to Messages.java
  • Make stateless overloads defensive (return key on MissingResourceException)
  • Deprecate setLocale()/clearLocale() in favor of explicit Locale parameter
  • Add toString(Locale) to all 15 enums and ~20 model/trend classes
  • All existing toString() delegates to toString(Locale.getDefault()) for backward compat
  • Synchronize all 8 locale bundles with English fallback for missing keys
  • Keep legacy getString(String) throwing MissingResourceException for RemarkParser compatibility
  • Update all setLocale-based tests to use toString(Locale) directly
  • Add InternationalizationKeyCoverageTest to verify enum keys exist in base bundle
  • Re-enable testLocaleContainsAllBaseKeys parameterized test

@github-actions
Copy link
Copy Markdown

Please check on sonarcloud https://sonarcloud.io/project/pull_requests_list?id=io.github.mivek%3AmetarParser that the PR does not add any issue.

- Add getString(Locale, String) and getString(Locale, String, Object...) stateless overloads to Messages.java
- Make stateless overloads defensive (return key on MissingResourceException)
- Deprecate setLocale()/clearLocale() in favor of explicit Locale parameter
- Add toString(Locale) to all 15 enums and ~20 model/trend classes
- All existing toString() delegates to toString(Locale.getDefault()) for backward compat
- Synchronize all 8 locale bundles with English fallback for missing keys
- Keep legacy getString(String) throwing MissingResourceException for RemarkParser compatibility
- Update all setLocale-based tests to use toString(Locale) directly
- Add InternationalizationKeyCoverageTest to verify enum keys exist in base bundle
- Re-enable testLocaleContainsAllBaseKeys parameterized test
@mivek mivek merged commit b64102e into main May 29, 2026
8 checks passed
@mivek mivek deleted the deepseek branch May 29, 2026 12:03
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 2.26.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant