plonegovbr / brasil.gov.agenda

Pacote de Agenda para Membros do Governo Brasileiro
https://plone.org.br/gov/
3 stars 2 forks source link

Erro no tile de Agenda ao trocar idioma #149

Closed hvelarde closed 6 years ago

hvelarde commented 6 years ago

O seguinte erro acontece no tile de Agenda oo utilizar um idioma diferente do Português Brasileiro:

2018-10-16 14:12:13 ERROR plone.subrequest Error handling subrequest to http://localhost:8080/2.0b4/capa/@@agenda/fbd5b03a-92d1-4be7-a9a8-185279b4e952
Traceback (most recent call last):
  File "/opt/plone/buildout/eggs/plone.subrequest-1.8.5-py2.7.egg/plone/subrequest/__init__.py", line 156, in subrequest
    bind=1
  File "/opt/plone/buildout/eggs/Zope2-2.13.28-py2.7.egg/ZPublisher/mapply.py", line 78, in mapply
    else: return object(*args)
  File "/opt/plone/buildout/eggs/plone.tiles-2.1-py2.7.egg/plone/tiles/esi.py", line 87, in __call__
    return self.index(*args, **kwargs)
  File "/opt/plone/buildout/eggs/Zope2-2.13.28-py2.7.egg/Products/Five/browser/pagetemplatefile.py", line 125, in __call__
    return self.im_func(im_self, *args, **kw)
  File "/opt/plone/buildout/eggs/Zope2-2.13.28-py2.7.egg/Products/Five/browser/pagetemplatefile.py", line 59, in __call__
    sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
  File "/opt/plone/buildout/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 132, in pt_render
    strictinsert=0, sourceAnnotations=sourceAnnotations
  File "/opt/plone/buildout/eggs/five.pt-2.2.5-py2.7.egg/five/pt/engine.py", line 98, in __call__
    return self.template.render(**kwargs)
  File "/opt/plone/buildout/eggs/z3c.pt-3.0-py2.7.egg/z3c/pt/pagetemplate.py", line 163, in render
    return base_renderer(**context)
  File "/opt/plone/buildout/eggs/Chameleon-2.25-py2.7.egg/chameleon/zpt/template.py", line 261, in render
    return super(PageTemplate, self).render(**vars)
  File "/opt/plone/buildout/eggs/Chameleon-2.25-py2.7.egg/chameleon/template.py", line 191, in render
    raise_with_traceback(exc, tb)
  File "/opt/plone/buildout/eggs/Chameleon-2.25-py2.7.egg/chameleon/template.py", line 171, in render
    self._render(stream, econtext, rcontext)
  File "/home/hvelarde/forcontent/idg/var/chameleon-cache/0ccc7c0493bef65ce89d7377ff8d0ba9.py", line 598, in render
    __value = _static_140067043486800(getitem('view'), econtext, True, ('month', ))
  File "/opt/plone/buildout/eggs/five.pt-2.2.5-py2.7.egg/five/pt/expressions.py", line 161, in __call__
    return base()
  File "/opt/plone/buildout/eggs/brasil.gov.agenda-2.0a7-py2.7.egg/brasil/gov/agenda/browser/mixin.py", line 30, in month
    strmonth = self._translate(tool.month_msgid(self.date.strftime('%m')))
  File "/opt/plone/buildout/eggs/brasil.gov.agenda-2.0a7-py2.7.egg/brasil/gov/agenda/browser/mixin.py", line 21, in _translate
    else self.current_language)
AttributeError: 'AgendaTile' object has no attribute 'current_language'

 - Expression: "view/month"
 - Filename:   ... agenda-2.0a7-py2.7.egg/brasil/gov/agenda/tiles/agenda.pt
 - Location:   (line 57: col 39)
 - Source:     tal:define="month view/month"
                                 ^^^^^^^^^^
 - Arguments:  default: <object - at 0x7f63f648bc20>
               repeat: {...} (0)
               template: <ViewPageTemplateFile - at 0x7f63e0447b10>
               views: <ViewMapper - at 0x7f63dbb63450>
               modules: <instance - at 0x7f63eb6824d0>
               args: <tuple - at 0x7f63f64b5050>
               here: <ImplicitAcquisitionWrapper capa at 0x7f63e2acc550>
               is_empty: <instancemethod is_empty at 0x7f63e44dc5a0>
               user: <ImplicitAcquisitionWrapper - at 0x7f63e2acc5f0>
               nothing: <NoneType - at 0x7af050>
               tile_id: fbd5b03a-92d1-4be7-a9a8-185279b4e952
               container: <ImplicitAcquisitionWrapper capa at 0x7f63e2acc550>
               request: <instance - at 0x7f63dba4dcb0>
               wrapped_repeat: <SafeMapping - at 0x7f63e0430db8>
               traverse_subpath: <list - at 0x7f63dba51ef0>
               field: {...} (3)
               loop: {...} (1)
               context: <ImplicitAcquisitionWrapper capa at 0x7f63e2acc550>
               view: <AgendaTile agenda at 0x7f63dbb639d0>
               translate: <function translate at 0x7f63e0438050>
               root: <ImplicitAcquisitionWrapper Zope at 0x7f63e2a05f50>
               options: {...} (0)
               target_language: es