The issue is related to the fact that you are using ugettex in FindForm.
When declaring forms you must always use l_ (lazy_ugettext) otherwise the
label gets translated at module import time instead of being translated
when the form gets rendered.

The same applies to tg.url, which should never be used when declaring form
actions, but tg.lurl must be used instead.


On Thu, Feb 7, 2013 at 4:49 PM, Luca Verardi <[email protected]> wrote:

> Hi everybody:
>
> I'm working with "tgext.pluggable" to create an application with many
> plugins
>
> I read the docs at "http://pypi.python.org/pypi/tgext.pluggable/0.1.2";
> about installation ad usage but when i restart my application
> i get this error:
>
> File
> "/home/luca/myapp/trunk/myapp/myapp/controllers/autenticazione/menu.py",
> line 23, in FindForm
>   codice = TextField( id='codice', label=_('Codice'), validator =
> LengthValidator(max=10))
> File
> "/home/luca/myapp/trunk/eggs/Pylons-1.0.1-py2.7.egg/pylons/i18n/translation.py",
> line 107, in ugettext
>   return pylons.translator.ugettext(value)
> File
> "/home/luca/myapp/trunk/eggs/Paste-1.7.5.1-py2.7.egg/paste/registry.py",
> line 137, in __getattr__
>   return getattr(self._current_obj(), attr)
> File
> "/home/luca/myapp/trunk/eggs/Paste-1.7.5.1-py2.7.egg/paste/registry.py",
> line 197, in _current_obj
>   'thread' % self.____name__)
> TypeError: No object (name: translator) has been registered for this thread
>
> commenting "plug" in my app_cfg.py fixes this, so I thought that "plug"
> looks for translations, so I launched "extract_messages"
> from setup.py and init_catalog but it didn't work.
>
> What could it be?
>
> I'm running Tg 2.2.2
>
>  --
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to