[2.X-java] Apostrophes don't show up in Messages

297 views
Skip to first unread message

tony

unread,
Oct 8, 2012, 1:59:10 PM10/8/12
to play-fr...@googlegroups.com
I've set up a messages.en file that contains my messages, but apostrophes don't seem to work. I've tried escaping with backslashes and even using '. Can anyone help me out?

Thanks in advance

Jay

unread,
Oct 8, 2012, 3:19:37 PM10/8/12
to play-fr...@googlegroups.com
I reported this a while ago, but never got an answer. I don't know if its by design or a bug, but it is escaped with an additional apostrophe.

so

property.name= Don''t have an ....

tony

unread,
Oct 8, 2012, 3:40:08 PM10/8/12
to play-fr...@googlegroups.com
Thanks Jay that's super helpful.

James Roper

unread,
Oct 8, 2012, 11:59:55 PM10/8/12
to play-fr...@googlegroups.com
This is not a bug, Play uses standard Java message formats for messages.  Here is the message format spec from the Java docs:


Quotes are considered special characters in Java message formats, from the spec:

Within a String"''" represents a single quote.
Reply all
Reply to author
Forward
0 new messages