Commit ba113173 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Always apply Localizer_translate.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5453 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 86b58baa
...@@ -77,11 +77,11 @@ def GlobalTranslationService_translate(self, domain, msgid, *args, **kw): ...@@ -77,11 +77,11 @@ def GlobalTranslationService_translate(self, domain, msgid, *args, **kw):
return context.Localizer.translate(domain, msgid, *args, **kw) return context.Localizer.translate(domain, msgid, *args, **kw)
# Apply the monkey patch. # Apply the monkey patch.
from Products.Localizer.Localizer import Localizer
Localizer.translate = Localizer_translate
Localizer.translate__roles__ = None # public
try: try:
from Products.Localizer import GlobalTranslationService from Products.Localizer import GlobalTranslationService
from Products.Localizer.Localizer import Localizer
GlobalTranslationService.translate = GlobalTranslationService_translate GlobalTranslationService.translate = GlobalTranslationService_translate
Localizer.translate = Localizer_translate
Localizer.translate__roles__ = None # public
except ImportError: except ImportError:
pass pass
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