~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
# 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

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

from canonical.launchpad import _
from lp.translations.interfaces.potemplate import IPOTemplate
from lp.translations.interfaces.potmsgset import IPOTMsgSet


__metaclass__ = type
__all__ = [
    'ITranslationTemplateItem',
    ]


class ITranslationTemplateItem(Interface):
    """A translatable message in a translation template file."""

    id = Int(
        title=_("The ID for this translation message"),
        readonly=True, required=True)

    potemplate = Object(
        title=_("The template this translation is in"),
        readonly=False, required=False, schema=IPOTemplate)

    sequence = Int(
        title=_("The ordering of this set within its file"),
        readonly=False, required=True)

    potmsgset = Object(
        title=_("The template message that this translation is for"),
        readonly=False, required=True, schema=IPOTMsgSet)