LocalizedError problem

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

LocalizedError problem

passogiau
Greetings,

I am having a problem with LocalizedErrors.

The default bundle has a property

ott.mismatch=Sorry, the code that you have entered does not match. Please try again. (You have {2} attempts remaining)

while the French bundle's property is

ott.mismatch=D\u00e9sol\u00e9! Le code que vous avez entr\u00e9 n'est pas valide. Veuillez r\u00e9essayer. (Il vous reste {2} tentatives)

The validation method has the code

    @ValidationMethod(on = "validate", priority = 1)
    public void verify(final ValidationErrors errors) {
           ....
            errors.add("ott", new LocalizableError("ott.mismatch", attemptsLeft)); 
           ...        
    }

When the locale is en_US, all is fine but when the Locale is set to fr_CA, no parameter substitution takes place and the message rendered is

Désolé! Le code que vous avez entré nest pas valide. Veuillez réessayer. (Il vous reste {2} tentatives)

Any ideas of why this is happening and how to get it corrected?
Thanks in advance,

--
Aaron Stromas


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: LocalizedError problem

Gérald Quintana

Hello,

Simple quotes are used to delimit verbatim text (no replacing) in resource bundles .

As a result you should write n''est instead of n'est (2 simple quotes)

Gerald

Le 12 janv. 2013 01:29, "Aaron Stromas" <[hidden email]> a écrit :
Greetings,

I am having a problem with LocalizedErrors.

The default bundle has a property

ott.mismatch=Sorry, the code that you have entered does not match. Please try again. (You have {2} attempts remaining)

while the French bundle's property is

ott.mismatch=D\u00e9sol\u00e9! Le code que vous avez entr\u00e9 n'est pas valide. Veuillez r\u00e9essayer. (Il vous reste {2} tentatives)

The validation method has the code

    @ValidationMethod(on = "validate", priority = 1)
    public void verify(final ValidationErrors errors) {
           ....
            errors.add("ott", new LocalizableError("ott.mismatch", attemptsLeft)); 
           ...        
    }

When the locale is en_US, all is fine but when the Locale is set to fr_CA, no parameter substitution takes place and the message rendered is

Désolé! Le code que vous avez entré nest pas valide. Veuillez réessayer. (Il vous reste {2} tentatives)

Any ideas of why this is happening and how to get it corrected?
Thanks in advance,

--
Aaron Stromas


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: LocalizedError problem

passogiau
Gérald, thank you for straightening me out

-a

On 12 January 2013 05:17, Gérald Quintana <[hidden email]> wrote:

Hello,

Simple quotes are used to delimit verbatim text (no replacing) in resource bundles .

As a result you should write n''est instead of n'est (2 simple quotes)

Gerald

Le 12 janv. 2013 01:29, "Aaron Stromas" <[hidden email]> a écrit :
Greetings,

I am having a problem with LocalizedErrors.

The default bundle has a property

ott.mismatch=Sorry, the code that you have entered does not match. Please try again. (You have {2} attempts remaining)

while the French bundle's property is

ott.mismatch=D\u00e9sol\u00e9! Le code que vous avez entr\u00e9 n'est pas valide. Veuillez r\u00e9essayer. (Il vous reste {2} tentatives)

The validation method has the code

    @ValidationMethod(on = "validate", priority = 1)
    public void verify(final ValidationErrors errors) {
           ....
            errors.add("ott", new LocalizableError("ott.mismatch", attemptsLeft)); 
           ...        
    }

When the locale is en_US, all is fine but when the Locale is set to fr_CA, no parameter substitution takes place and the message rendered is

Désolé! Le code que vous avez entré nest pas valide. Veuillez réessayer. (Il vous reste {2} tentatives)

Any ideas of why this is happening and how to get it corrected?
Thanks in advance,

--
Aaron Stromas


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users




--
Aaron Stromas
Mobile: +1 240 271 6458

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users