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

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

Known subclasses: lp.registry.interfaces.distroseries.IDistroSeriesPublic, lp.registry.interfaces.productseries.IProductSeriesPublic, lp.registry.interfaces.sourcepackage.ISourcePackage

Known implementations: lp.translations.model.potemplate.HasTranslationTemplatesMixin

An entity that has translation templates attached.

Examples include ISourcePackage, IDistroSeries, and IProductSeries.

Bool has_translation_templates Undocumented
Bool has_current_translation_templates Undocumented
Method getTemplatesCollection Return templates as a TranslationTemplatesCollection.
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 getObsoleteTranslationTemplates Return an iterator over its not active translation templates.
Method getTranslationTemplates Return an iterator over all its translation templates.
Method getTranslationTemplateFormats A list of native formats for all current translation templates.
Method getTemplatesAndLanguageCounts List tuples of POTemplate and its language count.
has_translation_templates =
Undocumented
has_current_translation_templates =
Undocumented
def getTemplatesCollection():
Return templates as a `TranslationTemplatesCollection`.

The collection selects all `POTemplate`s attached to the
translation target that implements this interface.
def getCurrentTemplatesCollection():
Return TranslationTemplatesCollection of current templates.

A translation template is considered active when both IPOTemplate.iscurrent and the official_rosetta flag for its containing Product or Distribution are set to True.

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

A translation template is considered active when both IPOTemplate.iscurrent and the official_rosetta flag for its containing Product or Distribution are 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.

def getObsoleteTranslationTemplates():
Return an iterator over its not active translation templates.

A translation template is considered not active when any of IPOTemplate.iscurrent or IDistribution.official_rosetta flags are set to False.

@export_read_operation()
@operation_returns_collection_of(IPOTemplate)
def getTranslationTemplates():
Return an iterator over all its translation templates.

The returned templates are either obsolete or current.

def getTranslationTemplateFormats():
A list of native formats for all current translation templates.
def getTemplatesAndLanguageCounts():
List tuples of `POTemplate` and its language count.

A template's language count is the number of `POFile`s that
exist for it.
API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.