1
1
# Copyright 2009-2010 Canonical Ltd. This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
4
# pylint: disable-msg=E0211,E0213
4
from zope.interface import Attribute
6
6
from lazr.enum import (
11
from canonical.launchpad.webapp.interfaces import ILaunchpadApplication
12
13
__metaclass__ = type
16
'IRosettaApplication',
15
17
'TranslationConstants',
16
18
'TranslationsBranchImportMode',
22
class IRosettaApplication(ILaunchpadApplication):
23
"""Application root for rosetta."""
25
languages = Attribute(
26
'Languages Launchpad can translate into.')
27
language_count = Attribute(
28
'Number of languages Launchpad can translate into.')
29
statsdate = Attribute('The date stats were last updated.')
30
translation_groups = Attribute('ITranslationGroupSet object.')
32
def translatable_products():
33
"""Return a list of the translatable products."""
35
def featured_products():
36
"""Return a sample of all the translatable products."""
38
def translatable_distroseriess():
39
"""Return a list of the distroseriess in launchpad for which
40
translations can be done.
43
def potemplate_count():
44
"""Return the number of potemplates in the system."""
47
"""Return the number of pofiles in the system."""
50
"""Return the number of msgs in the system."""
52
def translator_count():
53
"""Return the number of people who have given translations."""
21
56
class TranslationConstants:
22
57
"""Set of constants used inside the context of translations."""