[cal10n-user] Single quote in translation file

Ceki Gülcü ceki at qos.ch
Tue Mar 30 13:06:23 CEST 2010


Hello Gilles,

To avoid native2ascii transformation, cal10n uses its own parser of property 
files. What you are describing looks like a bug in that parser. Could you please 
enter a bug report for this?

TIA,

On 30/03/2010 11:55 AM, Gilles Sadowski wrote:
> 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