That is because T() is not in context when validators are defined. you have
to pass error_message to your validators.

db.table.field.requires=IS_NOT_EMPTY(error_message=T('this field cannot be
empty'))

That is the way I am doing woth my Portuguese systems and sites.

2010/12/27 Martin Weissenboeck <mweis...@gmail.com>

> Hi,
>
> I want to build a website using German. A lot of texts can be translated
> using the T() object. But there are some problems:
>
> (1) I have modified default/user.html:
>
>    - <a href="{{=URL(r=request,args='register')}}">{{=T('register')}}</a>
>    - <a
>    href="{{=URL(r=request,args='request_reset_password')}}">{{=T('lost
>    password')}}</a>
>
> Works fine. Would be nice to have these lines as standard text.
>  (2) There is a lot of English strings in gluon/validators.py, starting
> with
>
>    - error_message (e.g. "def __init__(self, expression,
>    error_message='invalid expression'):"),
>    - failures.append and
>    - format
>
> I was very surprised that I could not find any T() object in the code. Now
> I tried to use the T() object for all of these lines, but T() is not known. 
> That
> is realy not good - a lot of users would not accept a website with mixed
> German and English words. What can I do?
>
> Which kind regards
> Martin
>



-- 

Bruno Rocha
http://about.me/rochacbruno/bio

Reply via email to