Make default locale configurable on JVM level#623
Conversation
| * @see Locale#ROOT | ||
| */ | ||
| Locale DEFAULT_LOCALE = Locale.ROOT; | ||
| Locale DEFAULT_LOCALE = new Locale( |
There was a problem hiding this comment.
Why do we need three different properties, let us use https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html#forLanguageTag-java.lang.String- and get the language tag from a single property.
Also regarding the property name I find user in it confusing. I would propose just maven.doxia.sitetools.default.locale.
There was a problem hiding this comment.
Two reasons:
- I have designed identically to Java's system properties for that
- I didn't use the mentioned method because I didn't want to be inconsistent how to accept the locale string, namely reverse
#toString().
There was a problem hiding this comment.
I can merge into one properly and pull up the parse method into the interface as a static method.
There was a problem hiding this comment.
Two reasons:
- I have designed identically to Java's system properties for that
- I didn't use the mentioned method because I didn't want to be inconsistent how to accept the locale string, namely reverse
#toString().
I don't particularly like the choice of JVM: https://www.oracle.com/technical-resources/articles/javase/locale.html#using. Since Locale.forLanguage(...) was introduced only with 1.7 is probably the reason why they split it up. Also the user infix is really weird, as this is not at all bound to a specific user.
There was a problem hiding this comment.
user is again from the JVM. I sticked to well-known property names.
There was a problem hiding this comment.
I know, but to me the
userinfix is still not very reasonable. I would rather deviate from the JVM naming here
Yep, had the same feeling. It was worth a try. Will worth on a better draft end of week.
There was a problem hiding this comment.
@michael-o Would like to target a release end of next week, should this be part of it?
There was a problem hiding this comment.
We first need to release Doxia. Do you want to do the release?
There was a problem hiding this comment.
Vote already ongoing: https://lists.apache.org/thread/nhfr3nnj767w4c86gzbsm4wvc4d93j76, was not aware that this has Doxia implications.
There was a problem hiding this comment.
It does not. Will try to evaluate.
Following this checklist to help us incorporate your
contribution quickly and easily:
Note that commits might be squashed by a maintainer on merge.
This may not always be possible but is a best-practice.
mvn verifyto make sure basic checks pass.A more thorough check will be performed on your pull request automatically.
mvn -Prun-its 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.