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

Fwd: override the default message!!

Now that Tapestry 5.2 supports multiple message catalogs merged to
form the global message catalog, I think it would be good (in 5.2 or
5.3) to merge all the individual component message catalogs into a
single Tapestry library message catalog.

The message catalog could be contributed before the application message catalog.

This would make it very easy for an application to override standard
messages used by core components, such as the "You must correct the
following errors" message.

I think it would also make supporting additional locales easier, as it
would be a single file to translate, rather than a scattering of
individual files.


---------- Forwarded message ----------
From: Fanzhen <fa...@hotmail.com>
Date: Thu, Sep 9, 2010 at 8:33 AM
Subject: Re: override the default message!!
To: Tapestry users <us...@tapestry.apache.org>



 thank you for your reply. yes,I did.

When I change

org.apache.tapestry5.corelib.components.Errors_zh_cn.properties
org.apache.tapestry5.internal.ValidationMessages_zh_cn.properties

to

org.apache.tapestry5.corelib.components.Errors.properties
org.apache.tapestry5.internal.ValidationMessages.properties

It is ok now. but I feel a little strange about this way.




On 2010-9-9 19:33, Borut Bolčina wrote:
>
> Did you contribute to the ApplicationDefaults?
>
> public static void contributeApplicationDefaults(MappedConfiguration<String,
> String>  configuration) {
>         configuration.add(SymbolConstants.SUPPORTED_LOCALES, "zh_cn,en");
> ...
>
>
>
> -bob
>
> 2010/9/9 Fanzhen<fa...@hotmail.com>
>
>>  hey friends,
>>
>> tapestry5 return me "You must correct the following errors before you may
>> continue.xxxxxx"
>>
>> are there some methods to override it with my own custom message?
>>
>> I have search it via Google . what I got is :
>>
>> should to create two files in my project with the same package as Tapestry.
>>
>> org.apache.tapestry5.corelib.components.Errors_zh_cn.properties
>> org.apache.tapestry5.internal.ValidationMessages_zh_cn.properties
>>
>> but it seems it doesn't work well for me , and I thought it is not a good
>> method well.
>> this way make my project strange!!!!
>>
>> so , any help are welcome!!!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>


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




-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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


Re: override the default message!!

Posted by Christian Gruber <cg...@google.com>.
+1

On Sep 9, 2010, at 12:01 PM, Howard Lewis Ship wrote:

> Now that Tapestry 5.2 supports multiple message catalogs merged to
> form the global message catalog, I think it would be good (in 5.2 or
> 5.3) to merge all the individual component message catalogs into a
> single Tapestry library message catalog.
> 
> The message catalog could be contributed before the application message catalog.
> 
> This would make it very easy for an application to override standard
> messages used by core components, such as the "You must correct the
> following errors" message.
> 
> I think it would also make supporting additional locales easier, as it
> would be a single file to translate, rather than a scattering of
> individual files.
> 
> 
> ---------- Forwarded message ----------
> From: Fanzhen <fa...@hotmail.com>
> Date: Thu, Sep 9, 2010 at 8:33 AM
> Subject: Re: override the default message!!
> To: Tapestry users <us...@tapestry.apache.org>
> 
> 
> 
>  thank you for your reply. yes,I did.
> 
> When I change
> 
> org.apache.tapestry5.corelib.components.Errors_zh_cn.properties
> org.apache.tapestry5.internal.ValidationMessages_zh_cn.properties
> 
> to
> 
> org.apache.tapestry5.corelib.components.Errors.properties
> org.apache.tapestry5.internal.ValidationMessages.properties
> 
> It is ok now. but I feel a little strange about this way.
> 
> 
> 
> 
> On 2010-9-9 19:33, Borut Bolčina wrote:
>> 
>> Did you contribute to the ApplicationDefaults?
>> 
>> public static void contributeApplicationDefaults(MappedConfiguration<String,
>> String>  configuration) {
>>         configuration.add(SymbolConstants.SUPPORTED_LOCALES, "zh_cn,en");
>> ...
>> 
>> 
>> 
>> -bob
>> 
>> 2010/9/9 Fanzhen<fa...@hotmail.com>
>> 
>>>  hey friends,
>>> 
>>> tapestry5 return me "You must correct the following errors before you may
>>> continue.xxxxxx"
>>> 
>>> are there some methods to override it with my own custom message?
>>> 
>>> I have search it via Google . what I got is :
>>> 
>>> should to create two files in my project with the same package as Tapestry.
>>> 
>>> org.apache.tapestry5.corelib.components.Errors_zh_cn.properties
>>> org.apache.tapestry5.internal.ValidationMessages_zh_cn.properties
>>> 
>>> but it seems it doesn't work well for me , and I thought it is not a good
>>> method well.
>>> this way make my project strange!!!!
>>> 
>>> so , any help are welcome!!!
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>> 
>>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> 
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
> 
> (971) 678-5210
> http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
> 


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


Re: override the default message!!

Posted by Massimo Lusetti <ml...@gmail.com>.
On Thu, Sep 9, 2010 at 6:01 PM, Howard Lewis Ship <hl...@gmail.com> wrote:

> I think it would also make supporting additional locales easier, as it
> would be a single file to translate, rather than a scattering of
> individual files.

I was dreaming about this and even suggesting something similar since
about T5.0-beta days!

That would be awesome!

Cheers
-- 
Massimo
http://meridio.blogspot.com

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