From 1b1a0c84b32f34897a9d57c079743f561c85c8e7 Mon Sep 17 00:00:00 2001 From: Yoshinori Okuji <yo@nexedi.com> Date: Mon, 18 Oct 2010 08:35:20 +0000 Subject: [PATCH] Do not cache the result of getGlobalTranslationService, otherwise a dummy one may be stored forever at the initialization phase. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39273 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/Message.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/product/ERP5Type/Message.py b/product/ERP5Type/Message.py index 1f6fdb4b61..93819859eb 100644 --- a/product/ERP5Type/Message.py +++ b/product/ERP5Type/Message.py @@ -84,8 +84,6 @@ except ImportError: getGlobalTranslationService = GlobalTranslationService -translation_service_translate = getGlobalTranslationService().translate - from Products.ERP5Type import Globals from cPickle import dumps, loads @@ -147,7 +145,8 @@ class Message(Persistent): else: from Products.ERP5.ERP5Site import getSite request = Globals.get_request() - translated_message = translation_service_translate( + translation_service = getGlobalTranslationService() + translated_message = translation_service.translate( self.domain, message, mapping=self.mapping, -- 2.30.9