Re: [Wicket-user] i18n messages in HTML

2005-11-11 Thread Dorel Vaida

Laurent PETIT wrote:


Hello,

On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 


You mean for tag text, correct? span wicket:message=hello.message /

What do you think about wicket:message key=../.  Than it is clear
that the whole label is wicket specific,
   



This sounds quite similar as what I posted 5 hours ago :
(extract)

wicket:label key=my.msg.keyA text to render/wicket:label


I personally think this need is so widespread that creating a
wicket:message as you suggest could be justified.

So +1 for this one,

But, as for Dorel, I'm also maybe too Struts oriented since it was my
previous Web framework of choice ... ;-)
 


Hey, nobody's perfect, you know :-))


--
Laurent


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

 





---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-11 Thread Dorel Vaida

Juergen Donnerstag wrote:


I've implemented it last night. Was fairly easy. I'll commt it tonight.

wicket:message key=my-keyDefault value/wicket:message

input wicket:message=attrName=my-key type=.../
 

Heh, excellent, I think the above two will cover pretty much the cases 
where it doesn't fit do develop a new component just to change a message 
based on the locale.


Thanks


As wicket core is very much pluggable, it can easily be added / removed.

Juergen

On 11/9/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
 


+1

-Igor


On 11/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
   


I think wicket:message key=../ would fit well with our other wicket
 


tags, e.g wicket:panel.
   


IMHO such an addition would be very useful.

Sven

 


You mean for tag text, correct? span wicket:message= hello.message /

What do you think about wicket:message key=../.  Than it is clear
that the whole label is wicket specific,

span wicket:message=key is a bit dangerous because how would we
handle span wicket:id=myLabel wicket:message=key?

Juergen

On 11/9/05, Dorel Vaida [EMAIL PROTECTED]  wrote:
   


Juergen Donnerstag wrote:

 


I'm all for making things easier for the user.



   


Perhaps Wicket could have something like this:
span wicket:id=message:myLabelHere/span


 


I'm not sure this makes sense. wicket:id is not a text to be displayed
anywhere. It is a name which identifies a component. It definitely
won't work.


   


Actually, maybe this is not the solution but a way to specify i18n
message keys directly in the html through a wicket tag would be VERY
handy. Now, in a project I'm working on,  for a i18n input form, half
 


of
   


the form elements are i18n labels that I add to the form in java code.
Instead of add(new I18nLabel(lbl, hello.mesage)) and span
wicket:id=lbl / it would be more handy to have 'something like'
 


span
   


wicket:message= hello.message /span or wicket:message
key=hello.message /,  w/o poluting java code with i18n keys if it's
not necessary (like when you need to compose complex  i18n messages
which would be done from the code).

Just a thought :-) (or maybe I am too intoxicated with
Struts/Webwork/SpringMVC :-D. I am trying to get rid of it you know.)

 

   


Even better would be that it would recognize the message:label
 


anywhere
   


in
   


the HTML.  So for example, you could have:
input type=submit value=message: label.submit /


 


That I think is possible. Acutally you can do it today already without
any changes to the core. You need to develop a IMarkupFilter and
append it to the list of existing ones invoked by MarkupFilter.

However you won't be able to handle message:  within a tag body;
only tag attributes. How does Tapestry do it for body text?

An other option would be to run a kind of text based (not xml based)
pre-processor (like we do merging of inherited markup) prior to adding
the markup to the cache.

How likely is it that you'll find message: and it is not intended to
be a i18n text? How to escape it?

Lets say your message must contain a reference some other data, e.g.
...${price} That won't be possible either. Only simple text. As
AttributeModifier is already able to handle it, message:.. would be
for easy and straight forward replacements only, and AttributeModifer
to cover everything else.

Ah, and of course you loose preview capabilities, as the designer
won't the real message, he'd see message:... only.

And it might not the perfekt solution for high-speed up, because of
the (little) performance penalties involved. For high-speed up you can
still have myPage_en.html; myPage_nl.html etc may which as well cover
minor changes in the layout due to labels being of differents length;
right-to-left languages etc.

Juergen

On 11/8/05, Andrew Berman  [EMAIL PROTECTED] wrote:


   


In my app I never hard-code text so I'm constantly adding Labels to
 


my
   


pages.  I was wondering if it would make sense to have a shortcut,
 


similar
   


to how Tapestry does it, for dsplaying localization messages.  In
 


Tapestry,
   


you can do this: title=message:page-title, where page-title is the
 


lookup
   


into the property file.

Perhaps Wicket could have something like this:
span wicket:id=message:myLabelHere/span

Even better would be that it would recognize the message:label
 


anywhere
   


in
   


the HTML.  So for example, you could have:
input type=submit value=message: label.submit /

Thoughts?

--Andrew



 

   


---
 


SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
   


Download
   


it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play:

Re: [Wicket-user] i18n messages in HTML

2005-11-11 Thread Scott Sauyet

Andrew Berman wrote:
   I think the attribute feature should be removed.  I think it is just 
un-Wicket-like, and I think others agree as I read form the emails in 
this thread.  As I mentioned before I think when it comes to attributes, 
it is best to just do it from within the component manually instead of 
the way you have it.


I'm still mixed about this.  I think the Button use-case is not 
particularly an issue; how often in a Wicket app do you need buttons 
that aren't going to be Components?  But there is one other place that 
I've used i18n in webapps that uses an attribute: the class attribute 
for all sorts of elements.  Sometimes I've used entirely different CSS 
files for different locales, but other times I simply switch classes. 
However this was in JSP or PHP applications, where adding


p class=warning ?php echo($locale_class);?...

to match

p.warning.en {background-color: red;}
p.warning.fr {background-color: yellow;}
...

doesn't add any additional code smell to what's already a hodgepodge of 
business logic and presentation.  In Wicket, it doesn't smell quite 
right.  So even though I have a use-case where it might help, I think 
this could get ugly.


The example above demonstrates still another syntax issue I would love 
resolved if Wicket were to implement the attribute bit, and I find that 
I really don't like the added complexity of any solution I can suggest. 
 The issue is that I would love the output to be


p class=warning en...

but I want only the en to be dynamic.  Sure we could do

p class=warning wicket:message=class+=localeClass...

(note the +=).  But then do we add the separating space in the HTML 
like this:


p class=warning  wicket:message=class+=localeClass...

or in the i18n itself, or in the Wicket markup like this:

p class=warning wicket:message=class+= localeClass...

(note the space after +=)?  Only the last possibility seems to be 
flexible enough for this use, and it's rather too subtle for my taste.


Note that I'm not suggesting that Wicket actually implement this.  I'm 
trying to point out that, while adding the i18n element is quite clean, 
adding the attribute might be heading us down a thorny path.


Just the two cents of a Wicket neophyte...

  -- Scott



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-11 Thread Igor Vaynberg
I think maybe what we need to do is keep a list of default behaviours
in application somewhere, and those get added to every new component.
maybe not a list but a callback much like the iauthorizationpolicy does
now.

Application.initializeComponent(Component c)

that way you can add an attr modifier that would spit out the localized class for you.

-Igor
On 11/11/05, Scott Sauyet [EMAIL PROTECTED] wrote:
Andrew Berman wrote:I think the attribute feature should be removed.I think it is just un-Wicket-like, and I think others agree as I read form the emails in this thread.As I mentioned before I think when it comes to attributes,
 it is best to just do it from within the component manually instead of the way you have it.I'm still mixed about this.I think the Button use-case is notparticularly an issue; how often in a Wicket app do you need buttons
that aren't going to be Components?But there is one other place thatI've used i18n in webapps that uses an attribute: the class attributefor all sorts of elements.Sometimes I've used entirely different CSS
files for different locales, but other times I simply switch classes.However this was in JSP or PHP applications, where adding p class=warning ?php echo($locale_class);?...
to match p.warning.en {background-color: red;} p.warning.fr {background-color: yellow;} ...doesn't add any additional code smell to what's already a hodgepodge of
business logic and presentation.In Wicket, it doesn't smell quiteright.So even though I have a use-case where it might help, I thinkthis could get ugly.The example above demonstrates still another syntax issue I would love
resolved if Wicket were to implement the attribute bit, and I find thatI really don't like the added complexity of any solution I can suggest.The issue is that I would love the output to be p class=warning en...
but I want only the en to be dynamic.Sure we could do p class=warning wicket:message=class+=localeClass...(note the +=).But then do we add the separating space in the HTML
like this: p class=warning  wicket:message=class+=localeClass...or in the i18n itself, or in the Wicket markup like this: p class=warning wicket:message=class+= localeClass...
(note the space after +=)?Only the last possibility seems to beflexible enough for this use, and it's rather too subtle for my taste.Note that I'm not suggesting that Wicket actually implement this.I'm
trying to point out that, while adding the i18n element is quite clean,adding the attribute might be heading us down a thorny path.Just the two cents of a Wicket neophyte... -- Scott
---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-10 Thread Johan Compagner
the whole idea is of this thread that we don't want to have to add all kind of components on every place
to localize youre html of all youre labels.

I do see a good reason for that (maybe you as an american don's use i18n a lot ;))

Now i have slept a night over it i think we need to keep it simple first
Don't start with the input type=button value=xxx and then an extra wicket attribute for localizing the value
Do this with a button component so make it a real wicket component and do it youre self.

I do think that we should try to support labels notation like this:

wicket:message key=xx
or
span wicket:message=key 
are both fine by me

For the second the question is do we keep the span in the output of is is body only?
On 11/10/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
Hmm
isnt all this already possible without having to do anything?

public class Message extends WebMarkupContainer
{
 public Message(String id)
 {
  super(id);
 }
 protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag)
 {
  ValueMap attrs=openTag.getAttributes();
  if (attrs.containsKey(wicket:message)) {
   String
message=getLocalizer().getString(attrs.getString(wicket:message),
this);
   replaceComponentTagBody(findMarkupStream(), openTag, message);
  } else {
   super.onComponentTagBody(markupStream, openTag);
  }
 }
}

this is the message component that emulates wicket:message key
add it to the page
and then in your page simply render it multiple times

 add(new Message(message));

 span wicket:id=message wicket:message=res1this is message replaced 1/spanbr/
 span wicket:id=message wicket:message=res2this is message replaced 2/spanbr/

something like it can also be used to do that inline attribute replacement.

no postprocessing or anything like that needed

if we want this to be a builtin feature we can simply add one of these to every page with some name that we reserve.

-Igor
On 11/9/05, pepone pepone [EMAIL PROTECTED]
 wrote:
Other way of handle tranlations can be take and aproach simiar to Qt ui tollkiti try to explain it a bitwhe you localiced and application all string in html are desired to be translatewe can parser html files and assign and unique id to each string to be
translateprovide a singuel file for each locale with string-id=string-translationapplication can plug a diferent translation file depending of current localehave this make any sense?

On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: then call it wicket:message=value=my-key
so thatwicket:message key=..Default Text/wicket:message
and input type=button value=My Val wicket:message=value=my-key/uses the same kind of notation.Als value=My Val can then be seen as the default value if the value is
 not found for the given locale?That would be nice i think.johan On 11/9/05, Juergen Donnerstag 
[EMAIL PROTECTED]
 wrote:  good idea, except I would like to make a =. wicket:i18n=value=my-key   Juergen   On 11/9/05, Scott Sauyet 

[EMAIL PROTECTED] wrote:   Johan Compagner wrote:i can live with:   wicket:message key=..Default Text/wicket:message
 This makes sense.  input type=button value=message:key=my-key/ I don't think this one does.It breaks the previewability of pages
   which is one of Wicket's hallmarks. How about something likeinput type=button value=My Val   wicket:attr=value:message:my-key/
 orwicket:i18n=value:my-key Wicket could then replace the value attribute entirely, but the preview
   is still available. This could also contain a comma-separated list of   attribute-name/attribute-value-keys if there are multiple attributes to
   replace (not that I can think of a use-case right now...)-- Scott ---
   SF.Net email is sponsored by:   Tame your development challenges with Apache's Geronimo App Server. Download   it for free - -and be entered to win a 42 plasma tv or your very own
   Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php
   ___   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net   
https://lists.sourceforge.net/lists/listinfo/wicket-user
  ---  SF.Net email is sponsored by:  Tame your development challenges with Apache's Geronimo App Server.
 Download  it for free - -and be entered to win a 42 plasma tv or your very own  Sony(tm)PSP.Click here to play: 
http://sourceforge.net/geronimo.php
  ___  Wicket-user mailing list  
Wicket-user@lists.sourceforge.net  
https://lists.sourceforge.net/lists/listinfo/wicket-user --play tetris 
http://pepone.on-rez.com/tetris---
SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: 

Re: [Wicket-user] i18n messages in HTML

2005-11-10 Thread sven
Every time we're running into syntax discussions (see 'replacing OGNL') I feel 
that Wicket is deviating from the Java way.

I think all the following suggestions would better be left unimplemented:

input wicket:message=value=my-key type=.../
input wicket:message=value=my-key, class=another-key.../
input value=message:key=my-key type=... /
span wicket:message=my-key.../span
p wicket:message=$=greeting, class=greeting-classHello./p

This is leaning in the direction of Tapestry (with special $prefixes) or real 
attribute languages 
(http://www.zope.org/Wikis/DevSite/Projects/ZPT/AttributeLanguage). TAL is 
great but Wicket's main selling point is (and should stay) Java.

Every input field has a Wicket component anyway, so the origin of their 
attribute values should be in Java models, attribute modifiers or behaviours - 
not in HTML.

The initial request for easier 18n of static labels was valid:

wicket:message key=myKeyDefault Message/wicket:message

IMHO this is striking similar to our auto linking tag:

wicket:link autolink=true ... /wicket:link

Anything else is opening a can of worms.

Just my 2 cents

Sven
 
I think this is starting to get all out of hand and when I suggested
this whole thing I didn't think it was going to be crazy likethis.
Perhaps the attribute thing is best left to doing it thenormal Wicket
way. I think the only thing I really need for i18nin terms of changing
attributes is for a button or submit form elementand those are easy
enough to add in each page.  

I think we need a simple solution which gets the job done for other
cases where, for example, you do:

First Name: input type=text/
Last name: 
etc.

Currently, I have to add a label in the page/form for every single
label I want for a form field, which honestly is kind of a pain. So,
I suggest we add the wicket:message tag which has this:

wicket:message key=myKeyDefault Message/wicket:message

Nice and simple.  I think this will cover most cases where peopleuse
i18n and if attribute support is needed people will just have toadd
it to a component manually in the page code.

Thoughts?


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-10 Thread Scott Sauyet

[EMAIL PROTECTED] wrote:

Every time we're running into syntax discussions (see 'replacing OGNL') I feel 
that Wicket is deviating from the Java way.

I think all the following suggestions would better be left unimplemented:

input wicket:message=value=my-key type=.../
input wicket:message=value=my-key, class=another-key.../
input value=message:key=my-key type=... /
span wicket:message=my-key.../span
p wicket:message=$=greeting, class=greeting-classHello./p


Although most of these were my suggestions, I agree.  There seems to be 
little need for this.  But the original


wicket:message key=my-keyDefault value/wicket:message

still seems to be a good idea.

  -- Scott



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-10 Thread Igor Vaynberg
+1

-Igor
On 11/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I think wicket:message key=../ would fit well with our other wicket tags, e.g wicket:panel.IMHO such an addition would be very useful.SvenYou mean for tag text, correct? span wicket:message=
hello.message /What do you think about wicket:message key=../.Than it is clearthat the whole label is wicket specific,span wicket:message=key is a bit dangerous because how would we
handle span wicket:id=myLabel wicket:message=key?JuergenOn 11/9/05, Dorel Vaida [EMAIL PROTECTED]
 wrote: Juergen Donnerstag wrote: I'm all for making things easier for the user.Perhaps Wicket could have something like this:
 span wicket:id=message:myLabelHere/spanI'm not sure this makes sense. wicket:id is not a text to be displayed
 anywhere. It is a name which identifies a component. It definitely won't work.   Actually, maybe this is not the solution but a way to specify i18n
 message keys directly in the html through a wicket tag would be VERY handy. Now, in a project I'm working on,for a i18n input form, half of the form elements are i18n labels that I add to the form in java code.
 Instead of add(new I18nLabel(lbl, hello.mesage)) and span wicket:id=lbl / it would be more handy to have 'something like' span wicket:message=
hello.message /span or wicket:message key=hello.message /,w/o poluting java code with i18n keys if it's not necessary (like when you need to compose complexi18n messages
 which would be done from the code). Just a thought :-) (or maybe I am too intoxicated with Struts/Webwork/SpringMVC :-D. I am trying to get rid of it you know.)
   Even better would be that it would recognize the message:label anywherein the HTML.So for example, you could have: input type=submit value=message:
label.submit /That I think is possible. Acutally you can do it today already without any changes to the core. You need to develop a IMarkupFilter and
 append it to the list of existing ones invoked by MarkupFilter.  However you won't be able to handle message:  within a tag body; only tag attributes. How does Tapestry do it for body text?
  An other option would be to run a kind of text based (not xml based) pre-processor (like we do merging of inherited markup) prior to adding the markup to the cache.
  How likely is it that you'll find message: and it is not intended to be a i18n text? How to escape it?  Lets say your message must contain a reference some other data, 
e.g. ...${price} That won't be possible either. Only simple text. As AttributeModifier is already able to handle it, message:.. would be for easy and straight forward replacements only, and AttributeModifer
 to cover everything else.  Ah, and of course you loose preview capabilities, as the designer won't the real message, he'd see message:... only.
  And it might not the perfekt solution for high-speed up, because of the (little) performance penalties involved. For high-speed up you can still have myPage_en.html; myPage_nl.html etc may which as well cover
 minor changes in the layout due to labels being of differents length; right-to-left languages etc.  Juergen  On 11/8/05, Andrew Berman 
[EMAIL PROTECTED] wrote:   In my app I never hard-code text so I'm constantly adding Labels to my pages.I was wondering if it would make sense to have a shortcut,
similar to how Tapestry does it, for dsplaying localization messages.InTapestry, you can do this: title=message:page-title, where page-title is the
lookup into the property file.  Perhaps Wicket could have something like this: span wicket:id=message:myLabelHere/span
  Even better would be that it would recognize the message:label anywherein the HTML.So for example, you could have: input type=submit value=message:
label.submit /  Thoughts?  --Andrew 
 --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server.Download
 it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php
 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user---
 SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server.Download it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list
 Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.Click here to play: 

Re: [Wicket-user] i18n messages in HTML

2005-11-10 Thread Juergen Donnerstag
I've implemented it last night. Was fairly easy. I'll commt it tonight.

wicket:message key=my-keyDefault value/wicket:message

input wicket:message=attrName=my-key type=.../

As wicket core is very much pluggable, it can easily be added / removed.

Juergen

On 11/9/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
 +1

  -Igor


 On 11/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  I think wicket:message key=../ would fit well with our other wicket
 tags, e.g wicket:panel.
 
  IMHO such an addition would be very useful.
 
  Sven
 
  
  You mean for tag text, correct? span wicket:message= hello.message /
  
  What do you think about wicket:message key=../.  Than it is clear
  that the whole label is wicket specific,
  
  span wicket:message=key is a bit dangerous because how would we
  handle span wicket:id=myLabel wicket:message=key?
  
  Juergen
  
  On 11/9/05, Dorel Vaida [EMAIL PROTECTED]  wrote:
   Juergen Donnerstag wrote:
  
   I'm all for making things easier for the user.
   
   
   
   Perhaps Wicket could have something like this:
   span wicket:id=message:myLabelHere/span
   
   
   
   I'm not sure this makes sense. wicket:id is not a text to be displayed
   anywhere. It is a name which identifies a component. It definitely
   won't work.
   
   
   Actually, maybe this is not the solution but a way to specify i18n
   message keys directly in the html through a wicket tag would be VERY
   handy. Now, in a project I'm working on,  for a i18n input form, half
 of
   the form elements are i18n labels that I add to the form in java code.
   Instead of add(new I18nLabel(lbl, hello.mesage)) and span
   wicket:id=lbl / it would be more handy to have 'something like'
 span
   wicket:message= hello.message /span or wicket:message
   key=hello.message /,  w/o poluting java code with i18n keys if it's
   not necessary (like when you need to compose complex  i18n messages
   which would be done from the code).
  
   Just a thought :-) (or maybe I am too intoxicated with
   Struts/Webwork/SpringMVC :-D. I am trying to get rid of it you know.)
  
   
   
   Even better would be that it would recognize the message:label
 anywhere
  in
   the HTML.  So for example, you could have:
   input type=submit value=message: label.submit /
   
   
   
   That I think is possible. Acutally you can do it today already without
   any changes to the core. You need to develop a IMarkupFilter and
   append it to the list of existing ones invoked by MarkupFilter.
   
   However you won't be able to handle message:  within a tag body;
   only tag attributes. How does Tapestry do it for body text?
   
   An other option would be to run a kind of text based (not xml based)
   pre-processor (like we do merging of inherited markup) prior to adding
   the markup to the cache.
   
   How likely is it that you'll find message: and it is not intended to
   be a i18n text? How to escape it?
   
   Lets say your message must contain a reference some other data, e.g.
   ...${price} That won't be possible either. Only simple text. As
   AttributeModifier is already able to handle it, message:.. would be
   for easy and straight forward replacements only, and AttributeModifer
   to cover everything else.
   
   Ah, and of course you loose preview capabilities, as the designer
   won't the real message, he'd see message:... only.
   
   And it might not the perfekt solution for high-speed up, because of
   the (little) performance penalties involved. For high-speed up you can
   still have myPage_en.html; myPage_nl.html etc may which as well cover
   minor changes in the layout due to labels being of differents length;
   right-to-left languages etc.
   
   Juergen
   
   On 11/8/05, Andrew Berman  [EMAIL PROTECTED] wrote:
   
   
   In my app I never hard-code text so I'm constantly adding Labels to
 my
   pages.  I was wondering if it would make sense to have a shortcut,
  similar
   to how Tapestry does it, for dsplaying localization messages.  In
  Tapestry,
   you can do this: title=message:page-title, where page-title is the
  lookup
   into the property file.
   
   Perhaps Wicket could have something like this:
   span wicket:id=message:myLabelHere/span
   
   Even better would be that it would recognize the message:label
 anywhere
  in
   the HTML.  So for example, you could have:
   input type=submit value=message: label.submit /
   
   Thoughts?
   
   --Andrew
   
   
   
   
   
  
 ---
   SF.Net email is sponsored by:
   Tame your development challenges with Apache's Geronimo App Server.
  Download
   it for free - -and be entered to win a 42 plasma tv or your very own
   Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
   
  
  
  
  
 

Re: [Wicket-user] i18n messages in HTML

2005-11-10 Thread Juergen Donnerstag
First draft version available in CVS HEAD

Juergen

On 11/10/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 I've implemented it last night. Was fairly easy. I'll commt it tonight.

 wicket:message key=my-keyDefault value/wicket:message

 input wicket:message=attrName=my-key type=.../

 As wicket core is very much pluggable, it can easily be added / removed.

 Juergen

 On 11/9/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
  +1
 
   -Igor
 
 
  On 11/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
   I think wicket:message key=../ would fit well with our other wicket
  tags, e.g wicket:panel.
  
   IMHO such an addition would be very useful.
  
   Sven
  
   
   You mean for tag text, correct? span wicket:message= hello.message /
   
   What do you think about wicket:message key=../.  Than it is clear
   that the whole label is wicket specific,
   
   span wicket:message=key is a bit dangerous because how would we
   handle span wicket:id=myLabel wicket:message=key?
   
   Juergen
   
   On 11/9/05, Dorel Vaida [EMAIL PROTECTED]  wrote:
Juergen Donnerstag wrote:
   
I'm all for making things easier for the user.



Perhaps Wicket could have something like this:
span wicket:id=message:myLabelHere/span



I'm not sure this makes sense. wicket:id is not a text to be displayed
anywhere. It is a name which identifies a component. It definitely
won't work.


Actually, maybe this is not the solution but a way to specify i18n
message keys directly in the html through a wicket tag would be VERY
handy. Now, in a project I'm working on,  for a i18n input form, half
  of
the form elements are i18n labels that I add to the form in java code.
Instead of add(new I18nLabel(lbl, hello.mesage)) and span
wicket:id=lbl / it would be more handy to have 'something like'
  span
wicket:message= hello.message /span or wicket:message
key=hello.message /,  w/o poluting java code with i18n keys if it's
not necessary (like when you need to compose complex  i18n messages
which would be done from the code).
   
Just a thought :-) (or maybe I am too intoxicated with
Struts/Webwork/SpringMVC :-D. I am trying to get rid of it you know.)
   


Even better would be that it would recognize the message:label
  anywhere
   in
the HTML.  So for example, you could have:
input type=submit value=message: label.submit /



That I think is possible. Acutally you can do it today already without
any changes to the core. You need to develop a IMarkupFilter and
append it to the list of existing ones invoked by MarkupFilter.

However you won't be able to handle message:  within a tag body;
only tag attributes. How does Tapestry do it for body text?

An other option would be to run a kind of text based (not xml based)
pre-processor (like we do merging of inherited markup) prior to adding
the markup to the cache.

How likely is it that you'll find message: and it is not intended to
be a i18n text? How to escape it?

Lets say your message must contain a reference some other data, e.g.
...${price} That won't be possible either. Only simple text. As
AttributeModifier is already able to handle it, message:.. would be
for easy and straight forward replacements only, and AttributeModifer
to cover everything else.

Ah, and of course you loose preview capabilities, as the designer
won't the real message, he'd see message:... only.

And it might not the perfekt solution for high-speed up, because of
the (little) performance penalties involved. For high-speed up you can
still have myPage_en.html; myPage_nl.html etc may which as well cover
minor changes in the layout due to labels being of differents length;
right-to-left languages etc.

Juergen

On 11/8/05, Andrew Berman  [EMAIL PROTECTED] wrote:


In my app I never hard-code text so I'm constantly adding Labels to
  my
pages.  I was wondering if it would make sense to have a shortcut,
   similar
to how Tapestry does it, for dsplaying localization messages.  In
   Tapestry,
you can do this: title=message:page-title, where page-title is the
   lookup
into the property file.

Perhaps Wicket could have something like this:
span wicket:id=message:myLabelHere/span

Even better would be that it would recognize the message:label
  anywhere
   in
the HTML.  So for example, you could have:
input type=submit value=message: label.submit /

Thoughts?

--Andrew





   
  ---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
   Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play:
  

Re: [Wicket-user] i18n messages in HTML

2005-11-10 Thread Andrew Berman
Jeurgen,

 I think the attribute feature should be removed. I
think it is just un-Wicket-like, and I think others agree as I read
form the emails in this thread. As I mentioned before I think
when it comes to attributes, it is best to just do it from within the
component manually instead of the way you have it.

Thoughts?

--AndrewOn 11/10/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
First draft version available in CVS HEADJuergenOn 11/10/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: I've implemented it last night. Was fairly easy. I'll commt it tonight.
 wicket:message key=my-keyDefault value/wicket:message input wicket:message=attrName=my-key type=.../ As wicket core is very much pluggable, it can easily be added / removed.
 Juergen On 11/9/05, Igor Vaynberg [EMAIL PROTECTED] wrote:  +1  -Igor  
  On 11/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:   I think wicket:message key=../ would fit well with our other wicket
  tags, e.g wicket:panel. IMHO such an addition would be very useful. SvenYou mean for tag text, correct? span wicket:message= 
hello.message /  What do you think about wicket:message key=../.Than it is clear   that the whole label is wicket specific,
  span wicket:message=key is a bit dangerous because how would we   handle span wicket:id=myLabel wicket:message=key?
  Juergen  On 11/9/05, Dorel Vaida [EMAIL PROTECTED]  wrote:Juergen Donnerstag wrote:
   I'm all for making things easier for the user.Perhaps Wicket could have something like this:
span wicket:id=message:myLabelHere/spanI'm not sure this makes sense. wicket:id is not a text to be displayed
anywhere. It is a name which identifies a component. It definitelywon't work.Actually, maybe this is not the solution but a way to specify i18n
message keys directly in the html through a wicket tag would be VERYhandy. Now, in a project I'm working on,for a i18n input form, half  ofthe form elements are i18n labels that I add to the form in java code.
Instead of add(new I18nLabel(lbl, hello.mesage)) and spanwicket:id=lbl / it would be more handy to have 'something like'
  spanwicket:message= hello.message /span or wicket:messagekey=hello.message /,w/o poluting java code with i18n keys if it's
not necessary (like when you need to compose complexi18n messageswhich would be done from the code).   Just a thought :-) (or maybe I am too intoxicated with
Struts/Webwork/SpringMVC :-D. I am trying to get rid of it you know.)   Even better would be that it would recognize the message:label
  anywhere   inthe HTML.So for example, you could have:input type=submit value=message: label.submit
 /That I think is possible. Acutally you can do it today already without
any changes to the core. You need to develop a IMarkupFilter andappend it to the list of existing ones invoked by MarkupFilter.
However you won't be able to handle message:  within a tag body;only tag attributes. How does Tapestry do it for body text?
An other option would be to run a kind of text based (not xml based)pre-processor (like we do merging of inherited markup) prior to addingthe markup to the cache.
How likely is it that you'll find message: and it is not intended tobe a i18n text? How to escape it?
Lets say your message must contain a reference some other data, e.g....${price} That won't be possible either. Only simple text. AsAttributeModifier is already able to handle it, message:.. would be
for easy and straight forward replacements only, and AttributeModiferto cover everything else.Ah, and of course you loose preview capabilities, as the designer
won't the real message, he'd see message:... only.And it might not the perfekt solution for high-speed up, because of
the (little) performance penalties involved. For high-speed up you canstill have myPage_en.html; myPage_nl.html etc may which as well coverminor changes in the layout due to labels being of differents length;
right-to-left languages etc.JuergenOn 11/8/05, Andrew Berman  
[EMAIL PROTECTED] wrote:In my app I never hard-code text so I'm constantly adding Labels to
  mypages.I was wondering if it would make sense to have a shortcut,   similarto how Tapestry does it, for dsplaying localization messages.In
   Tapestry,you can do this: title=message:page-title, where page-title is the   lookupinto the property file.
Perhaps Wicket could have something like this:span wicket:id=message:myLabelHere/span
Even better would be that it would recognize the message:label  anywhere   inthe HTML.So for example, you could have:
input type=submit value=message: label.submit /Thoughts?
--Andrew   
  

Re: [Wicket-user] i18n messages in HTML

2005-11-10 Thread Eelco Hillenius
I think/ agree that while Wicket's strong point lies in the fact that
we keep things clean and code-centric, having easy localized string
replacement without going through the whole requirement of having
Wicket components in a matching hierarchy is a very good exception to
the rule.

Eelco


On 11/10/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 Yes, the attribute thing doesn't realy look wicket like, that is true.
 But I still think that some kind of i18n (message) retrieval e.g. for
 button texts can be improved. A button is something I would like to be
 easily modifyable especially in multi-language application. Of course
 you can do it already, just create a new component derived from Button
 and attach an attribute modifier. Easy. But isn't it such a genereal
 requirement that it does make sense to implement such functionality in
 wickets core button component? Something like: Default is given in
 html markup. Search for id.attributeName=text and if found,
 replace the default.

 Juergen

 On 11/11/05, Andrew Berman [EMAIL PROTECTED] wrote:
  Jeurgen,
 
  I think the attribute feature should be removed.  I think it is just
  un-Wicket-like, and I think others agree as I read form the emails in this
  thread.  As I mentioned before I think when it comes to attributes, it is
  best to just do it from within the component manually instead of the way you
  have it.
 
   Thoughts?
 
   --Andrew
 
 
  On 11/10/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
  
   First draft version available in CVS HEAD
  
   Juergen
  
   On 11/10/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
I've implemented it last night. Was fairly easy. I'll commt it tonight.
   
wicket:message key=my-keyDefault value/wicket:message
   
input wicket:message=attrName=my-key type=.../
   
As wicket core is very much pluggable, it can easily be added / removed.
   
Juergen
   
On 11/9/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
 +1

  -Igor


 On 11/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  I think wicket:message key=../ would fit well with our other
  wicket
 tags, e.g wicket:panel.
 
  IMHO such an addition would be very useful.
 
  Sven
 
  
  You mean for tag text, correct? span wicket:message=
  hello.message /
  
  What do you think about wicket:message key=../.  Than it is
  clear
  that the whole label is wicket specific,
  
  span wicket:message=key is a bit dangerous because how would we
  handle span wicket:id=myLabel wicket:message=key?
  
  Juergen
  
  On 11/9/05, Dorel Vaida [EMAIL PROTECTED]  wrote:
   Juergen Donnerstag wrote:
  
   I'm all for making things easier for the user.
   
   
   
   Perhaps Wicket could have something like this:
   span wicket:id=message:myLabelHere/span
   
   
   
   I'm not sure this makes sense. wicket:id is not a text to be
  displayed
   anywhere. It is a name which identifies a component. It
  definitely
   won't work.
   
   
   Actually, maybe this is not the solution but a way to specify
  i18n
   message keys directly in the html through a wicket tag would be
  VERY
   handy. Now, in a project I'm working on,  for a i18n input form,
  half
 of
   the form elements are i18n labels that I add to the form in java
  code.
   Instead of add(new I18nLabel(lbl, hello.mesage)) and span
   wicket:id=lbl / it would be more handy to have 'something
  like'
 span
   wicket:message= hello.message /span or wicket:message
   key=hello.message /,  w/o poluting java code with i18n keys if
  it's
   not necessary (like when you need to compose complex  i18n
  messages
   which would be done from the code).
  
   Just a thought :-) (or maybe I am too intoxicated with
   Struts/Webwork/SpringMVC :-D. I am trying to get rid of it you
  know.)
  
   
   
   Even better would be that it would recognize the message:label
 anywhere
  in
   the HTML.  So for example, you could have:
   input type=submit value=message: label.submit  /
   
   
   
   That I think is possible. Acutally you can do it today already
  without
   any changes to the core. You need to develop a IMarkupFilter and
   append it to the list of existing ones invoked by MarkupFilter.
   
   However you won't be able to handle message:  within a tag
  body;
   only tag attributes. How does Tapestry do it for body text?
   
   An other option would be to run a kind of text based (not xml
  based)
   pre-processor (like we do merging of inherited markup) prior to
  adding
   the markup to the cache.
   
   How likely is it that you'll find message: and it is not
  intended to
   be a i18n text? How to escape it?
   
   Lets say your message must contain a reference some other 

Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Juergen Donnerstag
I'm all for making things easier for the user.

 Perhaps Wicket could have something like this:
 span wicket:id=message:myLabelHere/span

I'm not sure this makes sense. wicket:id is not a text to be displayed
anywhere. It is a name which identifies a component. It definitely
won't work.

 Even better would be that it would recognize the message:label anywhere in
 the HTML.  So for example, you could have:
 input type=submit value=message:label.submit /

That I think is possible. Acutally you can do it today already without
any changes to the core. You need to develop a IMarkupFilter and
append it to the list of existing ones invoked by MarkupFilter.

However you won't be able to handle message:  within a tag body;
only tag attributes. How does Tapestry do it for body text?

An other option would be to run a kind of text based (not xml based)
pre-processor (like we do merging of inherited markup) prior to adding
the markup to the cache.

How likely is it that you'll find message: and it is not intended to
be a i18n text? How to escape it?

Lets say your message must contain a reference some other data, e.g.
...${price} That won't be possible either. Only simple text. As
AttributeModifier is already able to handle it, message:.. would be
for easy and straight forward replacements only, and AttributeModifer
to cover everything else.

Ah, and of course you loose preview capabilities, as the designer
won't the real message, he'd see message:... only.

And it might not the perfekt solution for high-speed up, because of
the (little) performance penalties involved. For high-speed up you can
still have myPage_en.html; myPage_nl.html etc may which as well cover
minor changes in the layout due to labels being of differents length;
right-to-left languages etc.

Juergen

On 11/8/05, Andrew Berman [EMAIL PROTECTED] wrote:
 In my app I never hard-code text so I'm constantly adding Labels to my
 pages.  I was wondering if it would make sense to have a shortcut, similar
 to how Tapestry does it, for dsplaying localization messages.  In Tapestry,
 you can do this: title=message:page-title, where page-title is the lookup
 into the property file.

 Perhaps Wicket could have something like this:
 span wicket:id=message:myLabelHere/span

 Even better would be that it would recognize the message:label anywhere in
 the HTML.  So for example, you could have:
 input type=submit value=message:label.submit /

 Thoughts?

 --Andrew



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Dorel Vaida

Juergen Donnerstag wrote:


I'm all for making things easier for the user.

 


Perhaps Wicket could have something like this:
span wicket:id=message:myLabelHere/span
   



I'm not sure this makes sense. wicket:id is not a text to be displayed
anywhere. It is a name which identifies a component. It definitely
won't work.
 

Actually, maybe this is not the solution but a way to specify i18n 
message keys directly in the html through a wicket tag would be VERY 
handy. Now, in a project I'm working on,  for a i18n input form, half of 
the form elements are i18n labels that I add to the form in java code. 
Instead of add(new I18nLabel(lbl, hello.mesage)) and span 
wicket:id=lbl / it would be more handy to have 'something like' span 
wicket:message=hello.message /span or wicket:message 
key=hello.message /,  w/o poluting java code with i18n keys if it's 
not necessary (like when you need to compose complex  i18n messages 
which would be done from the code).


Just a thought :-) (or maybe I am too intoxicated with 
Struts/Webwork/SpringMVC :-D. I am trying to get rid of it you know.)


 


Even better would be that it would recognize the message:label anywhere in
the HTML.  So for example, you could have:
input type=submit value=message:label.submit /
   



That I think is possible. Acutally you can do it today already without
any changes to the core. You need to develop a IMarkupFilter and
append it to the list of existing ones invoked by MarkupFilter.

However you won't be able to handle message:  within a tag body;
only tag attributes. How does Tapestry do it for body text?

An other option would be to run a kind of text based (not xml based)
pre-processor (like we do merging of inherited markup) prior to adding
the markup to the cache.

How likely is it that you'll find message: and it is not intended to
be a i18n text? How to escape it?

Lets say your message must contain a reference some other data, e.g.
...${price} That won't be possible either. Only simple text. As
AttributeModifier is already able to handle it, message:.. would be
for easy and straight forward replacements only, and AttributeModifer
to cover everything else.

Ah, and of course you loose preview capabilities, as the designer
won't the real message, he'd see message:... only.

And it might not the perfekt solution for high-speed up, because of
the (little) performance penalties involved. For high-speed up you can
still have myPage_en.html; myPage_nl.html etc may which as well cover
minor changes in the layout due to labels being of differents length;
right-to-left languages etc.

Juergen

On 11/8/05, Andrew Berman [EMAIL PROTECTED] wrote:
 


In my app I never hard-code text so I'm constantly adding Labels to my
pages.  I was wondering if it would make sense to have a shortcut, similar
to how Tapestry does it, for dsplaying localization messages.  In Tapestry,
you can do this: title=message:page-title, where page-title is the lookup
into the property file.

Perhaps Wicket could have something like this:
span wicket:id=message:myLabelHere/span

Even better would be that it would recognize the message:label anywhere in
the HTML.  So for example, you could have:
input type=submit value=message:label.submit /

Thoughts?

--Andrew

   




---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

 





---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Juergen Donnerstag
You mean for tag text, correct? span wicket:message=hello.message /

What do you think about wicket:message key=../.  Than it is clear
that the whole label is wicket specific,

span wicket:message=key is a bit dangerous because how would we
handle span wicket:id=myLabel wicket:message=key?

Juergen

On 11/9/05, Dorel Vaida [EMAIL PROTECTED] wrote:
 Juergen Donnerstag wrote:

 I'm all for making things easier for the user.
 
 
 
 Perhaps Wicket could have something like this:
 span wicket:id=message:myLabelHere/span
 
 
 
 I'm not sure this makes sense. wicket:id is not a text to be displayed
 anywhere. It is a name which identifies a component. It definitely
 won't work.
 
 
 Actually, maybe this is not the solution but a way to specify i18n
 message keys directly in the html through a wicket tag would be VERY
 handy. Now, in a project I'm working on,  for a i18n input form, half of
 the form elements are i18n labels that I add to the form in java code.
 Instead of add(new I18nLabel(lbl, hello.mesage)) and span
 wicket:id=lbl / it would be more handy to have 'something like' span
 wicket:message=hello.message /span or wicket:message
 key=hello.message /,  w/o poluting java code with i18n keys if it's
 not necessary (like when you need to compose complex  i18n messages
 which would be done from the code).

 Just a thought :-) (or maybe I am too intoxicated with
 Struts/Webwork/SpringMVC :-D. I am trying to get rid of it you know.)

 
 
 Even better would be that it would recognize the message:label anywhere in
 the HTML.  So for example, you could have:
 input type=submit value=message:label.submit /
 
 
 
 That I think is possible. Acutally you can do it today already without
 any changes to the core. You need to develop a IMarkupFilter and
 append it to the list of existing ones invoked by MarkupFilter.
 
 However you won't be able to handle message:  within a tag body;
 only tag attributes. How does Tapestry do it for body text?
 
 An other option would be to run a kind of text based (not xml based)
 pre-processor (like we do merging of inherited markup) prior to adding
 the markup to the cache.
 
 How likely is it that you'll find message: and it is not intended to
 be a i18n text? How to escape it?
 
 Lets say your message must contain a reference some other data, e.g.
 ...${price} That won't be possible either. Only simple text. As
 AttributeModifier is already able to handle it, message:.. would be
 for easy and straight forward replacements only, and AttributeModifer
 to cover everything else.
 
 Ah, and of course you loose preview capabilities, as the designer
 won't the real message, he'd see message:... only.
 
 And it might not the perfekt solution for high-speed up, because of
 the (little) performance penalties involved. For high-speed up you can
 still have myPage_en.html; myPage_nl.html etc may which as well cover
 minor changes in the layout due to labels being of differents length;
 right-to-left languages etc.
 
 Juergen
 
 On 11/8/05, Andrew Berman [EMAIL PROTECTED] wrote:
 
 
 In my app I never hard-code text so I'm constantly adding Labels to my
 pages.  I was wondering if it would make sense to have a shortcut, similar
 to how Tapestry does it, for dsplaying localization messages.  In Tapestry,
 you can do this: title=message:page-title, where page-title is the lookup
 into the property file.
 
 Perhaps Wicket could have something like this:
 span wicket:id=message:myLabelHere/span
 
 Even better would be that it would recognize the message:label anywhere in
 the HTML.  So for example, you could have:
 input type=submit value=message:label.submit /
 
 Thoughts?
 
 --Andrew
 
 
 
 
 
 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server. Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 



 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server. Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___

Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Christian Essl

Thanks for the response.


How are your questions related to i18n messages?


Sorry I missunderstood the i18n question. I read the preprocessing of the 
tag-body you mentioned and thought - well the wrong thing.


Thanks,
Christian






___ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de




---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread sven
I think wicket:message key=../ would fit well with our other wicket tags, 
e.g wicket:panel.

IMHO such an addition would be very useful.

Sven


You mean for tag text, correct? span wicket:message=hello.message /

What do you think about wicket:message key=../.  Than it is clear
that the whole label is wicket specific,

span wicket:message=key is a bit dangerous because how would we
handle span wicket:id=myLabel wicket:message=key?

Juergen

On 11/9/05, Dorel Vaida [EMAIL PROTECTED] wrote:
 Juergen Donnerstag wrote:

 I'm all for making things easier for the user.
 
 
 
 Perhaps Wicket could have something like this:
 span wicket:id=message:myLabelHere/span
 
 
 
 I'm not sure this makes sense. wicket:id is not a text to be displayed
 anywhere. It is a name which identifies a component. It definitely
 won't work.
 
 
 Actually, maybe this is not the solution but a way to specify i18n
 message keys directly in the html through a wicket tag would be VERY
 handy. Now, in a project I'm working on,  for a i18n input form, half of
 the form elements are i18n labels that I add to the form in java code.
 Instead of add(new I18nLabel(lbl, hello.mesage)) and span
 wicket:id=lbl / it would be more handy to have 'something like' span
 wicket:message=hello.message /span or wicket:message
 key=hello.message /,  w/o poluting java code with i18n keys if it's
 not necessary (like when you need to compose complex  i18n messages
 which would be done from the code).

 Just a thought :-) (or maybe I am too intoxicated with
 Struts/Webwork/SpringMVC :-D. I am trying to get rid of it you know.)

 
 
 Even better would be that it would recognize the message:label anywhere 
in
 the HTML.  So for example, you could have:
 input type=submit value=message:label.submit /
 
 
 
 That I think is possible. Acutally you can do it today already without
 any changes to the core. You need to develop a IMarkupFilter and
 append it to the list of existing ones invoked by MarkupFilter.
 
 However you won't be able to handle message:  within a tag body;
 only tag attributes. How does Tapestry do it for body text?
 
 An other option would be to run a kind of text based (not xml based)
 pre-processor (like we do merging of inherited markup) prior to adding
 the markup to the cache.
 
 How likely is it that you'll find message: and it is not intended to
 be a i18n text? How to escape it?
 
 Lets say your message must contain a reference some other data, e.g.
 ...${price} That won't be possible either. Only simple text. As
 AttributeModifier is already able to handle it, message:.. would be
 for easy and straight forward replacements only, and AttributeModifer
 to cover everything else.
 
 Ah, and of course you loose preview capabilities, as the designer
 won't the real message, he'd see message:... only.
 
 And it might not the perfekt solution for high-speed up, because of
 the (little) performance penalties involved. For high-speed up you can
 still have myPage_en.html; myPage_nl.html etc may which as well cover
 minor changes in the layout due to labels being of differents length;
 right-to-left languages etc.
 
 Juergen
 
 On 11/8/05, Andrew Berman [EMAIL PROTECTED] wrote:
 
 
 In my app I never hard-code text so I'm constantly adding Labels to my
 pages.  I was wondering if it would make sense to have a shortcut, 
similar
 to how Tapestry does it, for dsplaying localization messages.  In 
Tapestry,
 you can do this: title=message:page-title, where page-title is the 
lookup
 into the property file.
 
 Perhaps Wicket could have something like this:
 span wicket:id=message:myLabelHere/span
 
 Even better would be that it would recognize the message:label anywhere 
in
 the HTML.  So for example, you could have:
 input type=submit value=message:label.submit /
 
 Thoughts?
 
 --Andrew
 
 
 
 
 
 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server. 
Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 



 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server. 
Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 

Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Andrew Berman
I like wicket:message key=../ as long as it would work how normal JSP tags currently work. In other words, I would be able to do this:input type=button value=wicket:message key='labelKey'//
orscript alert(wicket:message key='labelKey'/);/script--AndrewOn 11/9/05, 
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I think wicket:message key=../ would fit well with our other wicket tags, e.g wicket:panel.IMHO such an addition would be very useful.SvenYou mean for tag text, correct? span wicket:message=
hello.message /What do you think about wicket:message key=../.Than it is clearthat the whole label is wicket specific,span wicket:message=key is a bit dangerous because how would we
handle span wicket:id=myLabel wicket:message=key?JuergenOn 11/9/05, Dorel Vaida [EMAIL PROTECTED]
 wrote: Juergen Donnerstag wrote: I'm all for making things easier for the user.Perhaps Wicket could have something like this:
 span wicket:id=message:myLabelHere/spanI'm not sure this makes sense. wicket:id is not a text to be displayed
 anywhere. It is a name which identifies a component. It definitely won't work.   Actually, maybe this is not the solution but a way to specify i18n
 message keys directly in the html through a wicket tag would be VERY handy. Now, in a project I'm working on,for a i18n input form, half of the form elements are i18n labels that I add to the form in java code.
 Instead of add(new I18nLabel(lbl, hello.mesage)) and span wicket:id=lbl / it would be more handy to have 'something like' span wicket:message=
hello.message /span or wicket:message key=hello.message /,w/o poluting java code with i18n keys if it's not necessary (like when you need to compose complexi18n messages
 which would be done from the code). Just a thought :-) (or maybe I am too intoxicated with Struts/Webwork/SpringMVC :-D. I am trying to get rid of it you know.)
   Even better would be that it would recognize the message:label anywherein the HTML.So for example, you could have: input type=submit value=message:
label.submit /That I think is possible. Acutally you can do it today already without any changes to the core. You need to develop a IMarkupFilter and
 append it to the list of existing ones invoked by MarkupFilter.  However you won't be able to handle message:  within a tag body; only tag attributes. How does Tapestry do it for body text?
  An other option would be to run a kind of text based (not xml based) pre-processor (like we do merging of inherited markup) prior to adding the markup to the cache.
  How likely is it that you'll find message: and it is not intended to be a i18n text? How to escape it?  Lets say your message must contain a reference some other data, 
e.g. ...${price} That won't be possible either. Only simple text. As AttributeModifier is already able to handle it, message:.. would be for easy and straight forward replacements only, and AttributeModifer
 to cover everything else.  Ah, and of course you loose preview capabilities, as the designer won't the real message, he'd see message:... only.
  And it might not the perfekt solution for high-speed up, because of the (little) performance penalties involved. For high-speed up you can still have myPage_en.html; myPage_nl.html etc may which as well cover
 minor changes in the layout due to labels being of differents length; right-to-left languages etc.  Juergen  On 11/8/05, Andrew Berman 
[EMAIL PROTECTED] wrote:   In my app I never hard-code text so I'm constantly adding Labels to my pages.I was wondering if it would make sense to have a shortcut,
similar to how Tapestry does it, for dsplaying localization messages.InTapestry, you can do this: title=message:page-title, where page-title is the
lookup into the property file.  Perhaps Wicket could have something like this: span wicket:id=message:myLabelHere/span
  Even better would be that it would recognize the message:label anywherein the HTML.So for example, you could have: input type=submit value=message:
label.submit /  Thoughts?  --Andrew 
 --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server.Download
 it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php
 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user---
 SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server.Download it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list
 Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user

Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Juergen Donnerstag
On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote:
 I like wicket:message key=../ as long as it would work how normal JSP
 tags currently work.  In other words, I would be able to do this:

 input type=button value=wicket:message key='labelKey'//

 or

 script
alert(wicket:message key='labelKey'/);
 /script


No, that was not the intend and I don't like it either.
wicket:message .. would be a normal XML tag. To retrieve a i18n
message for a tag attribute I'd go for input type=button
value=message:key='labelKey'//.

The following is a bit tricky and I'm not sure how well it'll realy
work, because you kind of have to analyze JS.
script
alert(message:key='labelKey'/);
/script

Juergen


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Andrew Berman
Oh and the other nice feature would be that if you do it like this: wicket:message key=..My Text/wicket that the My Text would be the default text if the key is not found. 
On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote:
Well, I guess not being able to do it in _javascript_ would be ok, but I think there definitely needs to be a way to do it in attributes.Here is the link for how Tapestry 4.0 does it: 

http://jakarta.apache.org/tapestry/UsersGuide/localization.html--AndrewOn 11/9/05, 
Juergen Donnerstag 
[EMAIL PROTECTED] wrote:On 11/9/05, Andrew Berman 

[EMAIL PROTECTED] wrote: I like wicket:message key=../ as long as it would work how normal JSP tags currently work.In other words, I would be able to do this: input type=button value=wicket:message key='labelKey'//
 or scriptalert(wicket:message key='labelKey'/); /scriptNo, that was not the intend and I don't like it either.wicket:message .. would be a normal XML tag. To retrieve a i18n
message for a tag attribute I'd go for input type=buttonvalue=message:key='labelKey'//.The following is a bit tricky and I'm not sure how well it'll realywork, because you kind of have to analyze JS.
scriptalert(message:key='labelKey'/);/scriptJuergen---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: 
http://sourceforge.net/geronimo.php___
Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Johan Compagner
i can live with:

wicket:message key=..Default Text/wicket:message

and

input type=button value=message:key=my-key/

But i think the second one will be pretty hard.
Because then we have to parse the complete xml and see if in any attribute something starts with message:key
even for non wicket tags as above?

johan
On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote:
Oh and the other nice feature would be that if you do it like this:
wicket:message key=..My Text/wicket that the My Text
would be the default text if the key is not found. 
On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote:

Well, I guess not being able to do it in _javascript_ would be ok, but I
think there definitely needs to be a way to do it in attributes.Here is the link for how Tapestry 4.0 does it: 


http://jakarta.apache.org/tapestry/UsersGuide/localization.html--AndrewOn 11/9/05, 
Juergen Donnerstag 
[EMAIL PROTECTED] wrote:On 11/9/05, Andrew Berman 


[EMAIL PROTECTED] wrote: I like wicket:message key=../ as long as it would work how normal JSP tags currently work.In other words, I would be able to do this: input type=button value=wicket:message key='labelKey'//
 or scriptalert(wicket:message key='labelKey'/); /scriptNo, that was not the intend and I don't like it either.wicket:message .. would be a normal XML tag. To retrieve a i18n
message for a tag attribute I'd go for input type=buttonvalue=message:key='labelKey'//.The following is a bit tricky and I'm not sure how well it'll realywork, because you kind of have to analyze JS.
scriptalert(message:key='labelKey'/);/scriptJuergen---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: 

http://sourceforge.net/geronimo.php___
Wicket-user mailing listWicket-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/wicket-user







Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Juergen Donnerstag
  wicket:message key=..Default Text/wicket:message

  and

  input type=button value=message:key=my-key/

  But i think the second one will be pretty hard.
  Because then we have to parse the complete xml and see if in any attribute
 something starts with message:key
  even for non wicket tags as above?


we have to do it anyway to identify wicket tags. Only analyzing the
attributes would be on top

Juergen


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Andrew Berman
Hmmmwell, I do think it would provide value to have the attribute
way as well. How much slower do you think it is going to make it?
Anyone else have any suggestions?

--AndrewOn 11/9/05, Johan Compagner 

[EMAIL PROTECTED] wrote:i can live with:

wicket:message key=..Default Text/wicket:message

and

input type=button value=message:key=my-key/

But i think the second one will be pretty hard.
Because then we have to parse the complete xml and see if in any attribute something starts with message:key
even for non wicket tags as above?

johan
On 11/9/05, Andrew Berman [EMAIL PROTECTED]
 wrote:
Oh and the other nice feature would be that if you do it like this:
wicket:message key=..My Text/wicket that the My Text
would be the default text if the key is not found. 
On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote:



Well, I guess not being able to do it in _javascript_ would be ok, but I
think there definitely needs to be a way to do it in attributes.Here is the link for how Tapestry 4.0 does it: 




http://jakarta.apache.org/tapestry/UsersGuide/localization.html--AndrewOn 11/9/05, 
Juergen Donnerstag 
[EMAIL PROTECTED] wrote:On 11/9/05, Andrew Berman 




[EMAIL PROTECTED] wrote: I like wicket:message key=../ as long as it would work how normal JSP tags currently work.In other words, I would be able to do this: input type=button value=wicket:message key='labelKey'//
 or scriptalert(wicket:message key='labelKey'/); /scriptNo, that was not the intend and I don't like it either.wicket:message .. would be a normal XML tag. To retrieve a i18n
message for a tag attribute I'd go for input type=buttonvalue=message:key='labelKey'//.The following is a bit tricky and I'm not sure how well it'll realywork, because you kind of have to analyze JS.
scriptalert(message:key='labelKey'/);/scriptJuergen---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: 



http://sourceforge.net/geronimo.php___
Wicket-user mailing listWicket-user@lists.sourceforge.net



https://lists.sourceforge.net/lists/listinfo/wicket-user










Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Juergen Donnerstag
We have different options (as explained in my first mail)
- do the replacement while loading the markup, prior to xml reading
it. The cached version will have the messages replaced
- analyze the attributes while reading xml. The cached version will
have the messages replaced for the attrbutes. wicket:message will be
executed at render time
- do the replacement after rendering the page. Some kind of post-processing

Not sure yet what the best approach is

Juergen

On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote:
 Hmmmwell, I do think it would provide value to have the attribute way as
 well.  How much slower do you think it is going to make it?  Anyone else
 have any suggestions?

  --Andrew


 On 11/9/05, Johan Compagner  [EMAIL PROTECTED] wrote:
  i can live with:
 
  wicket:message key=..Default Text/wicket:message
 
  and
 
  input type=button value=message:key=my-key/
 
  But i think the second one will be pretty hard.
  Because then we have to parse the complete xml and see if in any attribute
 something starts with message:key
  even for non wicket tags as above?
 
  johan
 
 
 
 
  On 11/9/05, Andrew Berman [EMAIL PROTECTED]  wrote:
   Oh and the other nice feature would be that if you do it like this:
 wicket:message key=..My Text/wicket that the My Text would be the
 default text if the key is not found.
  
  
  
  
  
   On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote:
Well, I guess not being able to do it in JavaScript would be ok, but I
 think there definitely needs to be a way to do it in attributes.
   
Here is the link for how Tapestry 4.0 does it:
 http://jakarta.apache.org/tapestry/UsersGuide/localization.html
   
--Andrew
   
   
   
On 11/9/05, Juergen Donnerstag  [EMAIL PROTECTED] wrote:
 On 11/9/05, Andrew Berman  [EMAIL PROTECTED] wrote:
  I like wicket:message key=../ as long as it would work how
 normal JSP
  tags currently work.  In other words, I would be able to do this:
 
  input type=button value=wicket:message key='labelKey'//
 
  or
 
  script
 alert(wicket:message key='labelKey'/);
  /script
 

 No, that was not the intend and I don't like it either.
 wicket:message .. would be a normal XML tag. To retrieve a i18n
 message for a tag attribute I'd go for input type=button
 value=message:key='labelKey'//.

 The following is a bit tricky and I'm not sure how well it'll realy
 work, because you kind of have to analyze JS.
 script
 alert(message:key='labelKey'/);
 /script

 Juergen



 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server.
 Download
 it for free - -and be entered to win a 42 plasma tv or your very
 own
 Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net

 https://lists.sourceforge.net/lists/listinfo/wicket-user

   
   
  
  
 
 




---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Johan Compagner
if you do the replacement at parse time.
then every html in the markup cache is specified by a locale?
(even if there is not locale in the name of the html)

To me it looks like that wicket:message can only be executed at runtime because then the locale is know
But we could store one for every locale we encouter if that is faster/better somehow

johan
On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
We have different options (as explained in my first mail)- do the replacement while loading the markup, prior to xml readingit. The cached version will have the messages replaced- analyze the attributes while reading xml. The cached version will
have the messages replaced for the attrbutes. wicket:message will beexecuted at render time- do the replacement after rendering the page. Some kind of post-processingNot sure yet what the best approach is
JuergenOn 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Hmmmwell, I do think it would provide value to have the attribute way as well.How much slower do you think it is going to make it?Anyone else
 have any suggestions?--Andrew On 11/9/05, Johan Compagner  [EMAIL PROTECTED] wrote:  i can live with:
   wicket:message key=..Default Text/wicket:message   and   input type=button value=message:key=my-key/
   But i think the second one will be pretty hard.  Because then we have to parse the complete xml and see if in any attribute something starts with message:key  even for non wicket tags as above?
   johan  On 11/9/05, Andrew Berman [EMAIL PROTECTED]  wrote:   Oh and the other nice feature would be that if you do it like this:
 wicket:message key=..My Text/wicket that the My Text would be the default text if the key is not found.
 On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote:Well, I guess not being able to do it in _javascript_ would be ok, but I
 think there definitely needs to be a way to do it in attributes.   Here is the link for how Tapestry 4.0 does it: 
http://jakarta.apache.org/tapestry/UsersGuide/localization.html   --Andrew On 11/9/05, Juergen Donnerstag  
[EMAIL PROTECTED] wrote: On 11/9/05, Andrew Berman  [EMAIL PROTECTED] wrote:
  I like wicket:message key=../ as long as it would work how normal JSP  tags currently work.In other words, I would be able to do this:
   input type=button value=wicket:message key='labelKey'//   or
   script alert(wicket:message key='labelKey'/);  /script
  No, that was not the intend and I don't like it either. wicket:message .. would be a normal XML tag. To retrieve a i18n
 message for a tag attribute I'd go for input type=button value=message:key='labelKey'//. The following is a bit tricky and I'm not sure how well it'll realy
 work, because you kind of have to analyze JS. script alert(message:key='labelKey'/); /script
 Juergen --- 
SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very
 own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___
 Wicket-user mailing list Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user
---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Scott Sauyet

Johan Compagner wrote:

i can live with:

wicket:message key=..Default Text/wicket:message


This makes sense.


input type=button value=message:key=my-key/


I don't think this one does.  It breaks the previewability of pages 
which is one of Wicket's hallmarks.


How about something like

input type=button value=My Val 
wicket:attr=value:message:my-key/


or

wicket:i18n=value:my-key

Wicket could then replace the value attribute entirely, but the preview 
is still available.


This could also contain a comma-separated list of 
attribute-name/attribute-value-keys if there are multiple attributes to 
replace (not that I can think of a use-case right now...)


  -- Scott



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Juergen Donnerstag
On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote:
 if you do the replacement at parse time.
  then every html in the markup cache is specified by a locale?
  (even if there is not locale in the name of the html)


Thats already the case. The markup id includes locale style etc. But
multiple entries may reference the same markup file.

  To me it looks like that wicket:message can only be executed at runtime
 because then the locale is know

But it is known at markup load time as well. We even take it into
consideration to search for the proper markup file:
name_locale_style.html

  But we could store one for every locale we encouter if that is
 faster/better somehow

  johan



 On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 
  We have different options (as explained in my first mail)
  - do the replacement while loading the markup, prior to xml reading
  it. The cached version will have the messages replaced
  - analyze the attributes while reading xml. The cached version will
  have the messages replaced for the attrbutes. wicket:message will be
  executed at render time
  - do the replacement after rendering the page. Some kind of
 post-processing
 
  Not sure yet what the best approach is
 
  Juergen
 
  On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote:
   Hmmmwell, I do think it would provide value to have the attribute
 way as
   well.  How much slower do you think it is going to make it?  Anyone else
   have any suggestions?
  
--Andrew
  
  
   On 11/9/05, Johan Compagner  [EMAIL PROTECTED] wrote:
i can live with:
   
wicket:message key=..Default Text/wicket:message
   
and
   
input type=button value=message:key=my-key/
   
But i think the second one will be pretty hard.
Because then we have to parse the complete xml and see if in any
 attribute
   something starts with message:key
even for non wicket tags as above?
   
johan
   
   
   
   
On 11/9/05, Andrew Berman [EMAIL PROTECTED]  wrote:
 Oh and the other nice feature would be that if you do it like this:
   wicket:message key=..My Text/wicket that the My Text would be the
   default text if the key is not found.





 On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote:
  Well, I guess not being able to do it in JavaScript would be ok,
 but I
   think there definitely needs to be a way to do it in attributes.
 
  Here is the link for how Tapestry 4.0 does it:
  
 http://jakarta.apache.org/tapestry/UsersGuide/localization.html
 
  --Andrew
 
 
 
  On 11/9/05, Juergen Donnerstag  [EMAIL PROTECTED]
 wrote:
   On 11/9/05, Andrew Berman  [EMAIL PROTECTED] wrote:
I like wicket:message key=../ as long as it would work how
   normal JSP
tags currently work.  In other words, I would be able to do
 this:
   
input type=button value=wicket:message
 key='labelKey'//
   
or
   
script
   alert(wicket:message key='labelKey'/);
/script
   
  
   No, that was not the intend and I don't like it either.
   wicket:message .. would be a normal XML tag. To retrieve a
 i18n
   message for a tag attribute I'd go for input type=button
   value=message:key='labelKey'//.
  
   The following is a bit tricky and I'm not sure how well it'll
 realy
   work, because you kind of have to analyze JS.
   script
   alert(message:key='labelKey'/);
   /script
  
   Juergen
  
  
  
   ---
   SF.Net email is sponsored by:
   Tame your development challenges with Apache's Geronimo App
 Server.
   Download
   it for free - -and be entered to win a 42 plasma tv or your
 very
   own
   Sony(tm)PSP.  Click here to play:
   http://sourceforge.net/geronimo.php
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 


   
   
  
  
 
 
  ---
  SF.Net email is sponsored by:
  Tame your development challenges with Apache's Geronimo App Server.
 Download
  it for free - -and be entered to win a 42 plasma tv or your very own
  Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 




---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list

Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Juergen Donnerstag
good idea, except I would like to make a =. wicket:i18n=value=my-key

Juergen

On 11/9/05, Scott Sauyet [EMAIL PROTECTED] wrote:
 Johan Compagner wrote:
  i can live with:
 
  wicket:message key=..Default Text/wicket:message

 This makes sense.

  input type=button value=message:key=my-key/

 I don't think this one does.  It breaks the previewability of pages
 which is one of Wicket's hallmarks.

 How about something like

  input type=button value=My Val
 wicket:attr=value:message:my-key/

 or

  wicket:i18n=value:my-key

 Wicket could then replace the value attribute entirely, but the preview
 is still available.

 This could also contain a comma-separated list of
 attribute-name/attribute-value-keys if there are multiple attributes to
 replace (not that I can think of a use-case right now...)

-- Scott



 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server. Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Johan Compagner
ok then pre process and do it at markup loading time.
The only problem i see with this then that people will start to complaind that they don't 
see changes when they alter there messages 
So suddenly we also have to watch those??

johan
On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: if you do the replacement at parse time.then every html in the markup cache is specified by a locale?
(even if there is not locale in the name of the html)Thats already the case. The markup id includes locale style etc. Butmultiple entries may reference the same markup file.To me it looks like that wicket:message can only be executed at runtime
 because then the locale is knowBut it is known at markup load time as well. We even take it intoconsideration to search for the proper markup file:name_locale_style.html
But we could store one for every locale we encouter if that is faster/better somehowjohan On 11/9/05, Juergen Donnerstag 
[EMAIL PROTECTED] wrote:   We have different options (as explained in my first mail)  - do the replacement while loading the markup, prior to xml reading  it. The cached version will have the messages replaced
  - analyze the attributes while reading xml. The cached version will  have the messages replaced for the attrbutes. wicket:message will be  executed at render time
  - do the replacement after rendering the page. Some kind of post-processing   Not sure yet what the best approach is   Juergen   On 11/9/05, Andrew Berman 
[EMAIL PROTECTED] wrote:   Hmmmwell, I do think it would provide value to have the attribute way as   well.How much slower do you think it is going to make it?Anyone else
   have any suggestions?--Andrew   On 11/9/05, Johan Compagner  [EMAIL PROTECTED]
 wrote:i can live with:   wicket:message key=..Default Text/wicket:message   and
   input type=button value=message:key=my-key/   But i think the second one will be pretty hard.Because then we have to parse the complete xml and see if in any
 attribute   something starts with message:keyeven for non wicket tags as above?   johan  
  On 11/9/05, Andrew Berman [EMAIL PROTECTED]  wrote: Oh and the other nice feature would be that if you do it like this:
   wicket:message key=..My Text/wicket that the My Text would be the   default text if the key is not found.
 On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote:  Well, I guess not being able to do it in _javascript_ would be ok,
 but I   think there definitely needs to be a way to do it in attributes.   Here is the link for how Tapestry 4.0 does it:  
 http://jakarta.apache.org/tapestry/UsersGuide/localization.html   --Andrew
 On 11/9/05, Juergen Donnerstag  [EMAIL PROTECTED]
 wrote:   On 11/9/05, Andrew Berman  [EMAIL PROTECTED] wrote:I like wicket:message key=../ as long as it would work how
   normal JSPtags currently work.In other words, I would be able to do this:   input type=button value=wicket:message
 key='labelKey'//   or   script
   alert(wicket:message key='labelKey'/);/script 
   No, that was not the intend and I don't like it either.   wicket:message .. would be a normal XML tag. To retrieve a i18n   message for a tag attribute I'd go for input type=button
   value=message:key='labelKey'//. The following is a bit tricky and I'm not sure how well it'll
 realy   work, because you kind of have to analyze JS.   script   alert(message:key='labelKey'/);
   /script Juergen  
   ---   SF.Net email is sponsored by:   Tame your development challenges with Apache's Geronimo App
 Server.   Download   it for free - -and be entered to win a 42 plasma tv or your very   own   Sony(tm)PSP.Click here to play:
   http://sourceforge.net/geronimo.php   ___   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user
  ---  SF.Net email is sponsored by:  Tame your development challenges with Apache's Geronimo App Server.
 Download  it for free - -and be entered to win a 42 plasma tv or your very own  Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php
  ___  Wicket-user mailing list  Wicket-user@lists.sourceforge.net  
https://lists.sourceforge.net/lists/listinfo/wicket-user ---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here 

Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Johan Compagner
then call it wicket:message=value=my-key

so that 

wicket:message key=..Default Text/wicket:message
and
input type=button value=My Val wicket:message=value=my-key/

uses the same kind of notation.

Als value=My Val can then be seen as the default value if the value is not found for the given locale?
That would be nice i think.

johan

On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
good idea, except I would like to make a =. wicket:i18n=value=my-keyJuergenOn 11/9/05, Scott Sauyet [EMAIL PROTECTED] wrote: Johan Compagner wrote:
  i can live with:   wicket:message key=..Default Text/wicket:message This makes sense.  input type=button value=message:key=my-key/
 I don't think this one does.It breaks the previewability of pages which is one of Wicket's hallmarks. How about something likeinput type=button value=My Val
 wicket:attr=value:message:my-key/ orwicket:i18n=value:my-key Wicket could then replace the value attribute entirely, but the preview
 is still available. This could also contain a comma-separated list of attribute-name/attribute-value-keys if there are multiple attributes to replace (not that I can think of a use-case right now...)
-- Scott --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download
 it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___
 Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Juergen Donnerstag
Thats an RFE already. I'm not yet sure what the best approach is. Just thinking.

Juergen

On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote:
 ok then pre process and do it at markup loading time.
  The only problem i see with this then that people will start to complaind
 that they don't
  see changes when they alter there messages
  So suddenly we also have to watch those??

  johan



 On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 
  On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote:
   if you do the replacement at parse time.
then every html in the markup cache is specified by a locale?
(even if there is not locale in the name of the html)
  
 
  Thats already the case. The markup id includes locale style etc. But
  multiple entries may reference the same markup file.
 
To me it looks like that wicket:message can only be executed at
 runtime
   because then the locale is know
 
  But it is known at markup load time as well. We even take it into
  consideration to search for the proper markup file:
  name_locale_style.html
 
But we could store one for every locale we encouter if that is
   faster/better somehow
  
johan
  
  
  
   On 11/9/05, Juergen Donnerstag  [EMAIL PROTECTED] wrote:
   
We have different options (as explained in my first mail)
- do the replacement while loading the markup, prior to xml reading
it. The cached version will have the messages replaced
- analyze the attributes while reading xml. The cached version will
have the messages replaced for the attrbutes. wicket:message will be
executed at render time
- do the replacement after rendering the page. Some kind of
   post-processing
   
Not sure yet what the best approach is
   
Juergen
   
On 11/9/05, Andrew Berman  [EMAIL PROTECTED] wrote:
 Hmmmwell, I do think it would provide value to have the
 attribute
   way as
 well.  How much slower do you think it is going to make it?  Anyone
 else
 have any suggestions?

  --Andrew


 On 11/9/05, Johan Compagner  [EMAIL PROTECTED]  wrote:
  i can live with:
 
  wicket:message key=..Default Text/wicket:message
 
  and
 
  input type=button value=message:key=my-key/
 
  But i think the second one will be pretty hard.
  Because then we have to parse the complete xml and see if in any
   attribute
 something starts with message:key
  even for non wicket tags as above?
 
  johan
 
 
 
 
  On 11/9/05, Andrew Berman [EMAIL PROTECTED]  wrote:
   Oh and the other nice feature would be that if you do it like
 this:
 wicket:message key=..My Text/wicket that the My Text would be
 the
 default text if the key is not found.
  
  
  
  
  
   On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote:
Well, I guess not being able to do it in JavaScript would be
 ok,
   but I
 think there definitely needs to be a way to do it in attributes.
   
Here is the link for how Tapestry 4.0 does it:

  
 http://jakarta.apache.org/tapestry/UsersGuide/localization.html
   
--Andrew
   
   
   
On 11/9/05, Juergen Donnerstag  [EMAIL PROTECTED]
 
   wrote:
 On 11/9/05, Andrew Berman  [EMAIL PROTECTED] wrote:
  I like wicket:message key=../ as long as it would work
 how
 normal JSP
  tags currently work.  In other words, I would be able to
 do
   this:
 
  input type=button value=wicket:message
   key='labelKey'//
 
  or
 
  script
 alert(wicket:message key='labelKey'/);
  /script
 

 No, that was not the intend and I don't like it either.
 wicket:message .. would be a normal XML tag. To retrieve a
   i18n
 message for a tag attribute I'd go for input type=button
 value=message:key='labelKey'//.

 The following is a bit tricky and I'm not sure how well
 it'll
   realy
 work, because you kind of have to analyze JS.
 script
 alert(message:key='labelKey'/);
 /script

 Juergen




 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App
   Server.
 Download
 it for free - -and be entered to win a 42 plasma tv or your
   very
 own
 Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net


  
 https://lists.sourceforge.net/lists/listinfo/wicket-user

   
   
  
  
 
 


   
   
   
 ---
SF.Net email is sponsored by:
Tame your 

Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Juergen Donnerstag
yesm true. do you prefer wicket:mesage or wicket:i18n?

Juergen

On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote:
 then call it wicket:message=value=my-key

  so that

  wicket:message key=..Default Text/wicket:message
  and
   input type=button value=My Val wicket:message=value=my-key/

  uses the same kind of notation.

  Als value=My Val can then be seen as the default value if the value is
 not found for the given locale?
  That would be nice i think.

  johan



 On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 
  good idea, except I would like to make a =. wicket:i18n=value=my-key
 
  Juergen
 
  On 11/9/05, Scott Sauyet [EMAIL PROTECTED] wrote:
   Johan Compagner wrote:
i can live with:
   
wicket:message key=..Default Text/wicket:message
  
   This makes sense.
  
input type=button value=message:key=my-key/
  
   I don't think this one does.  It breaks the previewability of pages
   which is one of Wicket's hallmarks.
  
   How about something like
  
input type=button value=My Val
   wicket:attr=value:message:my-key/
  
   or
  
wicket:i18n=value:my-key
  
   Wicket could then replace the value attribute entirely, but the preview
   is still available.
  
   This could also contain a comma-separated list of
   attribute-name/attribute-value-keys if there are
 multiple attributes to
   replace (not that I can think of a use-case right now...)
  
  -- Scott
  
  
  
   ---
   SF.Net email is sponsored by:
   Tame your development challenges with Apache's Geronimo App Server.
 Download
   it for free - -and be entered to win a 42 plasma tv or your very own
   Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  ---
  SF.Net email is sponsored by:
  Tame your development challenges with Apache's Geronimo App Server.
 Download
  it for free - -and be entered to win a 42 plasma tv or your very own
  Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 




---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Arto Arffman
One more idea. How about using some reserved word for wicket:id. Like this:

span wicket:id=$somereservedword$ value=message:key1 alt=message:key2/

This would create an automatic component (with a behaviour) that scans all attributes and does its magic. This could be easily extended to other scenarios too.

/arto


Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Johan Compagner
can't say i have a real preference.
Somehow wicket:message looks better because i18n looks like capitals
But that is just a feeling.
And i still don't know if it is i18n or should it be l10n? (localisation)
Because you do Localize youre page itself. But the template is maybe i18n
On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
yesm true. do you prefer wicket:mesage or wicket:i18n?JuergenOn 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: then call it wicket:message=value=my-key
so thatwicket:message key=..Default Text/wicket:messageand input type=button value=My Val wicket:message=value=my-key/
uses the same kind of notation.Als value=My Val can then be seen as the default value if the value is not found for the given locale?That would be nice i think.
johan On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:   good idea, except I would like to make a =. wicket:i18n=value=my-key
   Juergen   On 11/9/05, Scott Sauyet [EMAIL PROTECTED] wrote:   Johan Compagner wrote:i can live with:
   wicket:message key=..Default Text/wicket:message This makes sense.  input type=button value=message:key=my-key/
 I don't think this one does.It breaks the previewability of pages   which is one of Wicket's hallmarks. How about something like
input type=button value=My Val   wicket:attr=value:message:my-key/ or  
  wicket:i18n=value:my-key Wicket could then replace the value attribute entirely, but the preview   is still available.  
   This could also contain a comma-separated list of   attribute-name/attribute-value-keys if there are multiple attributes to   replace (not that I can think of a use-case right now...)
-- Scott ---   SF.Net email is sponsored by:
   Tame your development challenges with Apache's Geronimo App Server. Download   it for free - -and be entered to win a 42 plasma tv or your very own   Sony(tm)PSP.Click here to play:
 http://sourceforge.net/geronimo.php   ___   Wicket-user mailing list   
Wicket-user@lists.sourceforge.net   https://lists.sourceforge.net/lists/listinfo/wicket-user
  ---  SF.Net email is sponsored by:  Tame your development challenges with Apache's Geronimo App Server.
 Download  it for free - -and be entered to win a 42 plasma tv or your very own  Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php
  ___  Wicket-user mailing list  Wicket-user@lists.sourceforge.net  
https://lists.sourceforge.net/lists/listinfo/wicket-user ---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread pepone pepone
Other way of handle tranlations can be take and aproach simiar to Qt ui tollkit

i try to explain it a bit

whe you localiced and application all string in html are desired to be translate

we can parser html files and assign and unique id to each string to be
translate

provide a singuel file for each locale with string-id=string-translation

application can plug a diferent translation file depending of current locale

have this make any sense?





On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote:
 then call it wicket:message=value=my-key

  so that

  wicket:message key=..Default Text/wicket:message
  and
   input type=button value=My Val wicket:message=value=my-key/

  uses the same kind of notation.

  Als value=My Val can then be seen as the default value if the value is
 not found for the given locale?
  That would be nice i think.

  johan



 On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
  good idea, except I would like to make a =. wicket:i18n=value=my-key
 
  Juergen
 
  On 11/9/05, Scott Sauyet [EMAIL PROTECTED] wrote:
   Johan Compagner wrote:
i can live with:
   
wicket:message key=..Default Text/wicket:message
  
   This makes sense.
  
input type=button value=message:key=my-key/
  
   I don't think this one does.  It breaks the previewability of pages
   which is one of Wicket's hallmarks.
  
   How about something like
  
input type=button value=My Val
   wicket:attr=value:message:my-key/
  
   or
  
wicket:i18n=value:my-key
  
   Wicket could then replace the value attribute entirely, but the preview
   is still available.
  
   This could also contain a comma-separated list of
   attribute-name/attribute-value-keys if there are
 multiple attributes to
   replace (not that I can think of a use-case right now...)
  
  -- Scott
  
  
  
   ---
   SF.Net email is sponsored by:
   Tame your development challenges with Apache's Geronimo App Server.
 Download
   it for free - -and be entered to win a 42 plasma tv or your very own
   Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  ---
  SF.Net email is sponsored by:
  Tame your development challenges with Apache's Geronimo App Server.
 Download
  it for free - -and be entered to win a 42 plasma tv or your very own
  Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 




--
play tetris http://pepone.on-rez.com/tetris


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Eelco Hillenius
Problem with that is that input type=button value=wicket:message
key='labelKey'// is not valid xml.

Eelco

On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote:
 I like wicket:message key=../ as long as it would work how normal JSP
 tags currently work.  In other words, I would be able to do this:

 input type=button value=wicket:message key='labelKey'//

 or

 script
alert(wicket:message key='labelKey'/);
 /script


 --Andrew



 On 11/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  I think wicket:message key=../ would fit well with our other wicket
 tags, e.g wicket:panel.
 
  IMHO such an addition would be very useful.
 
  Sven
 
  
  You mean for tag text, correct? span wicket:message= hello.message /
  
  What do you think about wicket:message key=../.  Than it is clear
  that the whole label is wicket specific,
  
  span wicket:message=key is a bit dangerous because how would we
  handle span wicket:id=myLabel wicket:message=key?
  
  Juergen
  
  On 11/9/05, Dorel Vaida [EMAIL PROTECTED]  wrote:
   Juergen Donnerstag wrote:
  
   I'm all for making things easier for the user.
   
   
   
   Perhaps Wicket could have something like this:
   span wicket:id=message:myLabelHere/span
   
   
   
   I'm not sure this makes sense. wicket:id is not a text to be displayed
   anywhere. It is a name which identifies a component. It definitely
   won't work.
   
   
   Actually, maybe this is not the solution but a way to specify i18n
   message keys directly in the html through a wicket tag would be VERY
   handy. Now, in a project I'm working on,  for a i18n input form, half
 of
   the form elements are i18n labels that I add to the form in java code.
   Instead of add(new I18nLabel(lbl, hello.mesage)) and span
   wicket:id=lbl / it would be more handy to have 'something like'
 span
   wicket:message= hello.message /span or wicket:message
   key=hello.message /,  w/o poluting java code with i18n keys if it's
   not necessary (like when you need to compose complex  i18n messages
   which would be done from the code).
  
   Just a thought :-) (or maybe I am too intoxicated with
   Struts/Webwork/SpringMVC :-D. I am trying to get rid of it you know.)
  
   
   
   Even better would be that it would recognize the message:label
 anywhere
  in
   the HTML.  So for example, you could have:
   input type=submit value=message: label.submit /
   
   
   
   That I think is possible. Acutally you can do it today already without
   any changes to the core. You need to develop a IMarkupFilter and
   append it to the list of existing ones invoked by MarkupFilter.
   
   However you won't be able to handle message:  within a tag body;
   only tag attributes. How does Tapestry do it for body text?
   
   An other option would be to run a kind of text based (not xml based)
   pre-processor (like we do merging of inherited markup) prior to adding
   the markup to the cache.
   
   How likely is it that you'll find message: and it is not intended to
   be a i18n text? How to escape it?
   
   Lets say your message must contain a reference some other data, e.g.
   ...${price} That won't be possible either. Only simple text. As
   AttributeModifier is already able to handle it, message:.. would be
   for easy and straight forward replacements only, and AttributeModifer
   to cover everything else.
   
   Ah, and of course you loose preview capabilities, as the designer
   won't the real message, he'd see message:... only.
   
   And it might not the perfekt solution for high-speed up, because of
   the (little) performance penalties involved. For high-speed up you can
   still have myPage_en.html; myPage_nl.html etc may which as well cover
   minor changes in the layout due to labels being of differents length;
   right-to-left languages etc.
   
   Juergen
   
   On 11/8/05, Andrew Berman  [EMAIL PROTECTED] wrote:
   
   
   In my app I never hard-code text so I'm constantly adding Labels to
 my
   pages.  I was wondering if it would make sense to have a shortcut,
  similar
   to how Tapestry does it, for dsplaying localization messages.  In
  Tapestry,
   you can do this: title=message:page-title, where page-title is the
  lookup
   into the property file.
   
   Perhaps Wicket could have something like this:
   span wicket:id=message:myLabelHere/span
   
   Even better would be that it would recognize the message:label
 anywhere
  in
   the HTML.  So for example, you could have:
   input type=submit value=message: label.submit /
   
   Thoughts?
   
   --Andrew
   
   
   
   
   
  
 ---
   SF.Net email is sponsored by:
   Tame your development challenges with Apache's Geronimo App Server.
  Download
   it for free - -and be entered to win a 42 plasma tv or your very own
   Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   

Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Laurent PETIT
Hello,

What about something like that:

Use one of the two forms (both could be allowed):

wicket:label key=my.msg.keyA text to render/wicket:label
or
wicket:labelmy.msg.key/wicket:label

Of course, this introduces a new element in the wicket namespace ...

Or something like that:
span wicket:type=message key=my.msg.keyAny text you want/span
or
span wicket:id=message_or_whatever key=my.msg.keyAny text you want/span

and create a hook in wicket (if it does not already exist) for
resolution classes to handle tags with wicket:type attributes,
or create a hook (if it does not alread exist) for resolution classes
to let them a possibility to handle a markup with no corresponding
component.
Thus creating a resolver which searches for the key attribute ...
More open, but may be like opening the pandora box ... ?

Or, as you suggested, using hooks for specific markup modifiers before
or after the wicket component rendering phase ?




On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 I'm all for making things easier for the user.

  Perhaps Wicket could have something like this:
  span wicket:id=message:myLabelHere/span

 I'm not sure this makes sense. wicket:id is not a text to be displayed
 anywhere. It is a name which identifies a component. It definitely
 won't work.

  Even better would be that it would recognize the message:label anywhere in
  the HTML.  So for example, you could have:
  input type=submit value=message:label.submit /

 That I think is possible. Acutally you can do it today already without
 any changes to the core. You need to develop a IMarkupFilter and
 append it to the list of existing ones invoked by MarkupFilter.

 However you won't be able to handle message:  within a tag body;
 only tag attributes. How does Tapestry do it for body text?

 An other option would be to run a kind of text based (not xml based)
 pre-processor (like we do merging of inherited markup) prior to adding
 the markup to the cache.

 How likely is it that you'll find message: and it is not intended to
 be a i18n text? How to escape it?

 Lets say your message must contain a reference some other data, e.g.
 ...${price} That won't be possible either. Only simple text. As
 AttributeModifier is already able to handle it, message:.. would be
 for easy and straight forward replacements only, and AttributeModifer
 to cover everything else.

 Ah, and of course you loose preview capabilities, as the designer
 won't the real message, he'd see message:... only.

 And it might not the perfekt solution for high-speed up, because of
 the (little) performance penalties involved. For high-speed up you can
 still have myPage_en.html; myPage_nl.html etc may which as well cover
 minor changes in the layout due to labels being of differents length;
 right-to-left languages etc.

 Juergen

 On 11/8/05, Andrew Berman [EMAIL PROTECTED] wrote:
  In my app I never hard-code text so I'm constantly adding Labels to my
  pages.  I was wondering if it would make sense to have a shortcut, similar
  to how Tapestry does it, for dsplaying localization messages.  In Tapestry,
  you can do this: title=message:page-title, where page-title is the lookup
  into the property file.
 
  Perhaps Wicket could have something like this:
  span wicket:id=message:myLabelHere/span
 
  Even better would be that it would recognize the message:label anywhere in
  the HTML.  So for example, you could have:
  input type=submit value=message:label.submit /
 
  Thoughts?
 
  --Andrew
 


 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server. Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Arto Arffman
2005/11/9, Andrew Berman [EMAIL PROTECTED]:
Oh and the other nice feature would be that if you do it like this: wicket:message key=..My Text/wicket that the My Text would be the default text if the key is not found. 


How about using the content as the key wicket:messagekeyLabel/wicket:message?

And for _javascript_, I think it could be possible to create a component that creates a _javascript_ object for the page resource (selected locale). Like this:

PageX_en.properties
keylabel1=Hello world!
keylabel2=You are using en-locale

PageX.html

span wicket:id=i18n_component/
...
script
function myFunc() {

 alert(i18n.keylabel1); 
 alert(i18n.keylabel2);
}

/script

generated html:

script
i18n = {
keylabel1='Hello world!', 
keylabel2='You are using en-locale'
};
/script


script
function myFunc() {

 alert(i18n.keylabel1); 
 alert(i18n.keylabel2);
}

/script


Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Igor Vaynberg
just realized its not going to work in a hierarchy of components never mind

-Igor
On 11/9/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
oh and btw, rendering the same component more then once on a page will
throw HEAD into an infinite loop while it works quiet well in 1.0 and
1.1. Should i write up a bug or is this part of someone's work in
progress?

-Igor
On 11/9/05, Igor Vaynberg [EMAIL PROTECTED]
 wrote:
Hmm
isnt all this already possible without having to do anything?

public class Message extends WebMarkupContainer
{
 public Message(String id)
 {
  super(id);
 }
 protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag)
 {
  ValueMap attrs=openTag.getAttributes();
  if (attrs.containsKey(wicket:message)) {
   String
message=getLocalizer().getString(attrs.getString(wicket:message),
this);
   replaceComponentTagBody(findMarkupStream(), openTag, message);
  } else {
   super.onComponentTagBody(markupStream, openTag);
  }
 }
}

this is the message component that emulates wicket:message key
add it to the page
and then in your page simply render it multiple times

 add(new Message(message));

 span wicket:id=message wicket:message=res1this is message replaced 1/spanbr/
 span wicket:id=message wicket:message=res2this is message replaced 2/spanbr/

something like it can also be used to do that inline attribute replacement.

no postprocessing or anything like that needed

if we want this to be a builtin feature we can simply add one of these to every page with some name that we reserve.

-Igor
On 11/9/05, pepone pepone [EMAIL PROTECTED]
 wrote:
Other way of handle tranlations can be take and aproach simiar to Qt ui tollkiti try to explain it a bitwhe you localiced and application all string in html are desired to be translatewe can parser html files and assign and unique id to each string to be
translateprovide a singuel file for each locale with string-id=string-translationapplication can plug a diferent translation file depending of current localehave this make any sense?


On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: then call it wicket:message=value=my-key
so thatwicket:message key=..Default Text/wicket:message
and input type=button value=My Val wicket:message=value=my-key/uses the same kind of notation.Als value=My Val can then be seen as the default value if the value is
 not found for the given locale?That would be nice i think.johan On 11/9/05, Juergen Donnerstag 

[EMAIL PROTECTED]
 wrote:  good idea, except I would like to make a =. wicket:i18n=value=my-key   Juergen   On 11/9/05, Scott Sauyet 


[EMAIL PROTECTED] wrote:   Johan Compagner wrote:i can live with:   wicket:message key=..Default Text/wicket:message
 This makes sense.  input type=button value=message:key=my-key/ I don't think this one does.It breaks the previewability of pages
   which is one of Wicket's hallmarks. How about something likeinput type=button value=My Val   wicket:attr=value:message:my-key/
 orwicket:i18n=value:my-key Wicket could then replace the value attribute entirely, but the preview
   is still available. This could also contain a comma-separated list of   attribute-name/attribute-value-keys if there are multiple attributes to
   replace (not that I can think of a use-case right now...)-- Scott ---
   SF.Net email is sponsored by:   Tame your development challenges with Apache's Geronimo App Server. Download   it for free - -and be entered to win a 42 plasma tv or your very own
   Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php

   ___   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net   

https://lists.sourceforge.net/lists/listinfo/wicket-user
  ---  SF.Net email is sponsored by:  Tame your development challenges with Apache's Geronimo App Server.
 Download  it for free - -and be entered to win a 42 plasma tv or your very own  Sony(tm)PSP.Click here to play: 

http://sourceforge.net/geronimo.php
  ___  Wicket-user mailing list  

Wicket-user@lists.sourceforge.net  
https://lists.sourceforge.net/lists/listinfo/wicket-user --play tetris 

http://pepone.on-rez.com/tetris---
SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: 
http://sourceforge.net/geronimo.php___Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user








Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Igor Vaynberg
You cannot really compare wicket to tapestry. Although they are both
component oriented frameworks, they have completely different
approaches. In wicket the focus is on java code not on the template.
Wicket templates are simple and limited (purposefully) where as
tapestry allows for a lot more customization from within the template.
Wicket's approach makes sure all your logic is kept in code. That is
the wicket way.

-Igor
On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote:
Well, I guess not being able to do it in _javascript_ would be ok, but I
think there definitely needs to be a way to do it in attributes.Here is the link for how Tapestry 4.0 does it: 

http://jakarta.apache.org/tapestry/UsersGuide/localization.html--AndrewOn 11/9/05, 
Juergen Donnerstag 
[EMAIL PROTECTED] wrote:On 11/9/05, Andrew Berman 

[EMAIL PROTECTED] wrote: I like wicket:message key=../ as long as it would work how normal JSP tags currently work.In other words, I would be able to do this: input type=button value=wicket:message key='labelKey'//
 or scriptalert(wicket:message key='labelKey'/); /scriptNo, that was not the intend and I don't like it either.wicket:message .. would be a normal XML tag. To retrieve a i18n
message for a tag attribute I'd go for input type=buttonvalue=message:key='labelKey'//.The following is a bit tricky and I'm not sure how well it'll realywork, because you kind of have to analyze JS.
scriptalert(message:key='labelKey'/);/scriptJuergen---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: 
http://sourceforge.net/geronimo.php___
Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Igor Vaynberg
oh and btw, rendering the same component more then once on a page will
throw HEAD into an infinite loop while it works quiet well in 1.0 and
1.1. Should i write up a bug or is this part of someone's work in
progress?

-Igor
On 11/9/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
Hmm
isnt all this already possible without having to do anything?

public class Message extends WebMarkupContainer
{
 public Message(String id)
 {
  super(id);
 }
 protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag)
 {
  ValueMap attrs=openTag.getAttributes();
  if (attrs.containsKey(wicket:message)) {
   String
message=getLocalizer().getString(attrs.getString(wicket:message),
this);
   replaceComponentTagBody(findMarkupStream(), openTag, message);
  } else {
   super.onComponentTagBody(markupStream, openTag);
  }
 }
}

this is the message component that emulates wicket:message key
add it to the page
and then in your page simply render it multiple times

 add(new Message(message));

 span wicket:id=message wicket:message=res1this is message replaced 1/spanbr/
 span wicket:id=message wicket:message=res2this is message replaced 2/spanbr/

something like it can also be used to do that inline attribute replacement.

no postprocessing or anything like that needed

if we want this to be a builtin feature we can simply add one of these to every page with some name that we reserve.

-Igor
On 11/9/05, pepone pepone [EMAIL PROTECTED]
 wrote:
Other way of handle tranlations can be take and aproach simiar to Qt ui tollkiti try to explain it a bitwhe you localiced and application all string in html are desired to be translatewe can parser html files and assign and unique id to each string to be
translateprovide a singuel file for each locale with string-id=string-translationapplication can plug a diferent translation file depending of current localehave this make any sense?

On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: then call it wicket:message=value=my-key
so thatwicket:message key=..Default Text/wicket:message
and input type=button value=My Val wicket:message=value=my-key/uses the same kind of notation.Als value=My Val can then be seen as the default value if the value is
 not found for the given locale?That would be nice i think.johan On 11/9/05, Juergen Donnerstag 
[EMAIL PROTECTED]
 wrote:  good idea, except I would like to make a =. wicket:i18n=value=my-key   Juergen   On 11/9/05, Scott Sauyet 

[EMAIL PROTECTED] wrote:   Johan Compagner wrote:i can live with:   wicket:message key=..Default Text/wicket:message
 This makes sense.  input type=button value=message:key=my-key/ I don't think this one does.It breaks the previewability of pages
   which is one of Wicket's hallmarks. How about something likeinput type=button value=My Val   wicket:attr=value:message:my-key/
 orwicket:i18n=value:my-key Wicket could then replace the value attribute entirely, but the preview
   is still available. This could also contain a comma-separated list of   attribute-name/attribute-value-keys if there are multiple attributes to
   replace (not that I can think of a use-case right now...)-- Scott ---
   SF.Net email is sponsored by:   Tame your development challenges with Apache's Geronimo App Server. Download   it for free - -and be entered to win a 42 plasma tv or your very own
   Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php
   ___   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net   
https://lists.sourceforge.net/lists/listinfo/wicket-user
  ---  SF.Net email is sponsored by:  Tame your development challenges with Apache's Geronimo App Server.
 Download  it for free - -and be entered to win a 42 plasma tv or your very own  Sony(tm)PSP.Click here to play: 
http://sourceforge.net/geronimo.php
  ___  Wicket-user mailing list  
Wicket-user@lists.sourceforge.net  
https://lists.sourceforge.net/lists/listinfo/wicket-user --play tetris 
http://pepone.on-rez.com/tetris---
SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: 
http://sourceforge.net/geronimo.php___Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Igor Vaynberg
Hmm
isnt all this already possible without having to do anything?

public class Message extends WebMarkupContainer
{
 public Message(String id)
 {
  super(id);
 }
 protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag)
 {
  ValueMap attrs=openTag.getAttributes();
  if (attrs.containsKey(wicket:message)) {
   String
message=getLocalizer().getString(attrs.getString(wicket:message),
this);
   replaceComponentTagBody(findMarkupStream(), openTag, message);
  } else {
   super.onComponentTagBody(markupStream, openTag);
  }
 }
}

this is the message component that emulates wicket:message key
add it to the page
and then in your page simply render it multiple times

 add(new Message(message));

 span wicket:id=message wicket:message=res1this is message replaced 1/spanbr/
 span wicket:id=message wicket:message=res2this is message replaced 2/spanbr/

something like it can also be used to do that inline attribute replacement.

no postprocessing or anything like that needed

if we want this to be a builtin feature we can simply add one of these to every page with some name that we reserve.

-Igor
On 11/9/05, pepone pepone [EMAIL PROTECTED] wrote:
Other way of handle tranlations can be take and aproach simiar to Qt ui tollkiti try to explain it a bitwhe you localiced and application all string in html are desired to be translatewe can parser html files and assign and unique id to each string to be
translateprovide a singuel file for each locale with string-id=string-translationapplication can plug a diferent translation file depending of current localehave this make any sense?
On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: then call it wicket:message=value=my-keyso thatwicket:message key=..Default Text/wicket:message
and input type=button value=My Val wicket:message=value=my-key/uses the same kind of notation.Als value=My Val can then be seen as the default value if the value is
 not found for the given locale?That would be nice i think.johan On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED]
 wrote:  good idea, except I would like to make a =. wicket:i18n=value=my-key   Juergen   On 11/9/05, Scott Sauyet 
[EMAIL PROTECTED] wrote:   Johan Compagner wrote:i can live with:   wicket:message key=..Default Text/wicket:message
 This makes sense.  input type=button value=message:key=my-key/ I don't think this one does.It breaks the previewability of pages
   which is one of Wicket's hallmarks. How about something likeinput type=button value=My Val   wicket:attr=value:message:my-key/
 orwicket:i18n=value:my-key Wicket could then replace the value attribute entirely, but the preview
   is still available. This could also contain a comma-separated list of   attribute-name/attribute-value-keys if there are multiple attributes to
   replace (not that I can think of a use-case right now...)-- Scott ---
   SF.Net email is sponsored by:   Tame your development challenges with Apache's Geronimo App Server. Download   it for free - -and be entered to win a 42 plasma tv or your very own
   Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php   ___   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net   https://lists.sourceforge.net/lists/listinfo/wicket-user
  ---  SF.Net email is sponsored by:  Tame your development challenges with Apache's Geronimo App Server.
 Download  it for free - -and be entered to win a 42 plasma tv or your very own  Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php
  ___  Wicket-user mailing list  Wicket-user@lists.sourceforge.net  
https://lists.sourceforge.net/lists/listinfo/wicket-user --play tetris http://pepone.on-rez.com/tetris---
SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: 
http://sourceforge.net/geronimo.php___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Tapestry vs. Wicket (was: [Wicket-user] i18n messages in HTML)

2005-11-09 Thread David Leangen

On Wed, 2005-11-09 at 11:47 -0800, Igor Vaynberg wrote:
 You cannot really compare wicket to tapestry. Although they are both
 component oriented frameworks, they have completely different
 approaches. In wicket the focus is on java code not on the template.
 Wicket templates are simple and limited (purposefully) where as
 tapestry allows for a lot more customization from within the template.
 Wicket's approach makes sure all your logic is kept in code. That is
 the wicket way.
 
 -Igor

Thanks, Igor. I stole your quote and used it in the wiki page I started:

http://www.wicket-wiki.org.uk/wiki/index.php/For_Tapestry_Users


I would like to encourage other former Tapestry users to add whatever
they like to this page!


Cheers,
Dave





---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Scott Sauyet

Johan Compagner wrote:

then call it wicket:message=value=my-key

so that

wicket:message key=..Default Text/wicket:message
and
 input type=button value=My Val wicket:message=value=my-key/

uses the same kind of notation.


I can't decide if I like this idea or not.  I like the idea of having as 
few separate constructs as possible, but I'm not sure I like using the 
same word for a tag name and an attribute name.  And the more I think 
about it, the less I think there really needs to be a separate tag in 
the first place.  Usually if you have to add a hook for wicket you use 
an existing tag, or throw a SPAN around your content and add the 
wicket:id to that.  Why not do the same with wicket:message?  For 
example,


span wicket:message=my-keyDefault Text/span

But still, should this use the same construct for attribute replacement? 
 I'm not certain, especially since there would need to be a slight 
difference in syntax, that is,


span wicket:message=my-key... vs
input wicket:message=value=my-key type=.../

The latter syntax, as I mentioned earlier, leads itself pretty easily to 
 internationalizing multiple attributes simultaneously, with a 
comma-separated list:


input wicket:message=value=my-key, class=another-key.../

but there seems no elegant way of combining these with an i18n message 
for the body replacement.  Perhaps that could come first in the list, or 
we could use a non-text token, as in:


p wicket:message=$=greeting, class=greeting-classHello./p

But something doesn't smell right to me about this.  I think I would 
prefer instead:


p wicket:message=greeting wicket:attr=class=greeting-class...


The other thing to keep in mind if this really does make it into 
development is choosing what happens when there is both a wicket:message 
and a wicket:id on a single tag -- which comes first?  And if the 
component replaces the tag body does it know anything about the i18n?


I'm guessing that these are really questions for the developers' list, 
but since the issue was raised here, I guess we can keep the discussion 
here.  Does anyone know if most of the core developers keeps up with 
this list?  I know that several do, as I see them post regularly, but I 
don't know how many active core developers there are.


Cheers,

  -- Scott Sauyet



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Andrew Berman
I think this is starting to get all out of hand and when I suggested
this whole thing I didn't think it was going to be crazy like
this. Perhaps the attribute thing is best left to doing it the
normal Wicket way. I think the only thing I really need for i18n
in terms of changing attributes is for a button or submit form element
and those are easy enough to add in each page. 

I think we need a simple solution which gets the job done for other cases where, for example, you do:

First Name: input type=text/
Last name: 
etc.

Currently, I have to add a label in the page/form for every single
label I want for a form field, which honestly is kind of a pain.
So, I suggest we add the wicket:message tag which has this:

wicket:message key=myKeyDefault Message/wicket:message

Nice and simple. I think this will cover most cases where people
use i18n and if attribute support is needed people will just have to
add it to a component manually in the page code.

Thoughts?

--AndrewOn 11/9/05, Scott Sauyet [EMAIL PROTECTED] wrote:
Johan Compagner wrote: then call it wicket:message=value=my-key so that wicket:message key=..Default Text/wicket:message andinput type=button value=My Val wicket:message=value=my-key/
 uses the same kind of notation.I can't decide if I like this idea or not.I like the idea of having asfew separate constructs as possible, but I'm not sure I like using thesame word for a tag name and an attribute name.And the more I think
about it, the less I think there really needs to be a separate tag inthe first place.Usually if you have to add a hook for wicket you usean existing tag, or throw a SPAN around your content and add thewicket:id to that.Why not do the same with wicket:message?For
example, span wicket:message=my-keyDefault Text/spanBut still, should this use the same construct for attribute replacement?I'm not certain, especially since there would need to be a slight
difference in syntax, that is, span wicket:message=my-key... vs input wicket:message=value=my-key type=.../The latter syntax, as I mentioned earlier, leads itself pretty easily to
internationalizing multiple attributes simultaneously, with acomma-separated list: input wicket:message=value=my-key, class=another-key.../but there seems no elegant way of combining these with an i18n message
for the body replacement.Perhaps that could come first in the list, orwe could use a non-text token, as in: p wicket:message=$=greeting, class=greeting-classHello./p
But something doesn't smell right to me about this.I think I wouldprefer instead: p wicket:message=greeting wicket:attr=class=greeting-class...The other thing to keep in mind if this really does make it into
development is choosing what happens when there is both a wicket:messageand a wicket:id on a single tag -- which comes first?And if thecomponent replaces the tag body does it know anything about the i18n?
I'm guessing that these are really questions for the developers' list,but since the issue was raised here, I guess we can keep the discussionhere.Does anyone know if most of the core developers keeps up with
this list?I know that several do, as I see them post regularly, but Idon't know how many active core developers there are.Cheers, -- Scott Sauyet---
SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: 
http://sourceforge.net/geronimo.php___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n messages in HTML

2005-11-09 Thread Eelco Hillenius
Most of em do, though we all have kind of our different 'expertises'.
The currently active developers are yours truly, Juergen, Johan, Igor
and Martijn, though Martijn is mainly doing site/ builds/ promotion
etc. Gwyn is the man for Wiki. Jonathan is not really active, but does
some work in the background now and then; I'm living in Seattle now
(at least for the next few months) and he's too, so we meet up now and
then and exchange some ideas on Wicket. Ate will hopefully do the
portlet part for us, and Chris is bussy raising his little one;
haven't heard from him for a while, so I don't know whether he has
plans to be active on Wicket.

Hope that gives you an idea :)

Eelco


 Does anyone know if most of the core developers keeps up with
 this list?  I know that several do, as I see them post regularly, but I
 don't know how many active core developers there are.



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user