velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastian Gumpold" <sebastian.gump...@sbs.co.at>
Subject Re: ResourceTool question
Date Thu, 03 May 2007 08:38:07 GMT
Thanks, that helped.
I had to modify the resource bundle entry from
test.entry = At {0} o'clock "{1}" occured.
to
test.entry = At {0} o''clock "{1}" occured.

That fixed both of my problems.





"Nathan Bubna" <nbubna@gmail.com>
02.05.2007 21:42
Please respond to "Velocity Users List"

 
        To:     "Velocity Users List" <user@velocity.apache.org>
        cc: 
        Subject:        Re: ResourceTool question


This probably has to do with MessageFormat's escaping of quotes.  I'm
no expert on that, so you'd probably do better to just read:

http://java.sun.com/j2se/1.5.0/docs/api/java/text/MessageFormat.html

Also, you really shouldn't have to use the render() method directly in
most situations.  You can probably just do:

$text.test.entry.insert($arg0, $arg1)

instead of the two steps it sounds like you are using.

On 5/2/07, Sebastian Gumpold <sebastian.gumpold@sbs.co.at> wrote:
> Hi all!
>
> I'm having the following problems using the ResourceTool:
>
> The Resource bundle entry:
> test.entry = At {0} o'clock "{1}" occured.
>
> Then I use the ResourceTool to get the message from the resoucre bundle
> and fill it with the ResourceTool.render() method with a list of two
> parameters.
> The output I get is something like this:
> At May 2, 2007 at 11:24 AM oclock "{1}" occured.
>
> As you can see there are problems with the characters ' and ".
> What can i do to avoid this problems?
>
> Thanks in advance,
> Sebastian

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message