Commit 1b97cb2c authored by Kevin Deldycke's avatar Kevin Deldycke

Add Translation Service tool if the product is available.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5330 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 21cd461a
...@@ -804,14 +804,21 @@ class ERP5Generator(PortalGenerator): ...@@ -804,14 +804,21 @@ class ERP5Generator(PortalGenerator):
addMessageCatalog('erp5_ui', 'ERP5 Localized Interface', ('en',)) addMessageCatalog('erp5_ui', 'ERP5 Localized Interface', ('en',))
addMessageCatalog('erp5_content', 'ERP5 Localized Content', ('en',)) addMessageCatalog('erp5_content', 'ERP5 Localized Content', ('en',))
# Add Translation Service # Add Translation Service if the products if available
if p.hasObject('translation_service') and p.translation_service.meta_type != 'Translation Service': translation_service_available = None
p._delObject('translation_service') try:
if not p.hasObject('translation_service'): from Products.TranslationService import PlacefulTranslationService
p.manage_addProduct['TranslationService'].addPlacefulTranslationService('translation_service') translation_service_available = True
p.translation_service.manage_setDomainInfo(domain_0=None, path_0='Localizer/default') except ImportError:
p.translation_service.manage_addDomainInfo(domain='ui', path='Localizer/erp5_ui') translation_service_available = False
p.translation_service.manage_addDomainInfo(domain='content', path='Localizer/erp5_content') if translation_service_available:
if p.hasObject('translation_service') and p.translation_service.meta_type != 'Translation Service':
p._delObject('translation_service')
if not p.hasObject('translation_service'):
p.manage_addProduct['TranslationService'].addPlacefulTranslationService('translation_service')
p.translation_service.manage_setDomainInfo(domain_0=None, path_0='Localizer/default')
p.translation_service.manage_addDomainInfo(domain='ui', path='Localizer/erp5_ui')
p.translation_service.manage_addDomainInfo(domain='content', path='Localizer/erp5_content')
def setupMembersFolder(self, p): def setupMembersFolder(self, p):
......
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