Commit 1b1a0c84 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Do not cache the result of getGlobalTranslationService, otherwise a dummy one...

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
parent 20a1e607
No related merge requests found
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment