You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jan Vissers <Ja...@cumquat.nl> on 2005/06/28 17:18:42 UTC
clientScriptingEnabled and localization
Hi,
Is there a way to have clientScriptingEnabled and have localized
messages for Java Script validation failures?
thx.
--
Cumquat Information Technology
De Dreef 19
3706 BR Zeist
T +31 (0)30 - 6940490
F +31 (0)10 - 6940499
http://www.cumquat.nl
Jan.Vissers@cumquat.nl
M +31 6 5 11 169 556
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: clientScriptingEnabled and localization
Posted by dpr <dp...@lirosta.lt>.
This happens when default server locale is not English, I think.
Tapestry mixes locales somehow when rendering validation strings (when
server locale is not English).
Maybe is a bug?
----- Original Message -----
From: "Jan Vissers" <Ja...@cumquat.nl>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, June 30, 2005 8:59 AM
Subject: Re: clientScriptingEnabled and localization
> Ok,... but it seems that my ValidationStrings_nl.properties gets in the
> way of the English version altogether. This leads to pages where the
> labels are localized in English and the JavaScript alert messages popup
> in Dutch. Clearly this is not what I want - I want the JavaScript
> messages to adhere to the current locale and get their messages from the
> appropriate property file. This doesn't seem to happen when I have
> ValidationStrings_nl in the WEB-INF/classes/org/apache/tapestry/valid!
>
> What am I missing here ...?
>
>
>
> Andreas Andreou wrote:
>
> > Jan Vissers wrote:
> >
> >> As a follow up question ...
> >>
> >> I would prefer not masking other property files, for client side
> >> scripting. I want to be able to switch from languages and have the
> >> javascript message behave according to the selected language. How can
> >> I do this?
> >>
> >> Hope anyone can help me out here!
> >
> >
> > Do what you've already done!
> > Add a ValidationStrings_nl.properties in
> > WEB-INF/classes/org/apache/tapestry/valid
> > It's the proper solution. That's why people have been submitting their
> > localized
> > ValidationStrings file into JIRA, in the hope that they'll sometime be
> > included in the
> > main Tapestry distro (or perhaps in an addin package). I even have
> > localized messages
> > for many other components (such as contrib:Palette)
> > In the previous mail, I just informed you that you could even (=
> > extreme case) mask the ValidationStrings.properties
> > file
> >
> >>
> >> -J.
> >>
> >> Andreas Andreou wrote:
> >>
> >>> Jan Vissers wrote:
> >>>
> >>>> Answering my own question (I guess).
> >>>>
> >>>> Have added ValidationStrings_nl.properties to my project and used
> >>>> ant to store it in WEB-INF/classes/org/apache/tapestry/valid
> >>>>
> >>>> Seems to be working - not sure whether this is the way though.
> >>>> Confirmation would help :-)
> >>>
> >>>
> >>>
> >>>
> >>> Yep, it's correct...
> >>> You could have even named it ValidationStrings.properties, and it
> >>> would have masked the one
> >>> in the jar...
> >>> While you're at it, why don't you attach it to jira?
> >>> (http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10573)
> >>>
> >>>>
> >>>> -J.
> >>>>
> >>>> Jan Vissers wrote:
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> Is there a way to have clientScriptingEnabled and have localized
> >>>>> messages for Java Script validation failures?
> >>>>>
> >>>>> thx.
> >>>>>
> >>>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >>>
> >>>
> >>>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
> --
> Cumquat Information Technology
> De Dreef 19
> 3706 BR Zeist
> T +31 (0)30 - 6940490
> F +31 (0)10 - 6940499
> http://www.cumquat.nl
>
> Jan.Vissers@cumquat.nl
> M +31 6 5 11 169 556
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: clientScriptingEnabled and localization
Posted by Andreas Andreou <an...@di.uoa.gr>.
This is not the behavior I'm experiencing,
and I use this approach all the time...
Perhaps (if you tried masking the ValidationStrings.properties file with
a dutch one)
that file is still in your classpath, causing the behavior you describe...
So, there may still be a
WEB-INF/classes/org/apache/tapestry/valid/ValidationStrings.properties
file, as well as the
WEB-INF/classes/org/apache/tapestry/valid/ValidationStrings_nl.properties
even if in your source folder there's only the latter.
If this is the case, just delete it (or delete all and recompile)...
Jan Vissers wrote:
> Ok,... but it seems that my ValidationStrings_nl.properties gets in
> the way of the English version altogether. This leads to pages where
> the labels are localized in English and the JavaScript alert messages
> popup in Dutch. Clearly this is not what I want - I want the
> JavaScript messages to adhere to the current locale and get their
> messages from the appropriate property file. This doesn't seem to
> happen when I have ValidationStrings_nl in the
> WEB-INF/classes/org/apache/tapestry/valid!
>
> What am I missing here ...?
>
>
>
> Andreas Andreou wrote:
>
>> Jan Vissers wrote:
>>
>>> As a follow up question ...
>>>
>>> I would prefer not masking other property files, for client side
>>> scripting. I want to be able to switch from languages and have the
>>> javascript message behave according to the selected language. How
>>> can I do this?
>>>
>>> Hope anyone can help me out here!
>>
>>
>>
>> Do what you've already done!
>> Add a ValidationStrings_nl.properties in
>> WEB-INF/classes/org/apache/tapestry/valid
>> It's the proper solution. That's why people have been submitting
>> their localized
>> ValidationStrings file into JIRA, in the hope that they'll sometime
>> be included in the
>> main Tapestry distro (or perhaps in an addin package). I even have
>> localized messages
>> for many other components (such as contrib:Palette)
>> In the previous mail, I just informed you that you could even (=
>> extreme case) mask the ValidationStrings.properties
>> file
>>
>>>
>>> -J.
>>>
>>> Andreas Andreou wrote:
>>>
>>>> Jan Vissers wrote:
>>>>
>>>>> Answering my own question (I guess).
>>>>>
>>>>> Have added ValidationStrings_nl.properties to my project and used
>>>>> ant to store it in WEB-INF/classes/org/apache/tapestry/valid
>>>>>
>>>>> Seems to be working - not sure whether this is the way though.
>>>>> Confirmation would help :-)
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Yep, it's correct...
>>>> You could have even named it ValidationStrings.properties, and it
>>>> would have masked the one
>>>> in the jar...
>>>> While you're at it, why don't you attach it to jira?
>>>> (http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10573)
>>>>
>>>>>
>>>>> -J.
>>>>>
>>>>> Jan Vissers wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Is there a way to have clientScriptingEnabled and have localized
>>>>>> messages for Java Script validation failures?
>>>>>>
>>>>>> thx.
>>>>>>
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: clientScriptingEnabled and localization
Posted by Jan Vissers <Ja...@cumquat.nl>.
Ok,... but it seems that my ValidationStrings_nl.properties gets in the
way of the English version altogether. This leads to pages where the
labels are localized in English and the JavaScript alert messages popup
in Dutch. Clearly this is not what I want - I want the JavaScript
messages to adhere to the current locale and get their messages from the
appropriate property file. This doesn't seem to happen when I have
ValidationStrings_nl in the WEB-INF/classes/org/apache/tapestry/valid!
What am I missing here ...?
Andreas Andreou wrote:
> Jan Vissers wrote:
>
>> As a follow up question ...
>>
>> I would prefer not masking other property files, for client side
>> scripting. I want to be able to switch from languages and have the
>> javascript message behave according to the selected language. How can
>> I do this?
>>
>> Hope anyone can help me out here!
>
>
> Do what you've already done!
> Add a ValidationStrings_nl.properties in
> WEB-INF/classes/org/apache/tapestry/valid
> It's the proper solution. That's why people have been submitting their
> localized
> ValidationStrings file into JIRA, in the hope that they'll sometime be
> included in the
> main Tapestry distro (or perhaps in an addin package). I even have
> localized messages
> for many other components (such as contrib:Palette)
> In the previous mail, I just informed you that you could even (=
> extreme case) mask the ValidationStrings.properties
> file
>
>>
>> -J.
>>
>> Andreas Andreou wrote:
>>
>>> Jan Vissers wrote:
>>>
>>>> Answering my own question (I guess).
>>>>
>>>> Have added ValidationStrings_nl.properties to my project and used
>>>> ant to store it in WEB-INF/classes/org/apache/tapestry/valid
>>>>
>>>> Seems to be working - not sure whether this is the way though.
>>>> Confirmation would help :-)
>>>
>>>
>>>
>>>
>>> Yep, it's correct...
>>> You could have even named it ValidationStrings.properties, and it
>>> would have masked the one
>>> in the jar...
>>> While you're at it, why don't you attach it to jira?
>>> (http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10573)
>>>
>>>>
>>>> -J.
>>>>
>>>> Jan Vissers wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Is there a way to have clientScriptingEnabled and have localized
>>>>> messages for Java Script validation failures?
>>>>>
>>>>> thx.
>>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
Cumquat Information Technology
De Dreef 19
3706 BR Zeist
T +31 (0)30 - 6940490
F +31 (0)10 - 6940499
http://www.cumquat.nl
Jan.Vissers@cumquat.nl
M +31 6 5 11 169 556
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: clientScriptingEnabled and localization
Posted by Andreas Andreou <an...@di.uoa.gr>.
Jan Vissers wrote:
> As a follow up question ...
>
> I would prefer not masking other property files, for client side
> scripting. I want to be able to switch from languages and have the
> javascript message behave according to the selected language. How can
> I do this?
>
> Hope anyone can help me out here!
Do what you've already done!
Add a ValidationStrings_nl.properties in
WEB-INF/classes/org/apache/tapestry/valid
It's the proper solution. That's why people have been submitting their
localized
ValidationStrings file into JIRA, in the hope that they'll sometime be
included in the
main Tapestry distro (or perhaps in an addin package). I even have
localized messages
for many other components (such as contrib:Palette)
In the previous mail, I just informed you that you could even (= extreme
case) mask the ValidationStrings.properties
file
>
> -J.
>
> Andreas Andreou wrote:
>
>> Jan Vissers wrote:
>>
>>> Answering my own question (I guess).
>>>
>>> Have added ValidationStrings_nl.properties to my project and used
>>> ant to store it in WEB-INF/classes/org/apache/tapestry/valid
>>>
>>> Seems to be working - not sure whether this is the way though.
>>> Confirmation would help :-)
>>
>>
>>
>> Yep, it's correct...
>> You could have even named it ValidationStrings.properties, and it
>> would have masked the one
>> in the jar...
>> While you're at it, why don't you attach it to jira?
>> (http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10573)
>>
>>>
>>> -J.
>>>
>>> Jan Vissers wrote:
>>>
>>>> Hi,
>>>>
>>>> Is there a way to have clientScriptingEnabled and have localized
>>>> messages for Java Script validation failures?
>>>>
>>>> thx.
>>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: clientScriptingEnabled and localization
Posted by Jan Vissers <Ja...@cumquat.nl>.
As a follow up question ...
I would prefer not masking other property files, for client side
scripting. I want to be able to switch from languages and have the
javascript message behave according to the selected language. How can I
do this?
Hope anyone can help me out here!
-J.
Andreas Andreou wrote:
> Jan Vissers wrote:
>
>> Answering my own question (I guess).
>>
>> Have added ValidationStrings_nl.properties to my project and used ant
>> to store it in WEB-INF/classes/org/apache/tapestry/valid
>>
>> Seems to be working - not sure whether this is the way though.
>> Confirmation would help :-)
>
>
> Yep, it's correct...
> You could have even named it ValidationStrings.properties, and it
> would have masked the one
> in the jar...
> While you're at it, why don't you attach it to jira?
> (http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10573)
>
>>
>> -J.
>>
>> Jan Vissers wrote:
>>
>>> Hi,
>>>
>>> Is there a way to have clientScriptingEnabled and have localized
>>> messages for Java Script validation failures?
>>>
>>> thx.
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
--
Cumquat Information Technology
De Dreef 19
3706 BR Zeist
T +31 (0)30 - 6940490
F +31 (0)10 - 6940499
http://www.cumquat.nl
Jan.Vissers@cumquat.nl
M +31 6 5 11 169 556
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: clientScriptingEnabled and localization
Posted by Andreas Andreou <an...@di.uoa.gr>.
Jan Vissers wrote:
> Answering my own question (I guess).
>
> Have added ValidationStrings_nl.properties to my project and used ant
> to store it in WEB-INF/classes/org/apache/tapestry/valid
>
> Seems to be working - not sure whether this is the way though.
> Confirmation would help :-)
Yep, it's correct...
You could have even named it ValidationStrings.properties, and it would
have masked the one
in the jar...
While you're at it, why don't you attach it to jira?
(http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10573)
>
> -J.
>
> Jan Vissers wrote:
>
>> Hi,
>>
>> Is there a way to have clientScriptingEnabled and have localized
>> messages for Java Script validation failures?
>>
>> thx.
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: clientScriptingEnabled and localization
Posted by Jan Vissers <Ja...@cumquat.nl>.
Answering my own question (I guess).
Have added ValidationStrings_nl.properties to my project and used ant to
store it in WEB-INF/classes/org/apache/tapestry/valid
Seems to be working - not sure whether this is the way though.
Confirmation would help :-)
-J.
Jan Vissers wrote:
> Hi,
>
> Is there a way to have clientScriptingEnabled and have localized
> messages for Java Script validation failures?
>
> thx.
>
--
Cumquat Information Technology
De Dreef 19
3706 BR Zeist
T +31 (0)30 - 6940490
F +31 (0)10 - 6940499
http://www.cumquat.nl
Jan.Vissers@cumquat.nl
M +31 6 5 11 169 556
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org