On Dec 31, 12:23 pm, Jonathan Lundell <jlund...@pobox.com> wrote: > On Dec 31, 2010, at 8:54 AM, DenesL wrote: > > > > > The problem is that those messages are defined internally in the > > validator and can not be set via error_message. > > Actually, they can, except that there's a bug for the first one, 'enter an > integer' that needs to be fixed. >
Those messages are set by IF statements inside the validator where they are not accessible to the developer, and they should be translatable. How would you define error_message to handle the four different cases?. > > > > An easy solution would be to wrap them in a T call but that results > > in: > > NameError: global name 'T' is not defined, line 188, in restricted > > > So the question is why T can not be part of the environment variable > > when it is available at the model level. > > Perhaps because validators.py gets compiled without T being defined? I'm a > little fuzzy on the whole subject, and would appreciate some clarification. > > >