~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/translations/browser/person.py

  • Committer: Steve Kowalik
  • Date: 2011-08-07 04:05:52 UTC
  • mto: This revision was merged to the branch mainline in revision 13626.
  • Revision ID: stevenk@ubuntu.com-20110807040552-mwnxo0flmhvl35e8
Correct the notification based on review comments, and remove request{,ed}
from the function names, switching to create{,d}.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    Interface,
28
28
    )
29
29
 
30
 
from lp import _
 
30
from canonical.launchpad import _
 
31
from canonical.launchpad.webapp import (
 
32
    canonical_url,
 
33
    Link,
 
34
    )
 
35
from canonical.launchpad.webapp.batching import BatchNavigator
 
36
from canonical.launchpad.webapp.interfaces import ILaunchBag
 
37
from canonical.launchpad.webapp.menu import NavigationMenu
 
38
from canonical.launchpad.webapp.publisher import LaunchpadView
31
39
from lp.app.browser.launchpadform import (
32
40
    action,
33
41
    custom_widget,
36
44
from lp.app.widgets.itemswidgets import LaunchpadRadioWidget
37
45
from lp.registry.interfaces.sourcepackage import ISourcePackage
38
46
from lp.services.propertycache import cachedproperty
39
 
from lp.services.webapp import (
40
 
    canonical_url,
41
 
    Link,
42
 
    )
43
 
from lp.services.webapp.batching import BatchNavigator
44
 
from lp.services.webapp.interfaces import ILaunchBag
45
 
from lp.services.webapp.menu import NavigationMenu
46
 
from lp.services.webapp.publisher import LaunchpadView
47
47
from lp.translations.browser.translationlinksaggregator import (
48
48
    TranslationLinksAggregator,
49
49
    )
265
265
    @property
266
266
    def person_is_translator(self):
267
267
        """Is this person active in translations?"""
268
 
        if self.context.is_team:
 
268
        if self.context.isTeam():
269
269
            return False
270
270
        person = ITranslationsPerson(self.context)
271
271
        history = person.getTranslationHistory(self.history_horizon).any()
283
283
    @property
284
284
    def requires_preferred_languages(self):
285
285
        """Does this person need to set preferred languages?"""
286
 
        return not self.context.is_team and len(self.context.languages) == 0
 
286
        return not self.context.isTeam() and len(self.context.languages) == 0
287
287
 
288
288
    def should_display_message(self, translationmessage):
289
289
        """Should a certain `TranslationMessage` be displayed.
450
450
 
451
451
        return overall
452
452
 
 
453
 
453
454
    to_complete_template = ViewPageTemplateFile(
454
455
        '../templates/person-translations-to-complete-table.pt')
455
456
 
456
457
    def translations_to_complete_table(self):
457
458
        return self.to_complete_template(dict(view=self))
458
459
 
 
460
 
459
461
    to_review_template = ViewPageTemplateFile(
460
462
        '../templates/person-translations-to-review-table.pt')
461
463
 
463
465
        return self.to_review_template(dict(view=self))
464
466
 
465
467
 
 
468
 
466
469
class PersonTranslationReviewView(PersonTranslationView):
467
470
    """View for translation-related Person pages."""
468
471