Skip to content

Root locale as the first valid token from locales if no "default" included#1234

Draft
pbaumard wants to merge 2 commits intoapache:masterfrom
pbaumard:bugfix/no-locales-default-token
Draft

Root locale as the first valid token from locales if no "default" included#1234
pbaumard wants to merge 2 commits intoapache:masterfrom
pbaumard:bugfix/no-locales-default-token

Conversation

@pbaumard
Copy link

This closes #1226

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MSITE-XXX] - Fixes bug in ApproximateQuantiles,
    where you replace MSITE-XXX with the appropriate JIRA issue. Best practice
    is to use the JIRA issue title in the pull request title and in the first line of the
    commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its clean verify).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@michael-o michael-o self-requested a review February 25, 2026 15:51
@michael-o michael-o self-assigned this Feb 25, 2026
@michael-o michael-o marked this pull request as draft February 25, 2026 15:53
Copy link
Member

@michael-o michael-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through the PR, the old code and the Doxia Sitetools and refusing this for the following reasons:

  • Although you are right, the docs aren't correct, I need to fix them, the previous behavior modified the entire JVM's locale which can have negative side effects in a MT build, we removed this change
  • Your change ignores to modify log messages regarding the default locale
  • You completely forgot to align with Doxia Sitetools because its behavior relies on SiteTool#DEFAULT_LOCALE throughout. We need a complete solution covering Doxia Sitetools and Maven Site Plugin.

I am currently thinking about something like this to give you to modify the Doxia Sitetools default locale:

 Locale DEFAULT_LOCALE = getDefaultLocale();

where you can supply mvn -Dmaven.doxiaSitetools.defaultLocale (or similar). Maybe there is a more elegant way to do this.

@kwin What do you think about this?

@michael-o
Copy link
Member

michael-o commented Mar 1, 2026

Draft solution: apache/maven-doxia-sitetools#623

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default locale should be the first valid token from locales

2 participants