Rainer,
On 2/11/25 3:18 AM, Rainer Jung wrote:
Hi Chris,
Am 11.02.25 um 00:18 schrieb Christopher Schultz:
Rainer,
On 2/10/25 11:11 AM, Rainer Jung wrote:
Am 10.02.25 um 17:02 schrieb Mark Thomas:
On 10/02/2025 13:55, Christopher Schultz wrote:
Assuming we agree that the official releases of Tomcat should have
documentation in English, then I have a further proposal:
+1
- Add "locale" attribute to the <javadoc> tasks in the build with
an explicit locale
+1
For release-managers, I will update the pre-release target to
include javadoc-locale=en_US (or en_GB or just 'en' if we like).
I don't think it matters. Anything that varies (e.g. date format) we
already use an unambiguous form anyway.
In build.properties.default, I will set javadoc-locale to
${user.language}.
I think that is fine since .release takes priority over .default
This should allow anyone downstream to build javadocs in their own
language (either via git clone or pulling the source and removing
the javadoc-locale in build.properties.release) and also users in
non- English default locales to verify a release build.
Now that I've written the above paragraph, it does mean that it's
not trivial for a user to build the javadocs in their own language.
I'd love to hear some suggestions for how to do that with an
official source package. Maybe the "release" target can set the
locale somehow. ATM, the <property> tasks that set up all the
properties are outside any target and apply before any targets get
to run, so they cannot be conditional. We could change that if we
want to, though...
build.properties always takes priority so they just need to set a
locale in there.
II agree with everything but note that IMHO at least on Linux the
environment variable LANG takes precedence. I could not build english
javadocs with the javascript locale attribute or user.lang or
whatever Java properties when LANG pointed to a german locale.
Thanks for the clarification.
I'm sorry if you've answered this already, but if you add locale="en"
to the javadoc task:
<javadoc [stuff]
locale="en"
...
</javadooc>
When I did this with "export LANG=de" on MacOS, I was able to get
English-language javadoc UI. But... I was NOT able to get German-
language javadoc by setting "export LANG=de" and not-specifying the
locale in <javadoc>.
Setting the env var LANG to de_DE.UTF-8 - which is the default on my
system - and adding locale="en" to the 7 or so <javadoc> calls in
build.xml and rebuilding everything still produces javadoc files with
german template text. Example: files package-tree.html contain the word
"Klassenhierarchie" (class hierarchy) and "Baum" (tree) etc.
Tested for TC 11 and using Java jdk-23.0.2+7 (Adoptium).
Okay, I'll try to reproduce that. Maybe my naive setting of LANG=de
wasn't enough.
Do you have other variables set such as LC_* or anything like that?
When I use LANG=de_DE.UTF-8, I still get English javadoc (!!).
The only way I've been able to get German javadoc is to specify
locale="de" in the build.xml file.
Perhaps it's the OS setting that's being picked-up by the JVM and not
the environment variable?
I'm really surprised that <javadoc locale="en"> isn't working for you.
Javadoc always runs in a forked JVM and so setting the locale on the
task should always be working.
I might have to try this in a Linux VM to get better answers.
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org