~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-04-11 15:46:35 UTC
  • mfrom: (12510.8.41 js-usage)
  • Revision ID: launchpad@pqm.canonical.com-20110411154635-vru5up8c5adbz3tl
[r=deryck][bug=732639] Allow inline editing of translation settings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
    'SourcePackageTranslationSharingStatus',
12
12
    ]
13
13
 
 
14
 
 
15
from lazr.restful.interfaces import IJSONRequestCache
14
16
from zope.publisher.interfaces import NotFound
15
17
 
16
18
from canonical.launchpad.webapp import (
136
138
                'Translations are currently being linked by a background '
137
139
                'job. When that job has finished, translations will be '
138
140
                'shared with the upstream project.')
 
141
        cache = IJSONRequestCache(self.request)
 
142
        cache.objects.update({
 
143
            'productseries': self.context.productseries,
 
144
            'upstream_branch': self.upstream_branch,
 
145
            'product': self.product,
 
146
        })
139
147
 
140
148
    @property
141
149
    def branch_link(self):
239
247
        return self.context.direct_packaging.productseries.branch
240
248
 
241
249
    @property
 
250
    def product(self):
 
251
        if self.context.productseries is None:
 
252
            return None
 
253
        return self.context.productseries.product
 
254
 
 
255
    @property
242
256
    def has_upstream_branch(self):
243
257
        """Does the upstream series have a source code branch?"""
244
258
        return self.upstream_branch is not None