RE: [flexcoders] DateValidator localization issue

2005-04-20 Thread Mika Kiljunen










Ok, I filed that one. I got it fixed for
now with your suggested fix. Thanx Matt (again)!

 

-Mika

 









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Chotin
Sent: 19. huhtikuuta 2005 15:38
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
DateValidator localization issue



 

OK, that’s an annoying bug I can
imagine, please file it at http://www.macromedia.com/go/wish.

 

I think you will need to subclass
DateValidator to get around it but you could do it like so:

 

Class MyDateValidator extends
mx.validators.DateValidator

{

    public function
validationError(errorCode:String, defaultMessage:String, subfield:String):Void

    {

   If
(errorCode == “wrongLength”)


defaultMessage = yourTranslatedMessage;

  
super.validationError(errorCode, defaultMessage, subfield);

    }

}

 

Only thing you need to do is catch the
wrongLength error and re-write the error message yourself.

 

Matt

 









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] 
Sent: Tuesday, April 19, 2005 2:41
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders]
DateValidator localization issue



 

Hi,

There seems to be a localization problem with the date
validator. If you set the wrongLengthError property for the validator like
“Please enter date in the correct form” and also provide the
inputFormat property like “dd.mm.”. The validator validates the
date properly and sets the error message correctly but it also sets the
inputFormat after the wrongLengthError so the errormessage looks like
“Please enter date in the correct form dd.mm.”

 

Now the problem arises because I’m writing a Flex app
in finnish for finnish people and to them the inputFormat looks like
“pp.kk.”. Internally I use dd.mm. for Flex to understand
it. The users are wondering what is this dd.mm. that I can’t get rid
off because flex adds it to the errorMessage…

 


 Please remove the inputFormat
 from the wrongLengthError errorstring on Flex 2.0 or provide another
 property that can be used as the “label” for the inputFormat
 !!!
 Is there any way out other than
 to write my own DateValidator?


 

-Mika

 











Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ 
To unsubscribe from this group, send an email to:[EMAIL PROTECTED] 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












RE: [flexcoders] DateValidator localization issue

2005-04-19 Thread Mika Kiljunen










Correction, the most important word was
missing…

 

I'm saying that flex should NOT automatically add the internal date
format it
uses ("dd.mm.") on the errormessage,
since the internal formatters
formatstring is always in English! For finnish or
any other language this is
no good. 

-Mika

 









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Mika Kiljunen
Sent: 20. huhtikuuta 2005 9:06
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
DateValidator localization issue



 

I'm saying that flex should automatically add the internal date format
it
uses ("dd.mm.") on the errormessage,
since the internal formatters
formatstring is always in English! For finnish or
any other language this is
no good. 

-Mika

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On
Behalf Of Manish Jethani
Sent: 19. huhtikuuta 2005 13:33
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] DateValidator
localization issue

On 4/20/05, Mika Kiljunen <[EMAIL PROTECTED]> wrote:

> Now the problem arises because I'm writing a
Flex app in finnish for
finnish
> people and to them the inputFormat looks like
"pp.kk.". Internally I
use
> dd.mm. for Flex to understand it. The users
are wondering what is this
> dd.mm. that I can't get rid off because
flex adds it to the
> errorMessage. 

Are you saying that Flex displays it as
"dd.mm." while it should
be displayed as "pp.kk." for
Finnish?

-- 
[EMAIL PROTECTED]
http://manish.revise.org/



Yahoo! Groups Links

















Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ 
To unsubscribe from this group, send an email to:[EMAIL PROTECTED] 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












RE: [flexcoders] DateValidator localization issue

2005-04-19 Thread Mika Kiljunen

I'm saying that flex should automatically add the internal date format it
uses ("dd.mm.") on the errormessage, since the internal formatters
formatstring is always in English! For finnish or any other language this is
no good. 

-Mika

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Manish Jethani
Sent: 19. huhtikuuta 2005 13:33
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] DateValidator localization issue

On 4/20/05, Mika Kiljunen <[EMAIL PROTECTED]> wrote:

> Now the problem arises because I'm writing a Flex app in finnish for
finnish
> people and to them the inputFormat looks like "pp.kk.". Internally I
use
> dd.mm. for Flex to understand it. The users are wondering what is this
> dd.mm. that I can't get rid off because flex adds it to the
> errorMessage. 

Are you saying that Flex displays it as "dd.mm." while it should
be displayed as "pp.kk." for Finnish?

-- 
[EMAIL PROTECTED]
http://manish.revise.org/


 
Yahoo! Groups Links



 



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





RE: [flexcoders] DateValidator localization issue

2005-04-19 Thread Matt Chotin










OK, that’s an annoying bug I can
imagine, please file it at http://www.macromedia.com/go/wish.

 

I think you will need to subclass
DateValidator to get around it but you could do it like so:

 

Class MyDateValidator extends
mx.validators.DateValidator

{

    public function
validationError(errorCode:String, defaultMessage:String, subfield:String):Void

    {

   If (errorCode == “wrongLength”)

 defaultMessage = yourTranslatedMessage;

   super.validationError(errorCode,
defaultMessage, subfield);

    }

}

 

Only thing you need to do is catch the
wrongLength error and re-write the error message yourself.

 

Matt

 









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] 
Sent: Tuesday, April 19, 2005 2:41
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders]
DateValidator localization issue



 

Hi,

There seems to be a localization problem with the date
validator. If you set the wrongLengthError property for the validator like
“Please enter date in the correct form” and also provide the
inputFormat property like “dd.mm.”. The validator validates the
date properly and sets the error message correctly but it also sets the
inputFormat after the wrongLengthError so the errormessage looks like
“Please enter date in the correct form dd.mm.”

 

Now the problem arises because I’m writing a Flex app
in finnish for finnish people and to them the inputFormat looks like
“pp.kk.”. Internally I use dd.mm. for Flex to understand
it. The users are wondering what is this dd.mm. that I can’t get rid
off because flex adds it to the errorMessage…

 


 Please remove the inputFormat
 from the wrongLengthError errorstring on Flex 2.0 or provide another
 property that can be used as the “label” for the inputFormat
 !!!
 Is there any way out other than
 to write my own DateValidator?


 

-Mika

 










Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ 
To unsubscribe from this group, send an email to:[EMAIL PROTECTED] 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












Re: [flexcoders] DateValidator localization issue

2005-04-19 Thread Manish Jethani
On 4/20/05, Mika Kiljunen <[EMAIL PROTECTED]> wrote:

> Now the problem arises because I'm writing a Flex app in finnish for finnish
> people and to them the inputFormat looks like "pp.kk.". Internally I use
> dd.mm. for Flex to understand it. The users are wondering what is this
> dd.mm. that I can't get rid off because flex adds it to the
> errorMessage… 

Are you saying that Flex displays it as "dd.mm." while it should
be displayed as "pp.kk." for Finnish?

-- 
[EMAIL PROTECTED]
http://manish.revise.org/


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/