Re: Localized validation messages

2006-12-19 Thread Greg Ward

On 12/19/06, Marilen Corciovei <[EMAIL PROTECTED]> wrote:

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


We have exactly the same problem... do you suppose you could share
your ValidationStrings_fr.properties so we don't have to translate it
ourselves?

Thanks --

Greg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Localized validation messages

2006-12-19 Thread Martin Strand

for custom validation messages you can do something like this:



note the % in front of the message key

read more here:
http://tapestry.apache.org/tapestry4.1/usersguide/validation.html

On Tue, 19 Dec 2006 11:22:31 +0100, Cyrille37 <[EMAIL PROTECTED]> 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 ?


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]



Re: Localized validation messages

2006-12-19 Thread andyhot

http://tapestry.apache.org/tapestry4.1/usersguide/localization.html

See the namespace message catalogs


Marilen Corciovei wrote:

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]




  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Localized validation messages

2006-12-19 Thread Marilen Corciovei
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]
> 


Re: Localized validation messages

2006-12-19 Thread Cyrille37

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 ?


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]



Re: Localized validation messages

2006-12-19 Thread Marilen Corciovei
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

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]
> 


Re: Localized validation messages

2006-12-18 Thread cyrille37



Norbert Sándor wrote:
> 
> I think you have to use this "dirty" solution.
> 

Ok, I'll use another way : injecting the message into the Validator


 


-- 
View this message in context: 
http://www.nabble.com/Localized-validation-messages-tf2842493.html#a7938551
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Localized validation messages

2006-12-18 Thread Norbert Sándor

I think you have to use this "dirty" solution.
There is an issue about this problem, it is currently scheduled for 
4.1.2 (http://issues.apache.org/jira/browse/TAPESTRY-698).


Regards:
Norbi

Cyrille37 írta:

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]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Localized validation messages

2006-08-02 Thread Malin Ljungh

Yeeehaa! It works :D
Thank you Firas!

TACK ;)

/Malin

On 8/2/06, Firas Adiler <[EMAIL PROTECTED]> wrote:


Hi Malin,

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.


Lycka till! ;-)



-Original Message-
From: Malin Ljungh [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 01, 2006 8:24 PM
To: Tapestry users
Subject: Localized validation messages

Gah! Please save me from madness...

I've posted earlier about validation messages. I'm now stuck on getting
them
localized. I keep getting the following exception:

java.util.MissingResourceException
Can't find resource for bundle java.util.PropertyResourceBundle, key
username-not-unique


I've put a file ValidationStrings.properties in my WEB-INF but that
doesn't
help. And I can't find any documentation.

Please help :)

Malin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Localized validation messages

2006-08-02 Thread Firas Adiler
Hi Malin,

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.


Lycka till! ;-)



-Original Message-
From: Malin Ljungh [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 01, 2006 8:24 PM
To: Tapestry users
Subject: Localized validation messages

Gah! Please save me from madness...

I've posted earlier about validation messages. I'm now stuck on getting them
localized. I keep getting the following exception:

java.util.MissingResourceException
Can't find resource for bundle java.util.PropertyResourceBundle, key
username-not-unique


I've put a file ValidationStrings.properties in my WEB-INF but that doesn't
help. And I can't find any documentation.

Please help :)

Malin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Localized validation messages

2006-08-02 Thread Ivano
The resourse bundle files need to be on the classpath. Try moving them 
to WEB-INF/classes.


Malin Ljungh wrote:


Gah! Please save me from madness...

I've posted earlier about validation messages. I'm now stuck on 
getting them

localized. I keep getting the following exception:

java.util.MissingResourceException
Can't find resource for bundle java.util.PropertyResourceBundle, key
username-not-unique


I've put a file ValidationStrings.properties in my WEB-INF but that 
doesn't

help. And I can't find any documentation.

Please help :)

Malin



--
Ivano Pagano

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]