Commit 0217081a authored by Kevin Deldycke's avatar Kevin Deldycke

Ask user to delete its Translation Service Zope product and tool to let the Localizer patch work.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5382 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 18dedb6f
......@@ -22,6 +22,17 @@ except ImportError:
from Products.ERP5Type.patches.string import Template
class LocalizerPatchError(Exception):
""""Error wen trying to use or apply the Localizer patch"""
# This patch will not work if Translation Service Zope product exist on the system
try:
from Products import TranslationService
raise LocalizerPatchError, "Translation Service Zope Product (%s) and Translation Service tools must be deleted to let Localizer Patch work." % (repr(TranslationService))
except ImportError:
pass
class LocalizerTranslationService:
def translate( self, domain, msgid
......@@ -57,7 +68,7 @@ class LocalizerTranslationService:
# = the one when translation is done via <i18n:translate> tag in Page Template
localizer = getToolByName(context, 'Localizer', None)
if localizer == None:
raise LocalizerPatch, "Localizer tool not found."
raise LocalizerPatchError, "Localizer tool not found."
# Get the Localizer catalog id
catalog_id = message_catalog_aliases.get(domain, domain)
......
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