Index: openacs-4/packages/acs-lang/tcl/localization-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/localization-procs.tcl,v diff -u -r1.23.8.1 -r1.23.8.2 --- openacs-4/packages/acs-lang/tcl/localization-procs.tcl 27 Aug 2013 12:20:35 -0000 1.23.8.1 +++ openacs-4/packages/acs-lang/tcl/localization-procs.tcl 3 Sep 2013 08:15:07 -0000 1.23.8.2 @@ -43,11 +43,25 @@ return "" } - set dec [lc_get -locale $locale "decimal_point"] + set dec [lc_get -locale $locale "decimal_point"] set thou [lc_get -locale $locale "mon_thousands_sep"][lc_get -locale $locale "thousands_sep"] - set neg [lc_get -locale $locale "negative_sign"] - set pos [lc_get -locale $locale "positive_sign"] + set neg [lc_get -locale $locale "negative_sign"] + set pos [lc_get -locale $locale "positive_sign"] + # + # Sanity check: decimal point must be different from the thousands + # separators. This test should be really either in regression + # testing or be forumulated as constraint after changing the + # message keys. However, since a violation can lead to incorrect + # results, the safety check is here as well. + # + if {[string first $dec $thou] > -1} { + error "error in locale $locale: decimal point '$decimal_point' must be different\ + from thousands separator\ + (mon_thousands_sep '[lc_get -locale $locale mon_thousands_sep]'\ + and thousands_sep '[lc_get -locale $locale thousands_sep]')" + } + lang::util::escape_vars_if_not_null {dec thou neg pos} # Pattern actually looks like this (separators notwithstanding):