<configure xmlns="http://namespaces.zope.org/zope"
           xmlns:browser="http://namespaces.zope.org/browser"
           xmlns:zcml="http://namespaces.zope.org/zcml"
           xmlns:five="http://namespaces.zope.org/five"    
           i18n_domain="slc.publications">

    <subscriber 
        for="slc.publications.interfaces.IPublicationEnhanced
             zope.lifecycleevent.interfaces.IObjectModifiedEvent"
        handler=".events.ChapterUpdater"
    />
    
    <subscriber 
        for="slc.publications.interfaces.IPublicationEnhanced
             zope.lifecycleevent.interfaces.IObjectModifiedEvent"
        handler=".events.generate_image"
    />

    <subscriber 
        for="slc.publications.interfaces.IPublicationEnhanced
             zope.app.container.interfaces.IObjectRemovedEvent"
        handler=".events.remove_additionals"
    />
                   
    <subscriber for="zope.app.container.interfaces.IObjectAddedEvent"
        handler=".events.object_added"
    />

    <configure zcml:condition="installed Products.LinguaPlone">
       <subscriber 
            for="slc.publications.interfaces.IPublicationEnhanced
                  ..linguaplone_addTranslation_patch.IObjectTranslationReferenceSetEvent"
            handler=".events.subtype_on_translate"
       />
    </configure>

    <adapter factory=".publication.PrettyFormatter"
             for="slc.publications.interfaces.IPublicationEnhanced"
             provides="slc.publications.interfaces.IPrettyFormatter" 
    />

    <configure zcml:condition="installed slc.xliff">
        <adapter factory=".xliff.PublicationAttributeExtractor" 
                for="slc.publications.interfaces.IPublicationEnhanced"
                provides="slc.xliff.interfaces.IAttributeExtractor" 
        />

        <adapter factory=".xliff.PublicationContainerAttributeExtractor"
                for="slc.publications.interfaces.IPublicationContainerEnhanced"
                provides="slc.xliff.interfaces.IAttributeExtractor" 
        />
    </configure>

</configure>
