On Wed, Feb 4, 2009 at 4:06 AM, zordsdavini <[email protected]> wrote:
>
> Hi all,
>
> How to append genshi translator during init of toskawidgets? This
> problem comes from custom tw.forms templates. They are not
> translating. I feel there should be some simple step.
>
> I'm not sure what you mean by genshi translator but my guess is that you
must use lazystring:
Something like that:
23
<http://hg.sandbox.lt/pekla/file/012a56a06089/pekla/lib/forms.py#l23>class
CommentForm(forms.ListForm):
24 <http://hg.sandbox.lt/pekla/file/012a56a06089/pekla/lib/forms.py#l24>
25 <http://hg.sandbox.lt/pekla/file/012a56a06089/pekla/lib/forms.py#l25>
class fields(WidgetsList):
26 <http://hg.sandbox.lt/pekla/file/012a56a06089/pekla/lib/forms.py#l26>
name = forms.TextField(label_text = lazystring(_('Name')),
help_text = lazystring(_('Required')),
27 <http://hg.sandbox.lt/pekla/file/012a56a06089/pekla/lib/forms.py#l27>
validator = UnicodeString(not_empty=True)
28 <http://hg.sandbox.lt/pekla/file/012a56a06089/pekla/lib/forms.py#l28>
)
More code here:
http://hg.sandbox.lt/pekla/file/012a56a06089/pekla/lib/forms.py
If that does not help maybe other person will help you here ;-)
--
Dalius
http://blog.sandbox.lt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---