""" Deprecated Image and Portfolio classes
"""
-from deprecated.Portfolio import Portfolio, Photo
+# TODO: se décider à le virer pour de bon !
+# from deprecated.Portfolio import Portfolio, Photo
from permissions import ViewRawImage
from zope.component.factory import Factory
from zope.interface import implements
-from webdav.WriteLockInterface import WriteLockInterface as z2IWriteLock
+#from webdav.WriteLockInterface import WriteLockInterface as z2IWriteLock
+from webdav.interfaces import IWriteLock
from Products.CMFCore.interfaces import IContentish
-from Products.CMFCore.interfaces.Contentish import Contentish as z2IContentish
+from Products.CMFCore.interfaces import IDynamicType
+#from Products.CMFCore.interfaces.Contentish import Contentish as z2IContentish
from Products.CMFCore.DynamicType import DynamicType
from Products.CMFCore.CMFCatalogAware import CMFCatalogAware
class Photo(DynamicType, CMFCatalogAware, BasePhoto, DefaultDublinCoreImpl) :
""" Photo CMF aware """
- implements(IPhoto, IContentish)
- __implements__ = (z2IContentish, z2IWriteLock, DynamicType.__implements__)
+ implements(IPhoto, IContentish, IWriteLock, IDynamicType)
+ #__implements__ = (z2IContentish, IWriteLock, DynamicType.__implements__)
meta_type = BasePhoto.meta_type
manage_options = BasePhoto.manage_options
"""
from AccessControl import ModuleSecurityInfo
-from Products.PageTemplates.GlobalTranslationService import getGlobalTranslationService
+#from Products.PageTemplates.GlobalTranslationService import getGlobalTranslationService
from zope.i18nmessageid import MessageFactory
security = ModuleSecurityInfo('Products.Portfolio.utils')
def translate(message, context):
""" Translate i18n message.
"""
- GTS = getGlobalTranslationService()
+ # TODO: touver une solution.
+ # GTS = getGlobalTranslationService()
if isinstance(message, Exception):
try:
message = message[0]
except (TypeError, IndexError):
pass
+ return message
return GTS.translate('portfolio', message, context=context)