← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~ursinha/launchpad/bug-1201485 into lp:launchpad

 

Ursula Junque has proposed merging lp:~ursinha/launchpad/bug-1201485 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1201485 in Launchpad itself: "Need to import translations for the unity daily builds"
  https://bugs.launchpad.net/launchpad/+bug/1201485

For more details, see:
https://code.launchpad.net/~ursinha/launchpad/bug-1201485/+merge/186305

This branch fixes the problem of outdated translations in packages copied from PPAs to the main archive.

It creates a CustomUpload for Rosetta Translations, and adds PackageUploadCustomFormat.ROSETTA_TRANSLATIONS to the list of custom copyable files, so the translations from copied packages will be copied, uploaded and processed as well.

Tests:
 ./bin/test -vvt lp.soyuz.tests.test_distroseriesqueue_rosetta_translations.*
 ./bin/test -vvt lp.archivepublisher.tests.test_rosetta_translations.*
 ./bin/test -vvt lp.soyuz.scripts.tests.test_custom_uploads.copier.*
 ./bin/test -vvt lp.soyuz.tests.test_packagecopyjob.*

This also adds test data to lib/lp/archiveuploader/tests/data/rosetta-translations, to run end-to-end tests.
-- 
https://code.launchpad.net/~ursinha/launchpad/bug-1201485/+merge/186305
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~ursinha/launchpad/bug-1201485 into lp:launchpad.
=== added file 'lib/lp/archivepublisher/rosetta_translations.py'
--- lib/lp/archivepublisher/rosetta_translations.py	1970-01-01 00:00:00 +0000
+++ lib/lp/archivepublisher/rosetta_translations.py	2013-09-18 12:31:15 +0000
@@ -0,0 +1,100 @@
+# Copyright 2009-2013 Canonical Ltd.  This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+"""The processing of Rosetta translations tarballs.
+
+ROSETTA-TRANSLATIONS is a custom format upload supported by Launchpad
+infrastructure to enable developers to publish translations.
+"""
+
+__metaclass__ = type
+
+__all__ = [
+    'RosettaTranslationsUpload',
+    'process_rosetta_translations',
+    ]
+
+from zope.component import getUtility
+
+from lp.archivepublisher.customupload import CustomUpload
+from lp.archivepublisher.debversion import Version
+from lp.registry.interfaces.pocket import PackagePublishingPocket
+from lp.soyuz.interfaces.archive import MAIN_ARCHIVE_PURPOSES
+from lp.soyuz.interfaces.packagetranslationsuploadjob import (
+    IPackageTranslationsUploadJobSource,
+    )
+
+
+def debug(logger, msg):
+    if logger is not None:
+        logger.debug(msg)
+
+
+class RosettaTranslationsUpload(CustomUpload):
+    """Rosetta Translations tarball upload.
+
+    All other CustomUploads extract and copy files when processed,
+    RosettaTranslationsUpload is a special case that involves more than
+    copying the files, so it triggers a job that processes them accordingly.
+    For this reason, all methods from CustomUpload that deal with files are
+    bypassed.
+    """
+    custom_type = "rosetta-translations"
+
+    def process(self, packageupload, libraryfilealias):
+        sourcepackagerelease = packageupload.sourcepackagerelease
+
+        # Ignore translations not with main distribution purposes.
+        if packageupload.archive.purpose not in MAIN_ARCHIVE_PURPOSES:
+            debug(self.logger,
+                  "Skipping translations since its purpose is not "
+                  "in MAIN_ARCHIVE_PURPOSES.")
+            return
+
+        # If the distroseries is 11.10 (oneiric) or later, the valid names
+        # check is not required.  (See bug 788685.)
+        distroseries = sourcepackagerelease.upload_distroseries
+        do_names_check = Version(distroseries.version) < Version('11.10')
+
+        valid_pockets = (
+            PackagePublishingPocket.RELEASE, PackagePublishingPocket.SECURITY,
+            PackagePublishingPocket.UPDATES, PackagePublishingPocket.PROPOSED)
+        valid_components = ('main', 'restricted')
+        if (packageupload.pocket not in valid_pockets or
+            (do_names_check and
+            sourcepackagerelease.component.name not in valid_components)):
+            # XXX: CarlosPerelloMarin 2006-02-16 bug=31665:
+            # This should be implemented using a more general rule to accept
+            # different policies depending on the distribution.
+            # Ubuntu's MOTU told us that they are not able to handle
+            # translations like we do in main. We are going to import only
+            # packages in main.
+            return
+
+        blamee = packageupload.findPersonToNotify()
+        getUtility(IPackageTranslationsUploadJobSource).create(
+                            sourcepackagerelease, libraryfilealias,
+                            blamee)
+
+    @staticmethod
+    def parsePath(tarfile_path):
+        pass
+
+    def setComponents(self, tarfile_path):
+        pass
+
+    def setTargetDirectory(self, pubconf, tarfile_path, distroseries):
+        pass
+
+    @classmethod
+    def getSeriesKey(cls, tarfile_path):
+        pass
+
+    def shouldInstall(self, filename):
+        pass
+
+
+def process_rosetta_translations(packageupload, libraryfilealias, logger=None):
+    """Process a Rosetta translation upload."""
+    upload = RosettaTranslationsUpload(logger)
+    upload.process(packageupload, libraryfilealias)

=== added file 'lib/lp/archivepublisher/tests/test_rosetta_translations.py'
--- lib/lp/archivepublisher/tests/test_rosetta_translations.py	1970-01-01 00:00:00 +0000
+++ lib/lp/archivepublisher/tests/test_rosetta_translations.py	2013-09-18 12:31:15 +0000
@@ -0,0 +1,60 @@
+# Copyright 2013 Canonical Ltd.  This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+"""Test rosetta-translations custom uploads.
+
+See also lp.soyuz.tests.test_distroseriesqueue_rosetta_translations for
+high-level tests of rosetta-translations upload and queue manipulation.
+"""
+
+import transaction
+
+from lp.archivepublisher.rosetta_translations import (
+    process_rosetta_translations,
+    )
+from lp.services.tarfile_helpers import LaunchpadWriteTarFile
+from lp.soyuz.model.packagetranslationsuploadjob import (
+    PackageTranslationsUploadJob,
+    )
+from lp.testing import TestCaseWithFactory
+from lp.testing.layers import LaunchpadZopelessLayer
+
+
+class TestRosettaTranslations(TestCaseWithFactory):
+
+    layer = LaunchpadZopelessLayer
+
+    def makeTranslationsLFA(self, tar_content=None):
+        """Create an LibraryFileAlias containing dummy translation data."""
+        if tar_content is None:
+            tar_content = {
+                'source/po/foo.pot': 'Foo template',
+                'source/po/eo.po': 'Foo translation',
+                }
+        tarfile_content = LaunchpadWriteTarFile.files_to_string(
+            tar_content)
+        return self.factory.makeLibraryFileAlias(content=tarfile_content)
+
+    def makeJobElements(self):
+        sourcepackagename = self.factory.makeSourcePackageName(name="foo")
+        packageupload = self.factory.makeSourcePackageUpload(
+            sourcepackagename=sourcepackagename)
+        libraryfilealias = self.makeTranslationsLFA()
+        return packageupload, libraryfilealias
+
+    def test_basic(self):
+        packageupload, libraryfilealias = self.makeJobElements()
+        transaction.commit()
+        process_rosetta_translations(packageupload, libraryfilealias)
+
+    def test_correct_job_is_created(self):
+        packageupload, libraryfilealias = self.makeJobElements()
+        transaction.commit()
+        process_rosetta_translations(packageupload, libraryfilealias)
+
+        jobs = list(PackageTranslationsUploadJob.iterReady())
+        self.assertEqual(1, len(jobs))
+
+        self.assertEqual(packageupload.sourcepackagerelease,
+                jobs[0].sourcepackagerelease)
+        self.assertEqual(libraryfilealias, jobs[0].libraryfilealias)

=== modified file 'lib/lp/archiveuploader/nascentuploadfile.py'
--- lib/lp/archiveuploader/nascentuploadfile.py	2013-06-26 06:02:00 +0000
+++ lib/lp/archiveuploader/nascentuploadfile.py	2013-09-18 12:31:15 +0000
@@ -32,6 +32,7 @@
 from lp.archivepublisher.ddtp_tarball import DdtpTarballUpload
 from lp.archivepublisher.debian_installer import DebianInstallerUpload
 from lp.archivepublisher.dist_upgrader import DistUpgraderUpload
+from lp.archivepublisher.rosetta_translations import RosettaTranslationsUpload
 from lp.archivepublisher.uefi import UefiUpload
 from lp.archiveuploader.utils import (
     determine_source_file_type,
@@ -263,6 +264,8 @@
         PackageUploadCustomFormat.DEBIAN_INSTALLER: DebianInstallerUpload,
         PackageUploadCustomFormat.DIST_UPGRADER: DistUpgraderUpload,
         PackageUploadCustomFormat.DDTP_TARBALL: DdtpTarballUpload,
+        PackageUploadCustomFormat.ROSETTA_TRANSLATIONS:
+            RosettaTranslationsUpload,
         PackageUploadCustomFormat.UEFI: UefiUpload,
         }
 

=== added directory 'lib/lp/archiveuploader/tests/data/rosetta-translations'
=== added file 'lib/lp/archiveuploader/tests/data/rosetta-translations/pmount_0.9.20-2ubuntu0.2_i386.changes'
--- lib/lp/archiveuploader/tests/data/rosetta-translations/pmount_0.9.20-2ubuntu0.2_i386.changes	1970-01-01 00:00:00 +0000
+++ lib/lp/archiveuploader/tests/data/rosetta-translations/pmount_0.9.20-2ubuntu0.2_i386.changes	2013-09-18 12:31:15 +0000
@@ -0,0 +1,26 @@
+Format: 1.8
+Date: Fri, 13 Sep 2013 18:06:21 +0000
+Source: pmount
+Binary: pmount
+Architecture: i386 i386_translations
+Version: 0.9.20-2ubuntu0.2
+Distribution: breezy-autotest
+Urgency: low
+Maintainer: Ubuntu Build Daemon <buildd@lpdev>
+Changed-By: Foo Bar <foo.bar@xxxxxxxxxxxxx>
+Description: 
+ pmount     - mount removable devices as normal user
+Changes: 
+ pmount (0.9.20-2ubuntu0.2) breezy-autotest; urgency=low
+ .
+   * Boooo
+Checksums-Sha1: 
+ 17e907a47a080ecd17e05b1cdda84577356922ec 112354 pmount_0.9.20-2ubuntu0.2_i386.deb
+ e86c8bce3ebf21354ac06207eeb08a513143a89d 35535 pmount_0.9.20-2ubuntu0.2_i386_translations.tar.gz
+Checksums-Sha256: 
+ 97ffd0d39d38d7e644214b44f8cda80a1e1f7706655c81980361960d0f3846e4 112354 pmount_0.9.20-2ubuntu0.2_i386.deb
+ efce09a62dc4be2d053cbb7acaa5b2d481fd88c0e512c53b7ebc6d1d49210d7d 35535 pmount_0.9.20-2ubuntu0.2_i386_translations.tar.gz
+Files: 
+ 8a61eb49d42d4ee7eb7ac6fe3fb0c1e3 112354 utils optional pmount_0.9.20-2ubuntu0.2_i386.deb
+ 0cd445544a6caa3ce9b665e80aeb0093 35535 raw-translations - pmount_0.9.20-2ubuntu0.2_i386_translations.tar.gz
+Original-Maintainer: Vincent Fourmond <fourmond@xxxxxxxxxx>

=== added file 'lib/lp/archiveuploader/tests/data/rosetta-translations/pmount_0.9.20-2ubuntu0.2_i386.deb'
Binary files lib/lp/archiveuploader/tests/data/rosetta-translations/pmount_0.9.20-2ubuntu0.2_i386.deb	1970-01-01 00:00:00 +0000 and lib/lp/archiveuploader/tests/data/rosetta-translations/pmount_0.9.20-2ubuntu0.2_i386.deb	2013-09-18 12:31:15 +0000 differ
=== added file 'lib/lp/archiveuploader/tests/data/rosetta-translations/pmount_0.9.20-2ubuntu0.2_i386_translations.tar.gz'
Binary files lib/lp/archiveuploader/tests/data/rosetta-translations/pmount_0.9.20-2ubuntu0.2_i386_translations.tar.gz	1970-01-01 00:00:00 +0000 and lib/lp/archiveuploader/tests/data/rosetta-translations/pmount_0.9.20-2ubuntu0.2_i386_translations.tar.gz	2013-09-18 12:31:15 +0000 differ
=== modified file 'lib/lp/soyuz/model/queue.py'
--- lib/lp/soyuz/model/queue.py	2013-08-08 13:59:49 +0000
+++ lib/lp/soyuz/model/queue.py	2013-09-18 12:31:15 +0000
@@ -46,7 +46,6 @@
 # that it needs a bit of redesigning here around the publication stuff.
 from lp.archivepublisher.config import getPubConfig
 from lp.archivepublisher.customupload import CustomUploadError
-from lp.archivepublisher.debversion import Version
 from lp.archiveuploader.tagfiles import parse_tagfile_content
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.registry.model.sourcepackagename import SourcePackageName
@@ -90,7 +89,6 @@
     )
 from lp.soyuz.interfaces.archive import (
     ComponentNotFound,
-    MAIN_ARCHIVE_PURPOSES,
     PriorityNotFound,
     SectionNotFound,
     )
@@ -98,9 +96,6 @@
 from lp.soyuz.interfaces.component import IComponentSet
 from lp.soyuz.interfaces.packagecopyjob import IPackageCopyJobSource
 from lp.soyuz.interfaces.packagediff import IPackageDiffSet
-from lp.soyuz.interfaces.packagetranslationsuploadjob import (
-    IPackageTranslationsUploadJobSource,
-    )
 from lp.soyuz.interfaces.publishing import (
     IPublishingSet,
     name_priority_map,
@@ -1423,38 +1418,11 @@
 
     def publishRosettaTranslations(self, logger=None):
         """See `IPackageUploadCustom`."""
-        sourcepackagerelease = self.packageupload.sourcepackagerelease
-
-        # Ignore translations not with main distribution purposes.
-        if self.packageupload.archive.purpose not in MAIN_ARCHIVE_PURPOSES:
-            debug(logger,
-                  "Skipping translations since its purpose is not "
-                  "in MAIN_ARCHIVE_PURPOSES.")
-            return
-
-        # If the distroseries is 11.10 (oneiric) or later, the valid names
-        # check is not required.  (See bug 788685.)
-        distroseries = sourcepackagerelease.upload_distroseries
-        do_names_check = Version(distroseries.version) < Version('11.10')
-
-        valid_pockets = (
-            PackagePublishingPocket.RELEASE, PackagePublishingPocket.SECURITY,
-            PackagePublishingPocket.UPDATES, PackagePublishingPocket.PROPOSED)
-        valid_components = ('main', 'restricted')
-        if (self.packageupload.pocket not in valid_pockets or
-            (do_names_check and
-            sourcepackagerelease.component.name not in valid_components)):
-            # XXX: CarlosPerelloMarin 2006-02-16 bug=31665:
-            # This should be implemented using a more general rule to accept
-            # different policies depending on the distribution.
-            # Ubuntu's MOTU told us that they are not able to handle
-            # translations like we do in main. We are going to import only
-            # packages in main.
-            return
-
-        blamee = self.packageupload.findPersonToNotify()
-        getUtility(IPackageTranslationsUploadJobSource).create(
-            sourcepackagerelease, self.libraryfilealias, blamee)
+        from lp.archivepublisher.rosetta_translations import (
+            process_rosetta_translations)
+
+        process_rosetta_translations(self.packageupload,
+                                     self.libraryfilealias, logger=logger)
 
     def publishStaticTranslations(self, logger=None):
         """See `IPackageUploadCustom`."""

=== modified file 'lib/lp/soyuz/scripts/custom_uploads_copier.py'
--- lib/lp/soyuz/scripts/custom_uploads_copier.py	2013-07-25 17:05:20 +0000
+++ lib/lp/soyuz/scripts/custom_uploads_copier.py	2013-09-18 12:31:15 +0000
@@ -17,6 +17,7 @@
 from lp.archivepublisher.ddtp_tarball import DdtpTarballUpload
 from lp.archivepublisher.debian_installer import DebianInstallerUpload
 from lp.archivepublisher.dist_upgrader import DistUpgraderUpload
+from lp.archivepublisher.rosetta_translations import RosettaTranslationsUpload
 from lp.archivepublisher.uefi import UefiUpload
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.services.database.bulk import load_referencing
@@ -37,6 +38,8 @@
         PackageUploadCustomFormat.DEBIAN_INSTALLER: DebianInstallerUpload,
         PackageUploadCustomFormat.DIST_UPGRADER: DistUpgraderUpload,
         PackageUploadCustomFormat.DDTP_TARBALL: DdtpTarballUpload,
+        PackageUploadCustomFormat.ROSETTA_TRANSLATIONS:
+            RosettaTranslationsUpload,
         PackageUploadCustomFormat.UEFI: UefiUpload,
         }
 

=== modified file 'lib/lp/soyuz/scripts/tests/test_custom_uploads_copier.py'
--- lib/lp/soyuz/scripts/tests/test_custom_uploads_copier.py	2013-07-25 17:05:20 +0000
+++ lib/lp/soyuz/scripts/tests/test_custom_uploads_copier.py	2013-09-18 12:31:15 +0000
@@ -200,7 +200,7 @@
         matching_upload = package_upload.addCustom(
             library_file, PackageUploadCustomFormat.DEBIAN_INSTALLER)
         nonmatching_upload = package_upload.addCustom(
-            library_file, PackageUploadCustomFormat.ROSETTA_TRANSLATIONS)
+            library_file, PackageUploadCustomFormat.STATIC_TRANSLATIONS)
         copier = CustomUploadsCopier(FakeDistroSeries())
         candidates = copier.getCandidateUploads(source_series)
         self.assertContentEqual([matching_upload], candidates)

=== added file 'lib/lp/soyuz/tests/test_distroseriesqueue_rosetta_translations.py'
--- lib/lp/soyuz/tests/test_distroseriesqueue_rosetta_translations.py	1970-01-01 00:00:00 +0000
+++ lib/lp/soyuz/tests/test_distroseriesqueue_rosetta_translations.py	2013-09-18 12:31:15 +0000
@@ -0,0 +1,139 @@
+# Copyright 2013 Canonical Ltd.  This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+"""Test upload and queue manipulation of Rosetta Translations' tarballs.
+
+See also lp.archivepublisher.tests.test_rosetta_translations for detailed
+tests of rosetta-translations handling.
+"""
+
+import transaction
+from os.path import relpath
+from tarfile import TarFile
+from zope.component import getUtility
+
+from lp.archiveuploader.nascentupload import NascentUpload
+from lp.archiveuploader.tests import (
+    datadir,
+    getPolicy,
+    )
+from lp.services.log.logger import DevNullLogger
+from lp.soyuz.enums import PackagePublishingStatus
+from lp.soyuz.model.packagetranslationsuploadjob import (
+    PackageTranslationsUploadJob,
+    )
+from lp.soyuz.tests.test_publishing import TestNativePublishingBase
+from lp.testing.dbuser import dbuser
+from lp.testing.gpgkeys import import_public_test_keys
+from lp.testing.layers import LaunchpadZopelessLayer
+
+from lp.translations.interfaces.translationimportqueue import (
+    ITranslationImportQueue,
+    )
+from lp.translations.enums import RosettaImportStatus
+from lp.translations.scripts.import_queue_gardener import ImportQueueGardener
+from lp.translations.scripts.po_import import TranslationsImport
+
+
+class TestDistroSeriesQueueRosettaTranslationsTarball(
+        TestNativePublishingBase):
+
+    layer = LaunchpadZopelessLayer
+
+    def setUp(self):
+        super(TestDistroSeriesQueueRosettaTranslationsTarball, self).setUp()
+        import_public_test_keys()
+        self.logger = DevNullLogger()
+        self.absolutely_anything_policy = getPolicy(
+            name="absolutely-anything", distro="ubuntutest",
+            distroseries=None)
+        self.package_name = "pmount"
+        self.version = "0.9.20-2ubuntu0.2"
+
+    def uploadTestData(self, name=None, version=None):
+        if name is None:
+            name = self.package_name
+        if version is None:
+            version = self.version
+        changes_file = "%s_%s_i386.changes" % (name, version)
+
+        spph = self.getPubSource(sourcename=name, version=version,
+                                 distroseries=self.breezy_autotest,
+                                 status=PackagePublishingStatus.PUBLISHED)
+        self.spr = spph.sourcepackagerelease
+        self.translations_file = "%s_%s_i386_translations.tar.gz" % (name,
+                                                                     version)
+        upload = NascentUpload.from_changesfile_path(
+            datadir("rosetta-translations/%s" % changes_file),
+            self.absolutely_anything_policy, self.logger)
+
+        upload.process()
+        self.assertFalse(upload.is_rejected)
+        self.assertTrue(upload.do_accept())
+        self.assertFalse(upload.rejection_message)
+        # Accepting the queue entry because there's no ancestry, so not
+        # auto-accepted
+        upload.queue_root.setAccepted()
+        return upload
+
+    def test_accepts_correct_upload(self):
+        upload = self.uploadTestData()
+        self.assertEqual(1, len(upload.queue_root.customfiles))
+
+    def _getImportableFilesFromTarball(self):
+        tarball = TarFile.open(mode="r:gz", fileobj=open(datadir(
+            "rosetta-translations/%s" % self.translations_file)))
+        return [relpath(file_, "./source/") for file_ in tarball.getnames() if
+                ".po" in file_]
+
+    def _getQueuePaths(self, import_status=None):
+        if import_status is not None:
+            entries = self.translation_import_queue.getAllEntries(
+                target=self.spr.sourcepackage, import_status=import_status)
+        else:
+            entries = self.translation_import_queue.getAllEntries(
+                target=self.spr.sourcepackage)
+        return [entry.path for entry in entries]
+
+    def test_publish(self):
+        upload = self.uploadTestData()
+        transaction.commit()
+        upload.queue_root.realiseUpload(self.logger)
+
+        # Test if the job was created correctly
+        jobs = list(PackageTranslationsUploadJob.iterReady())
+        self.assertEqual(1, len(jobs))
+
+        job = jobs[0]
+        # Assert if the job corresponds to the file we uploaded
+        self.assertEqual(job.sourcepackagerelease, self.spr)
+        self.assertEqual(job.libraryfilealias.filename, self.translations_file)
+
+        # Test if the pmount translations tarball files were added to the
+        # translation import queue
+        with dbuser("upload_package_translations_job"):
+            job.run()
+        self.translation_import_queue = getUtility(ITranslationImportQueue)
+        self.assertContentEqual(self._getImportableFilesFromTarball(),
+                                self._getQueuePaths())
+
+        self.factory.makePOTemplate(distroseries=self.breezy_autotest,
+            sourcepackagename=self.spr.sourcepackagename, path="po/pmount.pot",
+            translation_domain=self.package_name)
+
+        # Approve all translations in the queue
+        with dbuser("translations_import_queue_gardener"):
+            gardener = ImportQueueGardener(
+                'translations-import-queue-gardener', logger=self.logger,
+                test_args=[])
+            gardener.main()
+
+        # Import all approved translations
+        with dbuser("poimport"):
+            importer = TranslationsImport('poimport', logger=self.logger,
+                                          test_args=[])
+            importer.main()
+        # Test if all translations in the queue were successfully imported
+        self.assertContentEqual(
+            self._getImportableFilesFromTarball(), self._getQueuePaths(
+                import_status=RosettaImportStatus.IMPORTED))

=== modified file 'lib/lp/soyuz/tests/test_packagecopyjob.py'
--- lib/lp/soyuz/tests/test_packagecopyjob.py	2013-07-16 14:06:08 +0000
+++ lib/lp/soyuz/tests/test_packagecopyjob.py	2013-09-18 12:31:15 +0000
@@ -1362,7 +1362,7 @@
             custom_file, PackageUploadCustomFormat.DIST_UPGRADER)
         build.package_upload.addCustom(
             self.factory.makeLibraryFileAlias(),
-            PackageUploadCustomFormat.ROSETTA_TRANSLATIONS)
+            PackageUploadCustomFormat.STATIC_TRANSLATIONS)
         # Make the new librarian file available.
         self.layer.txn.commit()
 
@@ -1392,7 +1392,7 @@
             status=PackageUploadStatus.ACCEPTED, archive=spph.archive,
             pocket=PackagePublishingPocket.UPDATES))
 
-        # ROSETTA_TRANSLATIONS is not a copyable type, so is not copied.
+        # STATIC_TRANSLATIONS is not a copyable type, so is not copied.
         self.assertEqual(1, len(uploads))
         upload = uploads[0]
         self.assertEqual(


Follow ups