[Twisted-web] Freeform localisation and buttons (Was: Freeform
default button label)
maillists at ivsn.com
Tue Jul 19 14:33:42 MDT 2005
Richard Wall wrote:
> Paul, you know your webapp best... but in my experience this could also
> be achieved with a single submit button and supplementary hyperlinks.
> ... <snap>
You are right, me maybe too - it's matter of taste and the experience level
of users: I've seen situations, where the use of browser's back button produced
very confusing situations, so I prefer to disable uncontrolled step-back
while any edit/insert/delete action.
> I've never done a foreign language site, but I can see that this would
> be useful. I just tried hacking the i18n example a bit and have found
> that you can use an i18n.Translator as the label, requiredFailMessage
> parameters to the eg annotate.String. Have attached tgz archive of the
> app. It seems really cool, but I haven't had time to figure out how to
> generate the .mo files from the .po files. It would be good if that
> could be done automatically when the .po files change. Maybe you'll
> better understand that side of things.
THAT'S IT !!! (with little limitations) THANKS - I've not realized this
To extract _('messages'), translate and create *.mo files, I can recommend
" poEdit " release 1.3.2 or above, works very well with Python.
>>- error messages can vary depending on field contents:
>>integer error is from user's point of view not a numeric error,
>>(i.e. "please enter your age as whole number")
> You might get away with annotate.String(requiredFailMessage="please
> enter your age as whole number")
Good solution for required message, but ...
> More likely, you'll want to create your own library of formless types,
> processors and renderers. For ideas see second attachement.
... this way seems to be more efficient, because here I can place
translation of all texts + own validators can be extended to range too
(i.e. age field accept values only between 5 to 99, although integer has
Thank you again for help, if my efforts are successful, I hope to pay
back with posting some usable validators, etc.
More information about the Twisted-web