You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by Howard Lewis Ship <hl...@gmail.com> on 2005/01/25 15:02:27 UTC

Removing %key contribution syntax

I'd like to take a crack at allowing the locale to be changed
dynamically. This would be more in keeping with HiveMind + a web
application (i.e., Tapestry), where each thread/request may want
messages localized to a different locale.

I pretty much know how  this will work:
- Registry's locale is the *default* locale
- A LocaleHolder service that stores the locale for the current thread
- A MessagesProxy

MessagesProxy: The proxy is what's injected into services.  It's
implementation will get the Locale from the LocaleHolder and ask the
Module for the concrete Messages for that locale, and redirect
implementations to that concrete Messages instance.

The only problem is the %key syntax in the descriptors.  That will
only be evaluated ONCE and in some arbitrary locale. I would propose
that the syntax be removed (or, at the very least, deprecated). 
Thoughts?

-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Re: Removing %key contribution syntax

Posted by Knut Wannheden <kn...@gmail.com>.
That makes sense.  I haven't really ever used the %key stuff so I
wasn't quite aware of how it works. I thought these would be expanded
using the locale with which the JVM was started.

I guess it also depends on what you use the %key stuff for. If you'd
use it to provide localized descriptions for the elements in the
descriptor (don't even know if that works) then that would certainly
be useful as this is out of scope for the Messages objects.

--knut

On Tue, 25 Jan 2005 11:31:53 -0500, Howard Lewis Ship <hl...@gmail.com> wrote:
> So I access a web application and part of the request involves a
> service and a configuration, part of which is a %key contribution.
> I'm localized to english, so the %key is expanded based on the
> module_en.properties file.
> 
> Later, you perform the same operation, but you are localized to German
> (or  are you Swiss  ... please allow).  Anyway, you hit the same
> service and the same configuration, but the configuration is only
> converted from XML -> Java Objects once. So you'll see the english
> localization of %key, even if there's a module_de.properties file.
> 
> By removing %key, we're shifting some responsibility for localization
> back onto the services (the consumers of the configuration) and
> removing some potential for non-intuitive runtime behavior.
> 
> Now, a more complicated system than HiveMind might be able to track
> all this localization, and have parallel services for different
> locales, with parallel configurations as well.  I'm going for the
> simplest system that works.
> 
> Eclipse doesn't have this issue with its plugin.xml files, because the
> locale doesn't change during runtime.
> 
> On Tue, 25 Jan 2005 17:24:53 +0100, Knut Wannheden
> <kn...@gmail.com> wrote:
> > Howard,
> >
> > I don't quite understand how the %-notation in the descriptors at all
> > affect the message localization. I thought all the messages generated
> > by the services would stem from the injected Messages (or now the
> > MessagesProxy). The % stuff in the descriptor OTOH would be used to
> > for instance to provide localized descriptions for services and
> > configuration points. Where is the overlap?
> >
> > --knut
> >
> > On Tue, 25 Jan 2005 09:02:27 -0500, Howard Lewis Ship <hl...@gmail.com> wrote:
> > > I'd like to take a crack at allowing the locale to be changed
> > > dynamically. This would be more in keeping with HiveMind + a web
> > > application (i.e., Tapestry), where each thread/request may want
> > > messages localized to a different locale.
> > >
> > > I pretty much know how  this will work:
> > > - Registry's locale is the *default* locale
> > > - A LocaleHolder service that stores the locale for the current thread
> > > - A MessagesProxy
> > >
> > > MessagesProxy: The proxy is what's injected into services.  It's
> > > implementation will get the Locale from the LocaleHolder and ask the
> > > Module for the concrete Messages for that locale, and redirect
> > > implementations to that concrete Messages instance.
> > >
> > > The only problem is the %key syntax in the descriptors.  That will
> > > only be evaluated ONCE and in some arbitrary locale. I would propose
> > > that the syntax be removed (or, at the very least, deprecated).
> > > Thoughts?
> > >
> > > --
> > > Howard M. Lewis Ship
> > > Independent J2EE / Open-Source Java Consultant
> > > Creator, Jakarta Tapestry
> > > Creator, Jakarta HiveMind
> > >
> > > Professional Tapestry training, mentoring, support
> > > and project work.  http://howardlewisship.com
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> > >
> > >
> >
> 
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> 
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> 
>

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


Re: Removing %key contribution syntax

Posted by Howard Lewis Ship <hl...@gmail.com>.
So I access a web application and part of the request involves a
service and a configuration, part of which is a %key contribution. 
I'm localized to english, so the %key is expanded based on the
module_en.properties file.

Later, you perform the same operation, but you are localized to German
(or  are you Swiss  ... please allow).  Anyway, you hit the same
service and the same configuration, but the configuration is only
converted from XML -> Java Objects once. So you'll see the english
localization of %key, even if there's a module_de.properties file.

By removing %key, we're shifting some responsibility for localization
back onto the services (the consumers of the configuration) and
removing some potential for non-intuitive runtime behavior.

Now, a more complicated system than HiveMind might be able to track
all this localization, and have parallel services for different
locales, with parallel configurations as well.  I'm going for the
simplest system that works.

Eclipse doesn't have this issue with its plugin.xml files, because the
locale doesn't change during runtime.

On Tue, 25 Jan 2005 17:24:53 +0100, Knut Wannheden
<kn...@gmail.com> wrote:
> Howard,
> 
> I don't quite understand how the %-notation in the descriptors at all
> affect the message localization. I thought all the messages generated
> by the services would stem from the injected Messages (or now the
> MessagesProxy). The % stuff in the descriptor OTOH would be used to
> for instance to provide localized descriptions for services and
> configuration points. Where is the overlap?
> 
> --knut
> 
> On Tue, 25 Jan 2005 09:02:27 -0500, Howard Lewis Ship <hl...@gmail.com> wrote:
> > I'd like to take a crack at allowing the locale to be changed
> > dynamically. This would be more in keeping with HiveMind + a web
> > application (i.e., Tapestry), where each thread/request may want
> > messages localized to a different locale.
> >
> > I pretty much know how  this will work:
> > - Registry's locale is the *default* locale
> > - A LocaleHolder service that stores the locale for the current thread
> > - A MessagesProxy
> >
> > MessagesProxy: The proxy is what's injected into services.  It's
> > implementation will get the Locale from the LocaleHolder and ask the
> > Module for the concrete Messages for that locale, and redirect
> > implementations to that concrete Messages instance.
> >
> > The only problem is the %key syntax in the descriptors.  That will
> > only be evaluated ONCE and in some arbitrary locale. I would propose
> > that the syntax be removed (or, at the very least, deprecated).
> > Thoughts?
> >
> > --
> > Howard M. Lewis Ship
> > Independent J2EE / Open-Source Java Consultant
> > Creator, Jakarta Tapestry
> > Creator, Jakarta HiveMind
> >
> > Professional Tapestry training, mentoring, support
> > and project work.  http://howardlewisship.com
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> >
> >
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Re: Removing %key contribution syntax

Posted by Knut Wannheden <kn...@gmail.com>.
Howard,

I don't quite understand how the %-notation in the descriptors at all
affect the message localization. I thought all the messages generated
by the services would stem from the injected Messages (or now the
MessagesProxy). The % stuff in the descriptor OTOH would be used to
for instance to provide localized descriptions for services and
configuration points. Where is the overlap?

--knut

On Tue, 25 Jan 2005 09:02:27 -0500, Howard Lewis Ship <hl...@gmail.com> wrote:
> I'd like to take a crack at allowing the locale to be changed
> dynamically. This would be more in keeping with HiveMind + a web
> application (i.e., Tapestry), where each thread/request may want
> messages localized to a different locale.
> 
> I pretty much know how  this will work:
> - Registry's locale is the *default* locale
> - A LocaleHolder service that stores the locale for the current thread
> - A MessagesProxy
> 
> MessagesProxy: The proxy is what's injected into services.  It's
> implementation will get the Locale from the LocaleHolder and ask the
> Module for the concrete Messages for that locale, and redirect
> implementations to that concrete Messages instance.
> 
> The only problem is the %key syntax in the descriptors.  That will
> only be evaluated ONCE and in some arbitrary locale. I would propose
> that the syntax be removed (or, at the very least, deprecated).
> Thoughts?
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> 
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> 
>

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


RE: [SPAM] Removing %key contribution syntax

Posted by Hal Hildebrand <ha...@hellblazer.com>.
Got my vote.  I'm all for keeping things focused and simple.  It'd be a pity
if Hivemind bloated up much more.

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com]  

I understand the importance of localization and I agree that it is often
overlooked.  My point is that localization isn't a key feature for a
dependency injection container and shouldn't be woven into the core
framework.  I would recommend that we come up with a highly configurable and
easy to use localization framework (or service) and include it with HiveMind
in the hivemind-lib.   

-----Original Message-----
From: Howard Lewis Ship [mailto:hlship@gmail.com]  

Localization is one of the most important, and under-implemented,
aspects of web applications.  Tapestry has always had excellent
support for localization, and as Tapestry 3.1 is refactored around
HiveMind 1.1, I want to ensure that we can continue to support
localization.

The key issue is that each request (in each thread) will be for a
different user and potentially in a different locale.  The emphasis in
3.1 and beyond is to move application logic into HiveMInd ... but we
still want to be able to produce error (and other) messages in the
user's preferred locale.

HiveMind's mandate, to be contained within a single JVM, gives us the
tool (threaded server model) to track the user's domain through the
presentation layer (Tapestry) and into the application layer
(HiveMind services) ... something that is awkward to accomplish in the
nomral EJB-style layering (without considerable forethought).


On Tue, 25 Jan 2005 11:29:44 -0500, James Carman
<ja...@carmanconsulting.com> wrote:
> I'm all for completely removing the Locale stuff from the registry
> altogether.  So, you know I'd be for this, since it's a step in that
> direction.  I just don't understand why we need to muddy up a dependency
> injection (or IoC) container with localization stuff.
>
> -----Original Message-----
> From: Howard Lewis Ship [mailto:hlship@gmail.com]
> Sent: Tuesday, January 25, 2005 9:02 AM
> To: hivemind-dev@jakarta.apache.org
> Subject: [SPAM] Removing %key contribution syntax
>
> I'd like to take a crack at allowing the locale to be changed
> dynamically. This would be more in keeping with HiveMind + a web
> application (i.e., Tapestry), where each thread/request may want
> messages localized to a different locale.
>
> I pretty much know how  this will work:
> - Registry's locale is the *default* locale
> - A LocaleHolder service that stores the locale for the current thread
> - A MessagesProxy
>
> MessagesProxy: The proxy is what's injected into services.  It's
> implementation will get the Locale from the LocaleHolder and ask the
> Module for the concrete Messages for that locale, and redirect
> implementations to that concrete Messages instance.
>
> The only problem is the %key syntax in the descriptors.  That will
> only be evaluated ONCE and in some arbitrary locale. I would propose
> that the syntax be removed (or, at the very least, deprecated).
> Thoughts?
>
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
>
>

--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For a^Q0Îional commands, e-mail: hivemind-dev-help@jakarta.apache.org



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



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


RE: [SPAM] Removing %key contribution syntax

Posted by James Carman <ja...@carmanconsulting.com>.
I understand the importance of localization and I agree that it is often
overlooked.  My point is that localization isn't a key feature for a
dependency injection container and shouldn't be woven into the core
framework.  I would recommend that we come up with a highly configurable and
easy to use localization framework (or service) and include it with HiveMind
in the hivemind-lib.   

-----Original Message-----
From: Howard Lewis Ship [mailto:hlship@gmail.com] 
Sent: Tuesday, January 25, 2005 1:52 PM
To: hivemind-dev@jakarta.apache.org
Subject: Fwd: [SPAM] Removing %key contribution syntax

Localization is one of the most important, and under-implemented,
aspects of web applications.  Tapestry has always had excellent
support for localization, and as Tapestry 3.1 is refactored around
HiveMind 1.1, I want to ensure that we can continue to support
localization.

The key issue is that each request (in each thread) will be for a
different user and potentially in a different locale.  The emphasis in
3.1 and beyond is to move application logic into HiveMInd ... but we
still want to be able to produce error (and other) messages in the
user's preferred locale.

HiveMind's mandate, to be contained within a single JVM, gives us the
tool (threaded server model) to track the user's domain through the
presentation layer (Tapestry) and into the application layer
(HiveMind services) ... something that is awkward to accomplish in the
nomral EJB-style layering (without considerable forethought).


On Tue, 25 Jan 2005 11:29:44 -0500, James Carman
<ja...@carmanconsulting.com> wrote:
> I'm all for completely removing the Locale stuff from the registry
> altogether.  So, you know I'd be for this, since it's a step in that
> direction.  I just don't understand why we need to muddy up a dependency
> injection (or IoC) container with localization stuff.
>
> -----Original Message-----
> From: Howard Lewis Ship [mailto:hlship@gmail.com]
> Sent: Tuesday, January 25, 2005 9:02 AM
> To: hivemind-dev@jakarta.apache.org
> Subject: [SPAM] Removing %key contribution syntax
>
> I'd like to take a crack at allowing the locale to be changed
> dynamically. This would be more in keeping with HiveMind + a web
> application (i.e., Tapestry), where each thread/request may want
> messages localized to a different locale.
>
> I pretty much know how  this will work:
> - Registry's locale is the *default* locale
> - A LocaleHolder service that stores the locale for the current thread
> - A MessagesProxy
>
> MessagesProxy: The proxy is what's injected into services.  It's
> implementation will get the Locale from the LocaleHolder and ask the
> Module for the concrete Messages for that locale, and redirect
> implementations to that concrete Messages instance.
>
> The only problem is the %key syntax in the descriptors.  That will
> only be evaluated ONCE and in some arbitrary locale. I would propose
> that the syntax be removed (or, at the very least, deprecated).
> Thoughts?
>
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
>
>

--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For a^Q0Îional commands, e-mail: hivemind-dev-help@jakarta.apache.org



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


Fwd: [SPAM] Removing %key contribution syntax

Posted by Howard Lewis Ship <hl...@gmail.com>.
Localization is one of the most important, and under-implemented,
aspects of web applications.  Tapestry has always had excellent
support for localization, and as Tapestry 3.1 is refactored around
HiveMind 1.1, I want to ensure that we can continue to support
localization.

The key issue is that each request (in each thread) will be for a
different user and potentially in a different locale.  The emphasis in
3.1 and beyond is to move application logic into HiveMInd ... but we
still want to be able to produce error (and other) messages in the
user's preferred locale.

HiveMind's mandate, to be contained within a single JVM, gives us the
tool (threaded server model) to track the user's domain through the
presentation layer (Tapestry) and into the application layer
(HiveMind services) ... something that is awkward to accomplish in the
nomral EJB-style layering (without considerable forethought).


On Tue, 25 Jan 2005 11:29:44 -0500, James Carman
<ja...@carmanconsulting.com> wrote:
> I'm all for completely removing the Locale stuff from the registry
> altogether.  So, you know I'd be for this, since it's a step in that
> direction.  I just don't understand why we need to muddy up a dependency
> injection (or IoC) container with localization stuff.
>
> -----Original Message-----
> From: Howard Lewis Ship [mailto:hlship@gmail.com]
> Sent: Tuesday, January 25, 2005 9:02 AM
> To: hivemind-dev@jakarta.apache.org
> Subject: [SPAM] Removing %key contribution syntax
>
> I'd like to take a crack at allowing the locale to be changed
> dynamically. This would be more in keeping with HiveMind + a web
> application (i.e., Tapestry), where each thread/request may want
> messages localized to a different locale.
>
> I pretty much know how  this will work:
> - Registry's locale is the *default* locale
> - A LocaleHolder service that stores the locale for the current thread
> - A MessagesProxy
>
> MessagesProxy: The proxy is what's injected into services.  It's
> implementation will get the Locale from the LocaleHolder and ask the
> Module for the concrete Messages for that locale, and redirect
> implementations to that concrete Messages instance.
>
> The only problem is the %key syntax in the descriptors.  That will
> only be evaluated ONCE and in some arbitrary locale. I would propose
> that the syntax be removed (or, at the very least, deprecated).
> Thoughts?
>
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
>
>

--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Re: [SPAM] Removing %key contribution syntax

Posted by Howard Lewis Ship <hl...@gmail.com>.
Localization is one of the most important, and under-implemented,
aspects of web applications.  Tapestry has always had excellent
support for localization, and as Tapestry 3.1 is refactored around
HiveMind 1.1, I want to ensure that we can continue to support
localization.

The key issue is that each request (in each thread) will be for a
different user and potentially in a different locale.  The emphasis in
3.1 and beyond is to move application logic into HiveMInd ... but we
still want to be able to produce error (and other) messages in the
user's preferred locale.

HiveMind's mandate, to be contained within a single JVM, gives us the
tool (threaded server model) to track the user's domain through the
presentation layer (Tapestry) and into the application layer 
(HiveMind services) ... something that is awkward to accomplish in the
nomral EJB-style layering (without considerable forethought).


On Tue, 25 Jan 2005 11:29:44 -0500, James Carman
<ja...@carmanconsulting.com> wrote:
> I'm all for completely removing the Locale stuff from the registry
> altogether.  So, you know I'd be for this, since it's a step in that
> direction.  I just don't understand why we need to muddy up a dependency
> injection (or IoC) container with localization stuff.
> 
> -----Original Message-----
> From: Howard Lewis Ship [mailto:hlship@gmail.com]
> Sent: Tuesday, January 25, 2005 9:02 AM
> To: hivemind-dev@jakarta.apache.org
> Subject: [SPAM] Removing %key contribution syntax
> 
> I'd like to take a crack at allowing the locale to be changed
> dynamically. This would be more in keeping with HiveMind + a web
> application (i.e., Tapestry), where each thread/request may want
> messages localized to a different locale.
> 
> I pretty much know how  this will work:
> - Registry's locale is the *default* locale
> - A LocaleHolder service that stores the locale for the current thread
> - A MessagesProxy
> 
> MessagesProxy: The proxy is what's injected into services.  It's
> implementation will get the Locale from the LocaleHolder and ask the
> Module for the concrete Messages for that locale, and redirect
> implementations to that concrete Messages instance.
> 
> The only problem is the %key syntax in the descriptors.  That will
> only be evaluated ONCE and in some arbitrary locale. I would propose
> that the syntax be removed (or, at the very least, deprecated).
> Thoughts?
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> 
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


RE: [SPAM] Removing %key contribution syntax

Posted by James Carman <ja...@carmanconsulting.com>.
I'm all for completely removing the Locale stuff from the registry
altogether.  So, you know I'd be for this, since it's a step in that
direction.  I just don't understand why we need to muddy up a dependency
injection (or IoC) container with localization stuff.  

-----Original Message-----
From: Howard Lewis Ship [mailto:hlship@gmail.com] 
Sent: Tuesday, January 25, 2005 9:02 AM
To: hivemind-dev@jakarta.apache.org
Subject: [SPAM] Removing %key contribution syntax

I'd like to take a crack at allowing the locale to be changed
dynamically. This would be more in keeping with HiveMind + a web
application (i.e., Tapestry), where each thread/request may want
messages localized to a different locale.

I pretty much know how  this will work:
- Registry's locale is the *default* locale
- A LocaleHolder service that stores the locale for the current thread
- A MessagesProxy

MessagesProxy: The proxy is what's injected into services.  It's
implementation will get the Locale from the LocaleHolder and ask the
Module for the concrete Messages for that locale, and redirect
implementations to that concrete Messages instance.

The only problem is the %key syntax in the descriptors.  That will
only be evaluated ONCE and in some arbitrary locale. I would propose
that the syntax be removed (or, at the very least, deprecated). 
Thoughts?

-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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



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