You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2019/11/16 15:25:52 UTC

Bundling of localized messages

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

All,

I'm finishing-up my (minor) work on separating SSI into a separate JAR
file and I noticed that while this file ends up in my catalina-ssi.jar
file:

   org/apache/catalina/ssi/LocalStrings.properties

This file (and others like it) do not:

   org/apache/catalina/ssi/LocalStrings_ko.properties

Instead, it ends up in this file:

lib/tomcat-i18n-ko.jar

... along with all the translations of all the other modules as well.

So, for example, if you want to take the tribes module somewhere (and
not have it in the default locale), you need both catalina-tribes.jar
and tomcat-i18n-*.jar.

This isn't really much of an issue for tribes,since I'm guessing it
doesn't work very well outside of Tomcat, but the SSI module could
theoretically be used in another container, so it might be nice to
bundle all of the translations with it.

Is there a particular reason (a) the translations are in a separate
JAR file - i.e. not in catalina.jar and (b) they are separated by
language? Perhaps the thought was that, knowing that you don't need
e.g. Korean means you can remove the JAR file from some kind of
bare-ones distribution.

For SSI, at least, I think it makes sense to bundle all the i18n files
together in the same JAR file. I'm using the <jarIt> macro to build my
JAR file which explicitly <excludes> LocalStrings_*.properties from
whatever JAR file is being built. I'd need to change the way that the
SSI JAR file is built in order to achieve this. But before doing so, I
wanted to get consensus on what to do with these files.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl3QFQAACgkQHPApP6U8
pFiaKw/6Ax3LEhmzMZS80ubdH0SWOkcud5PrjI4kC/LUxQfUSYqrKHLMKxFok0JL
SAgEq1v1qW8mAvj9Aejbk6nHv4R+PP+M4bxvXBv80OsHJ+8RaChtwctnYCykJD6O
fa878ugO84qgjqxP4ot+NH1AbbShdcu14uTYdTliXJolC6bXLZFGnLW8l2EelocE
tM3++uix9mS7uOVdNqJwjBP6Gfq97/Tp3KDjQv6KQqTQAiqOeJtPnKtCvlw807NM
LsG17TkO2FSHwkAwrf9K6N4Fvu2CsAEwjLlzlqi7RVuRv9FOiBNQ4IB/r+75YQAi
0ftVpjtB3LPKs3XJ1n8MH6CBk8E3symA7iY+jHnTuUha7OxgXSBs6KIqXgVPgVaz
wYR+E/u89BawwfdXQrxvuU3DtEJvqCauQJinqAexxGWUZ/w7qP0isNnAfemXOT4C
CtQxkcRHNXsi6meAl3bVgjLPIvNLeVaoDjKQ5Sl+NsSoWWhqlqZVmdfQQViHfr/C
Mj781gcctkFWuwgRENBq7i+P5mGzZ50EycxyrxOkq2xKaEf9dEY5x/QBJ4kKmLzQ
/tnIvqB1lsthYrN++Rrfhb92IZ0bCEBNtio8s5DW0I6qA5ywJMnsAAzMg6R3R76N
Io/NWFfHRu9pIyzGoMe0OA+fpO4wdByqw6wI3vQpt6K5hLSNh48=
=CQWx
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Bundling of localized messages

Posted by Mark Thomas <ma...@apache.org>.
> Mark,
> 
> On 11/19/19 07:08, Mark Thomas wrote:
>> <snip/>
> 
>>> Is there a particular reason (a) the translations are in a
>>> separate JAR file - i.e. not in catalina.jar and (b) they are
>>> separated by language? Perhaps the thought was that, knowing that
>>> you don't need e.g. Korean means you can remove the JAR file from
>>> some kind of bare-ones distribution.
> 
>> Essentially, yes. The intention was to make it easy to use the
>> default English text if users didn't need / didn't want the
>> translations.
> 
>>> For SSI, at least, I think it makes sense to bundle all the i18n
>>> files together in the same JAR file. I'm using the <jarIt> macro
>>> to build my JAR file which explicitly <excludes>
>>> LocalStrings_*.properties from whatever JAR file is being built.
>>> I'd need to change the way that the SSI JAR file is built in
>>> order to achieve this. But before doing so, I wanted to get
>>> consensus on what to do with these files.
> 
>> Have you removed all the other dependencies? FastHttpDateFormat, 
>> StringManager, JULI, IOTools etc?
> 
> No, I haven't. I figured this would turn into a bit of a rat hole so I
> wanted to discuss before doing anything.
> 
> This is just a first step towards being able to separate SSI. If SSI
> isn't required, the JAR file can be removed from the distribution and
> the only sloppiness will be that the locallized strings will remain in
> other JAR files.

I think that is a reasonable first step.

> But for the future, if SSI were indeed able to be separated-out into a
> standalone product (with obvious dependencies), this would need to be
> resolved. It's fine to kick the can down the road a bit on this
> decision and/or action, but I wanted to bring it up before I committed
> anything.

I'd lean towards kicking the can down the road.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Bundling of localized messages

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mark,

On 11/19/19 07:08, Mark Thomas wrote:
> <snip/>
> 
>> Is there a particular reason (a) the translations are in a
>> separate JAR file - i.e. not in catalina.jar and (b) they are
>> separated by language? Perhaps the thought was that, knowing that
>> you don't need e.g. Korean means you can remove the JAR file from
>> some kind of bare-ones distribution.
> 
> Essentially, yes. The intention was to make it easy to use the
> default English text if users didn't need / didn't want the
> translations.
> 
>> For SSI, at least, I think it makes sense to bundle all the i18n
>> files together in the same JAR file. I'm using the <jarIt> macro
>> to build my JAR file which explicitly <excludes>
>> LocalStrings_*.properties from whatever JAR file is being built.
>> I'd need to change the way that the SSI JAR file is built in
>> order to achieve this. But before doing so, I wanted to get
>> consensus on what to do with these files.
> 
> Have you removed all the other dependencies? FastHttpDateFormat, 
> StringManager, JULI, IOTools etc?

No, I haven't. I figured this would turn into a bit of a rat hole so I
wanted to discuss before doing anything.

This is just a first step towards being able to separate SSI. If SSI
isn't required, the JAR file can be removed from the distribution and
the only sloppiness will be that the locallized strings will remain in
other JAR files.

But for the future, if SSI were indeed able to be separated-out into a
standalone product (with obvious dependencies), this would need to be
resolved. It's fine to kick the can down the road a bit on this
decision and/or action, but I wanted to bring it up before I committed
anything.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl3VkE0ACgkQHPApP6U8
pFh4QA//Q8jV7CMRUYaLmrscGxYwkN3MvbPrQhqr1FXcCgwEVNLOmcJzv5oGTlV+
WwXUOEWA8vTY8tmcg48zvOPjrieTM7bMe6iYE3/ml4ILy1fL1TnxrCq/YZumndvP
5lGauWJr+eYHd76eghVrZvM+9on9ZLziAemZZPREPJYNe4oYOH00heeAuBWXY8UX
Mp9T4/C7KsU00x4wIV73XmPeQFO1J2VQwRNSJY46thGSc4RbIdH+5eCtjxt07T4b
OPkG9k0yUXc8pNJVGK1nshHJ31ENo0fUudy05Cg7PCvud67h039XQPIcfplz1ii6
HVLh6NaCPxirHK8l/8ick7vIQf+u1wkBIvOmsBxmIEcTm4ROljro83b8FdE26BQv
EZ6uKLl/tFeFZzZfbW2glWdwGg+x8KWvryFk4bOomR6dhQnXthg3w8DRT6Z0K9EZ
YjFA9yfFWq86CHnLbIA8LasZTseJnepLFmQLOm9nDwq7yni19Z4E8Kykt7wEHtOE
HJzyIpC7mYrLjG8E6itVeNOvaIy+fbiVnt578dKD671VaedIJxHhuwtbZzpJGiiE
McIoh12RFAJS6RmOuzLbtubyynr76v7D052UfkjGwI2Cjb4XtQ1CyPnB7YoK5pIV
s4R0pt799MIK2xMoI51BRijtn9VJEN6hLpVe+ygl0HC/ouW9hQU=
=7Q7A
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Bundling of localized messages

Posted by Mark Thomas <ma...@apache.org>.
<snip/>

> Is there a particular reason (a) the translations are in a separate
> JAR file - i.e. not in catalina.jar and (b) they are separated by
> language? Perhaps the thought was that, knowing that you don't need
> e.g. Korean means you can remove the JAR file from some kind of
> bare-ones distribution.

Essentially, yes. The intention was to make it easy to use the default
English text if users didn't need / didn't want the translations.

> For SSI, at least, I think it makes sense to bundle all the i18n files
> together in the same JAR file. I'm using the <jarIt> macro to build my
> JAR file which explicitly <excludes> LocalStrings_*.properties from
> whatever JAR file is being built. I'd need to change the way that the
> SSI JAR file is built in order to achieve this. But before doing so, I
> wanted to get consensus on what to do with these files.

Have you removed all the other dependencies? FastHttpDateFormat,
StringManager, JULI, IOTools etc?

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org