We have discovered that Tapestry 3.0.3 treats apostrophes differently
in .properties files
depending on whether you use getMessage() or format().  This
particularly affects apostrophe-heavy
languages like French.  In particular, if a message looks like this:

 username = Nom d'utilisateur

then getMessage("username") returns the expected string, but
format("username") returns
"Nom dutilisateur", which is clearly wrong.  Digging a bit, we learned
that apostrophes
are used to escape braces, and correct syntax for an apostrophe is to
double it.  OK, fine:
we can change the above to

 username = Nom d''utilisateur

so that format("username") works.  But that makes
getMessage("username") return the double
apostrophe -- argh!

For now we are using this rule:
 * if a message has {nnn} in it, double apostrophes
 * if not, don't
in order to avoid incorrect user messages.  But this is gross.  If we
have to double apostrophes
in .properties files, we should have to double them in *all* properties!

So... is this a bug in Tapestry 3?  Or are we just using .properties
files incorrectly here?
If it is considered a bug, I would be happy to cook up a patch.

       Greg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to