Ejemplo n.º 1
0
 def unregister_translation_domain_fallback():
   from zope.component.globalregistry import base
   base.unregisterUtility(DummyTranslationDomainFallback)
   sm = zope.component.getSiteManager()
   portal = Acquisition.aq_parent(sm)
   ui_domain = getattr(portal, '_save_ui_domain', [None]).pop()
   if ui_domain is not None:
     sm.registerUtility(ui_domain, ITranslationDomain, 'ui')
     del portal._save_ui_domain
Ejemplo n.º 2
0
 def unregister_translation_domain_fallback():
     from zope.component.globalregistry import base
     base.unregisterUtility(DummyTranslationDomainFallback)
     sm = zope.component.getSiteManager()
     portal = Acquisition.aq_parent(sm)
     ui_domain = getattr(portal, '_save_ui_domain', [None]).pop()
     if ui_domain is not None:
         # aq_base() to remove acquisition wrapping
         ui_domain = Acquisition.aq_base(ui_domain)
         sm.registerUtility(ui_domain, ITranslationDomain, 'ui')
         del portal._save_ui_domain