[Grok-dev] i18n translation weirdness

Noe Nieto nnieto at noenieto.com
Fri Apr 27 17:23:24 UTC 2012


We have a couple of grok.Forms where we change the title of some widgets in
the setUpWidgets() callback:

    def setUpWidgets(self, ignore_request=False):
        super(AddProjectForm, self).setUpWidgets(ignore_request)
        self.widgets['city'].label = '1'
        self.widgets['specialty'].label = '2'
        self.widgets['contractor'].label = '2'

        self.widgets['city'].title = _(u'City?')
        self.widgets['specialty'].title = _(u'What you need to do?')
        self.widgets['contractor'].title = _(u'Who you want for you job?')

The problem with this is that, while our translatable strings are
recognized as translations and we have proper translation strings in our
.po files, these strings are never translated.

So, what's the catch?

-- 
---
Noe Nieto
NNieto Consulting Services
M: nnieto at noenieto.com
W: http://noenieto.com
T:  @tzicatl <https://twitter.com/#%21/tzicatl>
Li: Perfil en LinkedIn <http://www.linkedin.com/profile/view?id=84300665>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.zope.org/pipermail/grok-dev/attachments/20120427/be790891/attachment.html>


More information about the Grok-dev mailing list