l.t.i.h.IHasTranslationTemplates(Interface) : interface documentation

Part of lp.translations.interfaces.hastranslationtemplates View In Hierarchy

Known subclasses: lp.registry.interfaces.distroseries.IDistroSeriesPublic, lp.registry.interfaces.productseries.IProductSeriesView, lp.registry.interfaces.sourcepackage.ISourcePackagePublic

An entity that has translation templates attached.

Examples include ISourcePackage, IDistroSeries, and IProductSeries.

Bool has_translation_templates Undocumented
Bool has_current_translation_templates Undocumented
Bool has_obsolete_translation_templates Undocumented
Bool has_sharing_translation_templates Undocumented
Bool has_translation_files Undocumented
Method getTemplatesCollection Return templates as a TranslationTemplatesCollection.
Method getSharingPartner Return the object on the other side of the packaging link.
Method getCurrentTemplatesCollection Return TranslationTemplatesCollection of current templates.
Method getCurrentTranslationTemplates Return an iterator over all active translation templates.
Method getCurrentTranslationFiles Return an iterator over all active translation files.
Method getTranslationTemplates Return an iterator over all its translation templates.
Method getTranslationTemplateByName Return the template with the given name or None.
Method getTranslationTemplateFormats A list of native formats for all current translation templates.
has_translation_templates =
Undocumented
has_current_translation_templates =
Undocumented
has_obsolete_translation_templates =
Undocumented
has_sharing_translation_templates =
Undocumented
has_translation_files =
Undocumented
def getTemplatesCollection():
Return templates as a `TranslationTemplatesCollection`.

The collection selects all `POTemplate`s attached to the
translation target that implements this interface.
def getSharingPartner():
Return the object on the other side of the packaging link.

Return the object that is sharing translations with this one on the other side of a packaging link. It must also implement this interface.

def getCurrentTemplatesCollection():
Return TranslationTemplatesCollection of current templates.

A translation template is considered active when IPOTemplate.iscurrent flag is set to True.

def getCurrentTranslationTemplates(just_ids=False):
Return an iterator over all active translation templates.

A translation template is considered active when IPOTemplate.iscurrent is set to True.

Parametersjust_idsIf True, return only the POTemplate.id rather than the full POTemplate. Used to save time on retrieving and deserializing the objects from the database.
def getCurrentTranslationFiles(just_ids=False):
Return an iterator over all active translation files.

A translation file is active if it's attached to an active translation template.

@export_read_operation()
@operation_returns_collection_of(Interface)
@operation_for_version('beta')
def getTranslationTemplates():
Return an iterator over all its translation templates.

The returned templates are either obsolete or current.

ReturnsA sequence of IPOTemplate.
def getTranslationTemplateByName(name):
Return the template with the given name or None.
def getTranslationTemplateFormats():
A list of native formats for all current translation templates.
API Documentation for Launchpad, generated by pydoctor at 2020-01-26 00:00:27.