<commit_before># vim:fileencoding=utf-8 encoding=utf-8
# Copyright (c) 2007 gocept gmbh & co. kg
# See also LICENSE.txt
# $Id$

import zope.schema

import zeit.cms.interfaces
import zeit.cms.syndication.interfaces
import zeit.cms.content.interfaces
import zeit.cms.content.sources

import zeit.content.image.interfaces

import zeit.content.article.source

ARTICLE_NS = 'http://namespaces.zeit.de/CMS/Article'


class ISyndicationLogType(zope.interface.interfaces.IInterface):
    """Type for syndication logs."""


class ISyndicationEventLog(zope.interface.Interface):

    syndicatedOn = zope.schema.Datetime(
        title=u"Syndication Time",
        readonly=True)

    syndicatedIn = zope.schema.FrozenSet(
        title=u"Syndicated in",
        readonly=True,
        default=frozenset(),
        value_type=zope.schema.Object(zeit.cms.syndication.interfaces.IFeed))


class IArticleMetadata(zeit.cms.content.interfaces.ICommonMetadata):
    """Metadata of an article."""

    commentsAllowed = zope.schema.Bool(
        title=u"Kommentare erlaubt",
        default=True)

    banner = zope.schema.Bool(
        title=u"Banner",
        default=True)

    boxMostRead = zope.schema.Bool(
        title=u"Box „Most Read“",
        default=True)

    navigation = zope.schema.Choice(
        title=u"Navigation",
        source=zeit.cms.content.sources.NavigationSource())

    # references / links to other content

    pageBreak = zope.schema.Int(
        title=u"Seitenumbruch",
        description=u"Absätze pro Seite.",
        min=1,
        default=6)

    dailyNewsletter = zope.schema.Bool(
        title=u"Tages-Newsletter",
        description=(u"Soll der Artikel in den Tages-Newsletter aufgenommen "
                     u"werden?"),
        default=False)

    automaticTeaserSyndication = zope.schema.FrozenSet(
        title=u"Automatische Teaser-Syndizierung",
        description=(u"Beim Checkin werden Teaser in den aktivierten Channels "
                     u"automatisch aktualisiert."),
        default=frozenset(),
        value_type=zope.schema.Choice(
            source=zeit.content.article.source.SyndicatedInSource()))

    images = zope.schema.Tuple(
        title=u'Bilder',
        required=False,
        default=(),
        value_type=zope.schema.Object(
            zeit.content.image.interfaces.IImage))

    textLength = zope.schema.Int(
        title=u'Anschläge',
        required=False)


class IArticle(IArticleMetadata, zeit.cms.content.interfaces.IXMLContent):
    """Article is the main content type in the Zeit CMS."""

    syndicatedIn = zope.schema.FrozenSet(
        title=u"Article is syndicated in these feeds.",
        default=frozenset(),
        value_type=zope.schema.Object(zeit.cms.syndication.interfaces.IFeed))


    syndicationLog = zope.schema.Tuple(
        title=u"Syndication Log",
        default=(),
        value_type=zope.schema.Object(ISyndicationEventLog))<commit_msg>a little i18n<commit_after># vim:fileencoding=utf-8 encoding=utf-8
# Copyright (c) 2007 gocept gmbh & co. kg
# See also LICENSE.txt
# $Id$

import zope.schema

import zeit.cms.interfaces
import zeit.cms.syndication.interfaces
import zeit.cms.content.interfaces
import zeit.cms.content.sources
from zeit.cms.i18n import MessageFactory as _

import zeit.content.image.interfaces

import zeit.content.article.source

ARTICLE_NS = 'http://namespaces.zeit.de/CMS/Article'


class ISyndicationLogType(zope.interface.interfaces.IInterface):
    """Type for syndication logs."""


class ISyndicationEventLog(zope.interface.Interface):

    syndicatedOn = zope.schema.Datetime(
        title=u"Syndication Time",
        readonly=True)

    syndicatedIn = zope.schema.FrozenSet(
        title=u"Syndicated in",
        readonly=True,
        default=frozenset(),
        value_type=zope.schema.Object(zeit.cms.syndication.interfaces.IFeed))


class IArticleMetadata(zeit.cms.content.interfaces.ICommonMetadata):
    """Metadata of an article."""

    commentsAllowed = zope.schema.Bool(
        title=u"Kommentare erlaubt",
        default=True)

    banner = zope.schema.Bool(
        title=u"Banner",
        default=True)

    boxMostRead = zope.schema.Bool(
        title=u"Box „Most Read“",
        default=True)

    navigation = zope.schema.Choice(
        title=u"Navigation",
        source=zeit.cms.content.sources.NavigationSource())

    # references / links to other content

    pageBreak = zope.schema.Int(
        title=u"Seitenumbruch",
        description=u"Absätze pro Seite.",
        min=1,
        default=6)

    dailyNewsletter = zope.schema.Bool(
        title=u"Tages-Newsletter",
        description=(u"Soll der Artikel in den Tages-Newsletter aufgenommen "
                     u"werden?"),
        default=False)

    automaticTeaserSyndication = zope.schema.FrozenSet(
        title=u"Automatische Teaser-Syndizierung",
        description=(u"Beim Checkin werden Teaser in den aktivierten Channels "
                     u"automatisch aktualisiert."),
        default=frozenset(),
        value_type=zope.schema.Choice(
            source=zeit.content.article.source.SyndicatedInSource()))

    images = zope.schema.Tuple(
        title=_('Images'),
        required=False,
        default=(),
        value_type=zope.schema.Object(
            zeit.content.image.interfaces.IImage))

    textLength = zope.schema.Int(
        title=u'Anschläge',
        required=False)


class IArticle(IArticleMetadata, zeit.cms.content.interfaces.IXMLContent):
    """Article is the main content type in the Zeit CMS."""

    syndicatedIn = zope.schema.FrozenSet(
        title=u"Article is syndicated in these feeds.",
        default=frozenset(),
        value_type=zope.schema.Object(zeit.cms.syndication.interfaces.IFeed))


    syndicationLog = zope.schema.Tuple(
        title=u"Syndication Log",
        default=(),
        value_type=zope.schema.Object(ISyndicationEventLog))
{'fraction_non_alphanumeric': 0.11054937647455342, 'fraction_numerical': 0.003370407819346141, 'mean_word_length': 2.9645958583834333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '960922', 'n_tokens_mistral': 1942, 'n_tokens_neox': 1860, 'n_words': 320}