~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/browser/archive.py

[r=allenap][bug=826752] Fix grammar in notification message when
        syncing a single package on DistroSeries:+localpackagediffs and
        its siblings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
from lp.registry.interfaces.pocket import PackagePublishingPocket
108
108
from lp.registry.interfaces.series import SeriesStatus
109
109
from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
110
 
from lp.services.browser_helpers import get_user_agent_distroseries
 
110
from lp.services.browser_helpers import (
 
111
    get_plural_text,
 
112
    get_user_agent_distroseries,
 
113
    )
111
114
from lp.services.database.bulk import load
112
115
from lp.services.features import getFeatureFlag
113
116
from lp.services.propertycache import cachedproperty
1287
1290
            copy_policy=PackageCopyPolicy.INSECURE,
1288
1291
            requester=person)
1289
1292
 
1290
 
    return structured("""
1291
 
        <p>Requested sync of %s packages.</p>
1292
 
        <p>Please allow some time for these to be processed.</p>
1293
 
        """, len(source_pubs))
 
1293
    return copy_asynchronously_message(len(source_pubs))
 
1294
 
 
1295
 
 
1296
def copy_asynchronously_message(source_pubs_count):
 
1297
    """Return a message detailing the sync action.
 
1298
 
 
1299
    :param source_pubs_count: The number of source pubs requested for syncing.
 
1300
    """
 
1301
    package_or_packages = get_plural_text(
 
1302
        source_pubs_count, "package", "packages")
 
1303
    return structured(
 
1304
        "<p>Requested sync of %s %s.</p>"
 
1305
        "<p>Please allow some time for these to be processed.</p>",
 
1306
        source_pubs_count, package_or_packages)
1294
1307
 
1295
1308
 
1296
1309
def render_cannotcopy_as_html(cannotcopy_exception):