Eelco Hillenius wrote:
Btw, I would mind a decision about this in this weekend, as I'm finishing the chapter on localization right now :-)FWIW, I don't like the silent failure we have now, and believe that using the body as a default isn't very helpful; e.g. if you have the default body the same as what you intended to put in the properties file for the default locale (which is something that I often do, and I can imagine other people doing that as well), and you make a spelling error in the key (of either the tag or in the properties file), you'd never notice Wicket not finding the property. Either outputting the key as the body or throwing an exception is way better imho. However, I wouldn't vote against people wanting to stick with the current pattern as it is quite late in the game to change this. Eelco
This is precisely the issue I was having, and the reason I was putting "[key]" in there, so I could actually see that it was getting the value from my properties file and not just the "preview" default, which happened to be the same (of course this kinda ruins the preview a bit).
Thinking about it a bit more I agree with Eelco that I would like the exception thrown even if there is a default filled in (i.e., the message body is not empty) and the key is not defined, because it would kill previewability if you're forced to put empty wicket messages to get this behavior.
I realize it's quite "late in the game" as Eelco puts it, but couldn't this just be a setting which you can turn on (and defaults to off), like Al Maw suggested? Or even defaults to on and in the migration notes it could say to get the old behavior you have to turn it off (being hopeful here ;-))
I really hate unresolved i18n messages, and with the silent failure it's just a pain to find them all.
Regards, Sebastiaan
On 11/3/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:On 11/3/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:then you are violating the contract of wicket:message. if we do this then there is little point to allowing body inside wicket:messageErm, where is that contract defined? The body is for previewing. I don't think I ever thought about this as a default, nor do I think we should, since that is inconsistent with what we do elsewhere. Eelco--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
smime.p7s
Description: S/MIME Cryptographic Signature