Forum OpenACS CMS: Re: XoWiki - Weird behaviour when editing form fields in numeric format

Of course changing the separator will do, but what I found is that whenever the locale uses the same separator for decimals and thousands the issue will occur. It is not related to italian locale only.

I understand my fix touches very very stable code in responsible components of OpenAcs, but I think this problem deserves to be considered as a bug and solved (with priority and solution to your convenience). What is your opinion?

The check for invalid settings of i18n should be a constraint after the setting of message keys when these are entered, or part of the regression test. Since the message key setting is agnostic about the semantics of the keys, and regression testing is not performed for all languages, i've now added a sanity check in lc_parse_number.

probably, the most realistic approach is to improve regression testing. patches are welcome.

Came up with this, tell me what you think:

I put the check for the separators into a proc called lang::message::check, together with the check performed into lang::message::register to ensure a message contains all the variables required for substitution. This proc should contain all the semantic and sanity checks to be performed on messages now and in the future.

The new proc was then put into 3 places:

- lang::message::register in place of the former check
- a new regression test called lang_messages_correct, which performs the check on every message
- the on_submit block of the message key setting form, displaying an error on the form field when the check fails

If sounds reasonable to you I can send the patches

sounds very reasonable... please send me the patches for review.
Patches sent!