Hi Gregor,

That's not a problem, I guess what you're trying to do is localizing
the field label, to do this you need to use the label argument to a
widget constructor.

text = widgets.TextArea(name=comment, label=_("Beschreibung"),
validator=validators.NotEmpty())

Note that localizing the name itself is a very bad idea (that
fortunately doesn't even work) since your method will receive
parameters localized and I don't think you really want to work with
localized variables names or dictionary keys. ;-)

Hope this helps.

Ciao
Michele

Gregor Horvath wrote:
> Hi,
>
> My apologize that my first post with this subject had a wrong reference
> to an unrelated thread.
>
> I therefore repeat my problem now in a seperate thread:
>
> this:
>
>  text = widgets.TextArea(name=_("Beschreibung"),
> validator=validators.NotEmpty())
>
> produces error while starting start-project.py:
>
> File
> "/usr/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/widgets/forms.py",
> line 140, in __init__
>     if name is not None and ('-' in name or '.' in name):
> TypeError: iterable argument required
>
>
> this does work:
>
>  text = widgets.TextArea(name=_("Beschreibung").eval(),
> validator=validators.NotEmpty())
>
>
> I checked the sourcecode and the problem seems to be that lazystring
> does not implement all requiered string attributes. (iterator, len etc.)
>
> I am thinking of fixing this and supplying a patch for it.
> I am new to TG development.
> I searched the trac but couldn't find information to this.
> What's the best procedure to do so?
> Should I send the patch to the mailing list?
> 
> --
> Greg


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to