Raw Static Translations custom files ==================================== Raw Static Translations are Gnome help files tarballs that have been stripped out of a build and attached to the upload as a custom file. The files use a special section, like other custom uploads, "raw-translations-static". When the CustomUploadFile object is created with the right section name, its custom_type property returns the right DBEnum, PackageUploadCustomFormat.STATIC_TRANSLATIONS. >>> from lp.archiveuploader.nascentuploadfile import CustomUploadFile >>> custom_upload_file = CustomUploadFile( ... filepath="", digest="", size=1, priority_name="", policy=None, ... component_and_section="main/raw-translations-static", logger=None) >>> print custom_upload_file.custom_type.name STATIC_TRANSLATIONS Static translations tarballs are not published, they only exist in the librarian and are retrieved using the webservice. We can demonstrate the publishing behaviour using a mock PackageUploadCustom object: >>> from zope.interface import implements >>> from lp.registry.interfaces.distribution import IDistributionSet >>> from lp.registry.interfaces.pocket import PackagePublishingPocket >>> from lp.soyuz.enums import PackageUploadCustomFormat >>> from lp.soyuz.interfaces.queue import ( ... IPackageUpload, IPackageUploadCustom) >>> from lp.soyuz.model.queue import PackageUploadCustom >>> class MockPackageUploadCustom(PackageUploadCustom): ... implements(IPackageUploadCustom) ... packageupload = None ... ... def __init__(self): ... self.customformat = ( ... PackageUploadCustomFormat.STATIC_TRANSLATIONS) >>> bat = getUtility(IDistributionSet)['ubuntu']['breezy-autotest'] >>> package_upload = bat.createQueueEntry( ... pocket=PackagePublishingPocket.RELEASE, changesfilename="test", ... changesfilecontent="test", ... archive=bat.main_archive) >>> custom_upload = MockPackageUploadCustom() >>> custom_upload.packageupload = package_upload >>> from lp.services.log.logger import FakeLogger >>> custom_upload.publish(logger=FakeLogger()) DEBUG Publishing custom to ubuntu/breezy-autotest DEBUG Skipping publishing of static translations.