localization is non sprox business. for overriding messages you should set
it in the tw fileld validators. for example i use this:
messages = {
'string_tooshort': l_('Please enter at lease %s characters.') % 8,
'string_toolong': l_('The maximum characters allowed are %s.') % 20,
'required': l_('Enter a value'),
'bademail':l_('Must be a valid email address'),
'mismatch' :l_('Must match password'),#todo: password must set
dynamically
'incorrect': l_("Incorrect captcha value."),
'missing': l_("Missing captcha value."),
'tooshort': l_("Value is too short"),
}
current_password = twf.PasswordField(label=l_('Current Password'), validator
=twc.StringLengthValidator(required=True ,min=8, max=20, msgs=
validation_message))
On Wednesday, June 29, 2011 at 6:19:39 PM UTC+4:30, Mengu wrote:
>
> hello everyone
>
> i have two questions regarding sprox.
>
> 1) is it possible to localize error messages like "please enter a
> value" and "missing value".
>
> 2) is it possible to indicate that a field is required by adding an
> asterisk at the beginning of a field test?
>
> thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.