~launchpad-pqm/launchpad/devel

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Copyright 2009 Canonical Ltd.  This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).

# pylint: disable-msg=E0211,E0213

"""Interfaces for efficient POT file exports."""

__metaclass__ = type

__all__ = ['IVPOTExport']

from zope.interface import Interface
from zope.schema import (
    Int,
    Object,
    Text,
    )

from lp.translations.interfaces.potemplate import IPOTemplate
from lp.translations.interfaces.potmsgset import IPOTMsgSet


class IVPOTExport(Interface):
    """Database view for efficient POT exports."""

    potemplate = Object(
        title=u"See IPOTemplate",
        required=True, readonly=True, schema=IPOTemplate)

    template_header = Text(
        title=u"See IPOTemplate.header",
        required=True, readonly=True)

    potmsgset = Object(
        title=u"See `IPOTMsgSet`.",
        required=True, readonly=True, schema=IPOTMsgSet)

    sequence = Int(
        title=u"See `IPOTMsgSet`.sequence",
        required=False, readonly=True)

    comment = Text(
        title=u"See `IPOTMsgSet`.commenttext",
        required=False, readonly=True)

    source_comment = Text(
        title=u"See `IPOTMsgSet`.sourcecomment",
        required=False, readonly=True)

    file_references = Text(
        title=u"See `IPOTMsgSet.filereferences`",
        required=False, readonly=True)

    flags_comment = Text(
        title=u"See `IPOTMsgSet`.flagscomment",
        required=False, readonly=True)

    context = Text(
        title=u"See `IPOTMsgSet`.context",
        required=False, readonly=True)

    msgid_singular = Text(
        title=u"See `IPOMsgID`.pomsgid",
        required=True, readonly=True)

    msgid_plural = Text(
        title=u"See `IPOMsgID`.pomsgid",
        required=False, readonly=True)