Added I18nManagerMixin as base class for shared tools
authorThierry Florac <thierry.florac@onf.fr>
Mon, 20 Jun 2016 12:25:42 +0200
changeset 43 2136e95fb9a5
parent 42 bcb01961928e
child 44 6931ae3912c9
Added I18nManagerMixin as base class for shared tools
src/pyams_content/shared/common/manager.py
--- a/src/pyams_content/shared/common/manager.py	Mon Jun 20 12:25:03 2016 +0200
+++ b/src/pyams_content/shared/common/manager.py	Mon Jun 20 12:25:42 2016 +0200
@@ -17,12 +17,12 @@
 
 # import interfaces
 from pyams_content.shared.common.interfaces import ISharedToolContainer, ISharedTool, ISharedToolRoles
-from pyams_i18n.interfaces import II18nManager
 from pyams_security.interfaces import IDefaultProtectionPolicy
 from pyams_workflow.interfaces import IWorkflow
 from zope.annotation.interfaces import IAttributeAnnotatable
 
 # import packages
+from pyams_i18n.content import I18nManagerMixin
 from pyams_security.property import RolePrincipalsFieldProperty
 from pyams_security.security import ProtectedObject
 from pyams_utils.adapter import adapter_config
@@ -40,8 +40,8 @@
     short_name = FieldProperty(ISharedToolContainer['short_name'])
 
 
-@implementer(IDefaultProtectionPolicy, ISharedTool, ISharedToolRoles, IAttributeAnnotatable, II18nManager)
-class SharedTool(ProtectedObject, Folder):
+@implementer(IDefaultProtectionPolicy, ISharedTool, ISharedToolRoles, IAttributeAnnotatable)
+class SharedTool(ProtectedObject, Folder, I18nManagerMixin):
     """Shared tool"""
 
     __roles__ = ('pyams.Webmaster', 'pyams.Pilot', 'pyams.Manager', 'pyams.Contributor')
@@ -60,8 +60,6 @@
     shared_content_factory = None
     shared_content_workflow = FieldProperty(ISharedTool['shared_content_workflow'])
 
-    languages = FieldProperty(II18nManager['languages'])
-
 
 @adapter_config(context=ISharedTool, provides=IWorkflow)
 def SharedToolWorkflowAdapter(context):