Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Not A Bug
-
Affects Version/s: 1.0-RC3
-
Fix Version/s: 1.2 final
-
Component/s: Documentation
-
Labels:None
Description
When entering single quotes in a messages code line the following parameters (e.g. {1}) are not resolved, but the text is displayed.
Example:
messages.properties:
test.test1=Hello {0}, how is it as a {1}
test.test2=Hello {0}, how isn't it as a {1}
test.gsp:
<g:message code="test.test1" args="['Graeme', 'Grails-Coder']" /><br />
<g:message code="test.test2" args="['Graeme', 'Grails-Coder']" />
HTML Page:
Hello Graeme, how is it as a Grails-Coder
Hello Graeme, how isnt it as a {1}
If this is normal behavior, than it should be at least mentioned in the guide. It took me a while to find the problem....
This is standard behaviour for Java resource bundles. You need to escape the quotes:
test.test2=Hello {0}, how isn''t it as a {1}test.test2=Hello {0}, how isn''t it as a {1}