On Tue, 2006-12-19 at 11:22 +0100, Cyrille37 wrote:
> Marilen Corciovei a écrit :
> > In fact you don't need to overwrite the ValidationStrings.properties
> > which is supposed to be the default one. You just need to have the
> > ValidationStrings_{locale_code}.properties. In order to add french
> > validation to Tapestry I created a Tapestry-french-validation.jar in the
> > lib with the following content:
> >
> > jar tvf Tapestry-french-validation.jar
> >
> > 0 Sun May 01 14:06:18 EEST 2005 META-INF/
> > 106 Sun May 01 14:06:16 EEST 2005 META-INF/MANIFEST.MF
> > 0 Sun May 01 14:06:18 EEST 2005 org/
> > 0 Sun May 01 14:06:18 EEST 2005 org/apache/
> > 0 Sun May 01 14:06:18 EEST 2005 org/apache/tapestry/
> > 0 Sun May 01 14:06:18 EEST 2005 org/apache/tapestry/valid/
> > 902 Sun May 01 14:06:18 EEST 2005
> > org/apache/tapestry/valid/ValidationStrings_fr.properties
> >
> Hello,
> Thank you Len.
>
> That is great for default validation messages translation, but not for
> 'custom' messages, isn't it ?
You are right. For custom messages either for page/component
translations or other messages in the application I know only of 2
mechanisms:
- per page/component messages stored in the
page/component_{locale}.properties which can then be accessed using the
message: syntax, span key = in the template or getMessage in the code. I
do not like this too much because you end up having a lot of files
- global using the standard java MessageStore mechanism but then you end
up with very large files and it's totaly separated from tapestry
mechanisms.
I think this choice depends on you mechanism for editing the ressource
files later. I found some tools: http://freshmeat.net/projects/jinto/ or
http://freshmeat.net/projects/prbeditor/ but this is a completely
different question
Len
www.len.ro
> Cyrille.
> > Hope it helps,
> > Len
> >
> > On Mon, 2006-12-18 at 22:27 +0100, Cyrille37 wrote:
> >
> >
> >> Hello,
> >>
> >> I was coming mad when trying to localize my validation messages.
> >> After some search I've found a thread in that list which explain that:
> >>
> >> [quote]
> >> That's because Tapestry looks for "username-not-unique" in the properties
> >> file bundeled with Tapestry. To override it, your
> >> ValidationStrings.properties should have this path
> >> {CLASS_PATH_ROOT}/org/apache/tapestry/valid/ValidationStrings.properties.
> >> To do that:
> >> create the package /org/apache/tapestry/valid/ under your source folder
> >> and place your custom ValidationStrings.properties there.
> >> [/quote]
> >>
> >> Here there another way to localize validation messages ?
> >> I hope there is a cleanest method.
> >>
> >> How do you manage that case ?
> >> Thanks
> >> Cyrille
> >>
> >>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>