from zeit.cms.i18n import MessageFactory as _
import zope.interface
import zope.schema


class IGlobalSettings(zope.interface.Interface):
    """Global CMS settings."""

    default_year = zope.schema.Int(
        title=_("Default year"),
        min=1900,
        max=2100)

    default_volume = zope.schema.Int(
        title=_("Default volume"),
        min=1,
        max=54)

    def get_working_directory(template):
        """Return the collection which is the main working directory.

        template:
            Template which will be filled with year and volume. In
            ``template`` the placeholders $year and $volume will be replaced.
            Example: 'online/$year/$volume/foo'

        If the respective collection does not exist, it will be created before
        returning it.

        """

[((10, 14, 10, 31), 'zeit.cms.i18n.MessageFactory', '_', ({(10, 16, 10, 30): '"""Default year"""'}, {}), "('Default year')", True, 'from zeit.cms.i18n import MessageFactory as _\n'), ((15, 14, 15, 33), 'zeit.cms.i18n.MessageFactory', '_', ({(15, 16, 15, 32): '"""Default volume"""'}, {}), "('Default volume')", True, 'from zeit.cms.i18n import MessageFactory as _\n')]