You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Takashi Okamoto <to...@kun.ne.jp> on 2003/10/18 08:50:04 UTC

[PROPOSAL] Internatinalizing log and error messages

Hi velocity,

Velocity supports properties for input and output encoding, it's good
for I18N and we Japanese can use Velocity without problem, thanks.

However log and error messages are not internationalized yet. So we
Ja-Jakarta member would like to improve this point.

Out proposal is using commons-resources and externalizing the log and
error message. But there is one concern. commons resources is not
released yet and I wonder you accept our proposal or not. Out proposal
may be commited in velocity 1.5 not 1.4. If so, there is a lot of time
commons-resources will be stable. If you agree my proposal, we will
improve velocity and send patch.

I would like to hear your opinion and what we should do. 


BTW, you have link to Japanse translations page at velocity top
page. This link is obsolete. Could you fix for new url
'http://www.jajakarta.org/velocity/'?

regards,

Takashi Okamoto            Ja-Jakarta Project http://www.jajakarta.org/

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


Re: [general:01488] [report:00053] Re: [PROPOSAL] Internatinalizing log and error messages

Posted by Takashi Okamoto <to...@kun.ne.jp>.
Hi Geir, 

From: report@jajakarta.org
Subject: [general:01488] [report:00053] Re: [PROPOSAL] Internatinalizing log and error messages
Date: Tue, 21 Oct 2003 08:07:21 -0400
> I think it would be cool to internationalize the log and error 
> messages.  However, it would be nicer to be able to bind that into the 
> vel jar, so you aren't toting lots of dependencies around with you when 
> you need velocity.  

I see. Tomcat provids StringManager class which provide convinience
function for I18N. Struts also use StringManager copy with difference
package name from tomcat's.

However it's a little trouble. So it's not good idea each application
have same function as their own class. They should share same code. In
the fact, I heard Struts will use commons resources in the future and
tomcat maybe. I think use commons resources is better then copy
StringManager class.

> Any way that can be done w/ commons resources?  

Yes. I tested the function that I need to intenationalize
velocity. They works fine:)

> Isn't there resource support in the JDK already?

Yes, it is ResourceBundle class. However it's provide just basic
function. Tomcat's StringManager and commons-resources provide more
progressive function. They are wrapper of ResourceBundle.


Well, there is two choise for it. Please select,

(1) copy StringManager from tomcat and rename packages for Velocity.
    (ex. org.apache.velocity.util.StringManager). This don't provide
    additional jar file but can't share code.

(2) use commons-resources to share common code. But this needs
    additional jar.


I strongly recommend (2) but your opinion seems (1). Do you still
support (1) after read this mail?

> > 'http://www.jajakarta.org/velocity/'?
> 
> done.  Could you add the ApacheCon logo to the site?

Ok, we'll add it soon.

regards,

Takashi Okamoto

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


Re: [PROPOSAL] Internatinalizing log and error messages

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Geir Magnusson Jr. wrote:
> 
> On Wednesday, October 22, 2003, at 02:46 PM, Daniel Rall wrote:
> 
>> Geir Magnusson Jr. wrote:
>>
>>> On Saturday, October 18, 2003, at 02:50 AM, Takashi Okamoto wrote:
>>
>> ...
>>
>>>> Out proposal is using commons-resources and externalizing the log and
>>>> error message. But there is one concern. commons resources is not
>>>> released yet and I wonder you accept our proposal or not. Out proposal
>>>> may be commited in velocity 1.5 not 1.4. If so, there is a lot of time
>>>> commons-resources will be stable. If you agree my proposal, we will
>>>> improve velocity and send patch.
>>>>
>>>> I would like to hear your opinion and what we should do.
>>>
>>> I think it would be cool to internationalize the log and error 
>>> messages.  However, it would be nicer to be able to bind that into 
>>> the vel jar, so you aren't toting lots of dependencies around with 
>>> you when you need velocity.  Any way that can be done w/ commons 
>>> resources?  Isn't there resource support in the JDK already?
>>
>>
>> There is.  However, use of ResourceBundle involves internal 
>> synchronization, which is detrimental in a highly multi-threaded 
>> situation like a web app. Commons Resources seeks to fix this 
>> situation.  Regardless, I'd be in favor of getting some L10N in, even 
>> if it's just using ResourceBundle as a first step.
>>
> 
> Aren't we talking about static resources?  I mean, the resource bundle 
> won't change during runtime.  Won't that help?

ResourceBundle has been part of the JDK for long enough that it was implemented 
using synchronized classes.  Indeed, it does not need to be internally synch'd 
-- it's a backwards compatibility issue for Sun, I think.



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


Re: [PROPOSAL] Internatinalizing log and error messages

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On Wednesday, October 22, 2003, at 02:46 PM, Daniel Rall wrote:

> Geir Magnusson Jr. wrote:
>> On Saturday, October 18, 2003, at 02:50 AM, Takashi Okamoto wrote:
> ...
>>> Out proposal is using commons-resources and externalizing the log and
>>> error message. But there is one concern. commons resources is not
>>> released yet and I wonder you accept our proposal or not. Out 
>>> proposal
>>> may be commited in velocity 1.5 not 1.4. If so, there is a lot of 
>>> time
>>> commons-resources will be stable. If you agree my proposal, we will
>>> improve velocity and send patch.
>>>
>>> I would like to hear your opinion and what we should do.
>> I think it would be cool to internationalize the log and error 
>> messages.  However, it would be nicer to be able to bind that into 
>> the vel jar, so you aren't toting lots of dependencies around with 
>> you when you need velocity.  Any way that can be done w/ commons 
>> resources?  Isn't there resource support in the JDK already?
>
> There is.  However, use of ResourceBundle involves internal 
> synchronization, which is detrimental in a highly multi-threaded 
> situation like a web app. Commons Resources seeks to fix this 
> situation.  Regardless, I'd be in favor of getting some L10N in, even 
> if it's just using ResourceBundle as a first step.
>

Aren't we talking about static resources?  I mean, the resource bundle 
won't change during runtime.  Won't that help?

>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>
-- 
Geir Magnusson Jr                                   203-247-1713(m)
geirm@optonline.net


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


Re: [PROPOSAL] Internatinalizing log and error messages

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Geir Magnusson Jr. wrote:
> 
> On Saturday, October 18, 2003, at 02:50 AM, Takashi Okamoto wrote:
...
>> Out proposal is using commons-resources and externalizing the log and
>> error message. But there is one concern. commons resources is not
>> released yet and I wonder you accept our proposal or not. Out proposal
>> may be commited in velocity 1.5 not 1.4. If so, there is a lot of time
>> commons-resources will be stable. If you agree my proposal, we will
>> improve velocity and send patch.
>>
>> I would like to hear your opinion and what we should do.
> 
> I think it would be cool to internationalize the log and error 
> messages.  However, it would be nicer to be able to bind that into the 
> vel jar, so you aren't toting lots of dependencies around with you when 
> you need velocity.  Any way that can be done w/ commons resources?  
> Isn't there resource support in the JDK already?

There is.  However, use of ResourceBundle involves internal synchronization, 
which is detrimental in a highly multi-threaded situation like a web app. 
Commons Resources seeks to fix this situation.  Regardless, I'd be in favor of 
getting some L10N in, even if it's just using ResourceBundle as a first step.



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


Re: [PROPOSAL] Internatinalizing log and error messages

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On Saturday, October 18, 2003, at 02:50 AM, Takashi Okamoto wrote:

> Hi velocity,
>
> Velocity supports properties for input and output encoding, it's good
> for I18N and we Japanese can use Velocity without problem, thanks.
>
> However log and error messages are not internationalized yet. So we
> Ja-Jakarta member would like to improve this point.
>
> Out proposal is using commons-resources and externalizing the log and
> error message. But there is one concern. commons resources is not
> released yet and I wonder you accept our proposal or not. Out proposal
> may be commited in velocity 1.5 not 1.4. If so, there is a lot of time
> commons-resources will be stable. If you agree my proposal, we will
> improve velocity and send patch.
>
> I would like to hear your opinion and what we should do.

I think it would be cool to internationalize the log and error 
messages.  However, it would be nicer to be able to bind that into the 
vel jar, so you aren't toting lots of dependencies around with you when 
you need velocity.  Any way that can be done w/ commons resources?  
Isn't there resource support in the JDK already?

>
>
> BTW, you have link to Japanse translations page at velocity top
> page. This link is obsolete. Could you fix for new url
> 'http://www.jajakarta.org/velocity/'?

done.  Could you add the ApacheCon logo to the site?

>
> regards,
>
> Takashi Okamoto            Ja-Jakarta Project http://www.jajakarta.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>
-- 
Geir Magnusson Jr                                   203-247-1713(m)
geirm@optonline.net


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