~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

Merged fix-retest-colorize into redo-read-only-transactions-in-buildmaster, resolving several import conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
from zope.publisher.browser import FileUpload
43
43
from zope.security.proxy import removeSecurityProxy
44
44
 
45
 
from canonical.launchpad import (
46
 
    _,
47
 
    helpers,
48
 
    )
49
 
from canonical.launchpad.webapp import (
50
 
    action,
51
 
    canonical_url,
52
 
    enabled_with_permission,
53
 
    GetitemNavigation,
54
 
    LaunchpadEditFormView,
55
 
    LaunchpadView,
56
 
    Link,
57
 
    Navigation,
58
 
    NavigationMenu,
59
 
    StandardLaunchpadFacets,
60
 
    )
61
 
from canonical.launchpad.webapp.authorization import check_permission
62
 
from canonical.launchpad.webapp.breadcrumb import Breadcrumb
63
 
from canonical.launchpad.webapp.interfaces import (
64
 
    ICanonicalUrlData,
65
 
    ILaunchBag,
66
 
    )
67
 
from canonical.launchpad.webapp.menu import structured
 
45
from lp import _
68
46
from lp.app.browser.launchpadform import ReturnToReferrerMixin
69
47
from lp.app.browser.tales import DateTimeFormatterAPI
70
48
from lp.app.enums import (
82
60
from lp.registry.model.product import Product
83
61
from lp.registry.model.productseries import ProductSeries
84
62
from lp.registry.model.sourcepackagename import SourcePackageName
 
63
from lp.services.helpers import is_tar_filename
 
64
from lp.services.webapp import (
 
65
    action,
 
66
    canonical_url,
 
67
    enabled_with_permission,
 
68
    GetitemNavigation,
 
69
    LaunchpadEditFormView,
 
70
    LaunchpadView,
 
71
    Link,
 
72
    Navigation,
 
73
    NavigationMenu,
 
74
    StandardLaunchpadFacets,
 
75
    )
 
76
from lp.services.webapp.authorization import check_permission
 
77
from lp.services.webapp.breadcrumb import Breadcrumb
 
78
from lp.services.webapp.interfaces import (
 
79
    ICanonicalUrlData,
 
80
    ILaunchBag,
 
81
    )
 
82
from lp.services.webapp.menu import structured
85
83
from lp.services.worlddata.interfaces.language import ILanguageSet
86
84
from lp.translations.browser.poexportrequest import BaseExportView
87
85
from lp.translations.browser.translations import TranslationsMixin
467
465
                    '<a href="%s/+imports">Translation Import Queue</a>',
468
466
                        canonical_url(self.context.translationtarget)))
469
467
 
470
 
        elif helpers.is_tar_filename(filename):
 
468
        elif is_tar_filename(filename):
471
469
            # Add the whole tarball to the import queue.
472
470
            (num, conflicts) = (
473
471
                translation_import_queue.addOrUpdateEntriesFromTarball(