1
# Copyright 2009 Canonical Ltd. This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
4
from lazr.enum import (
8
from zope.interface import Interface
9
from zope.schema import (
18
from canonical.launchpad import _
19
from lp.registry.interfaces.person import IPerson
24
'ITranslationRelicensingAgreement',
25
'ITranslationRelicensingAgreementEdit',
26
'TranslationRelicensingAgreementOptions'
30
class ITranslationRelicensingAgreement(Interface):
31
"""An agreement to relicensing a person's translations."""
34
title=_("The ID for this relicensing answer"),
35
readonly=True, required=True)
38
title=_("The person who responded to the relicensing question"),
39
readonly=False, required=True, schema=IPerson)
41
allow_relicensing = Bool(
42
title=_("Whether the person agreed to the BSD license"),
43
readonly=False, default=True, required=True)
45
date_decided = Datetime(
46
title=_("The date person made her decision"),
47
readonly=True, required=True)
50
class TranslationRelicensingAgreementOptions(EnumeratedType):
51
BSD = Item("License all my translations in Launchpad "
52
"under the BSD license")
53
REMOVE = Item("Not make translations in Launchpad")
56
class ITranslationRelicensingAgreementEdit(ITranslationRelicensingAgreement):
57
"""Extend ITranslationRelicensingAgreement with `back_to` field."""
60
title=_("URL to go back to after question is shown"),
61
readonly=False, required=False)
63
allow_relicensing = Choice(
64
title=_("I would rather"),
65
vocabulary=TranslationRelicensingAgreementOptions,