[cal10n-user] Single quote in translation file
Gilles Sadowski
gilles.sadowski at ulb.ac.be
Tue Mar 30 11:55:22 CEST 2010
Hi.
When in a "properties" file containing the localized message patterns, there
is a single quote in a pattern, it doesn't appear in the output and prevents
the conversion of the curly-braced variables that follow it.
E.g. if a "math_messages_fr.properties" contains this line:
---CUT---
OUT_OF_RANGE=La valeur {0} est hors de l intervalle [{1}, {2}] (message localisé)
---CUT---
the ouput I get is
---CUT---
La valeur -1 est hors de l intervalle [0, 3] (message localisé)
---CUT---
as expected.
However, when the pattern is changed to:
---CUT---
OUT_OF_RANGE=La valeur {0} est hors de l'intervalle [{1}, {2}] (message localisé)
---CUT---
(with a single quote before the word "intervalle"),
the ouput I get is now
---CUT---
La valeur -1 est hors de lintervalle [{1}, {2}] (message localisé)
---CUT---
In the Javadoc of the "Properties" class, they say:
"Escapes are not necessary for single and double quotes; however, by the rule
above, single and double quote characters preceded by a backslash still
yield single and double quote characters, respectively."
[I also tried escaping with a single slash character but the result is the
same.]
So it seems that it is not the case when using CAL10N.
Did I miss something from the documentation?
Best regards,
Gilles
More information about the cal10n-user
mailing list