Commit 21cd461a authored by Jérome Perrin's avatar Jérome Perrin

Products.Localizer.GlobalTranslationService was not available in Localizer-1.0.1


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5329 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6831bae2
...@@ -55,9 +55,14 @@ class LocalizerTranslationService: ...@@ -55,9 +55,14 @@ class LocalizerTranslationService:
# Use the patched translate() method # Use the patched translate() method
from Products.Localizer import GlobalTranslationService, Localizer try :
from Products.Localizer import GlobalTranslationService
GlobalTranslationService.translate = LocalizerTranslationService.translate
except ImportError: # for Localizer-1.0.1
from Products.PageTemplates.GlobalTranslationService import setGlobalTranslationService
setGlobalTranslationService(LocalizerTranslationService())
GlobalTranslationService.translate = LocalizerTranslationService.translate from Products.Localizer import Localizer
Localizer.Localizer.translate = LocalizerTranslationService.translate Localizer.Localizer.translate = LocalizerTranslationService.translate
Localizer.Localizer.tranlate__roles__ = None # public Localizer.Localizer.tranlate__roles__ = None # public
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