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

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

A subset of POTemplate.
Object sourcepackagename Undocumented
Object distroseries Undocumented
Object productseries Undocumented
Bool iscurrent The filter for the iscurrent flag that this subset should apply. The filter is disabled if it is None
TextLine title Undocumented
Method __iter__ Return an iterator over all POTemplate for this subset.
Method __len__ Return the number of IPOTemplate objects in this subset.
Method __getitem__ Get a POTemplate by its name.
Method isNameUnique Is the IPOTemplate name unique to the series (and package).
Method new Create a new template for the context of this Subset.
Method getPOTemplateByName Return the IPOTemplate with the given name or None.
Method getPOTemplatesByTranslationDomain Return the `IPOTemplate`s with the given translation_domain.
Method getPOTemplateByPath Return the IPOTemplate from this subset that has the given path.
Method getAllOrderByDateLastUpdated Return an iterator over all POTemplate for this subset.
Method getClosestPOTemplate Return a IPOTemplate with a path closer to given path, or None.
Method findUniquePathlessMatch Find the one POTemplate with given filename, if there is one.
sourcepackagename =
Undocumented
distroseries =
Undocumented
productseries =
Undocumented
iscurrent =
The filter for the iscurrent flag that this subset should apply. The filter is disabled if it is None
title =
Undocumented
def __iter__():
Return an iterator over all POTemplate for this subset.
def __len__():
Return the number of IPOTemplate objects in this subset.
def __getitem__(name):
Get a POTemplate by its name.
def isNameUnique(name):
Is the IPOTemplate name unique to the series (and package).

The subset may only include active IPOTemplate objects (iscurrent=True), but the full set that constrains creating new templates includes inactive templates too. Use this method to verify that an IPOTemplate can be created before calling new().

def new(name, translation_domain, path, owner, copy_pofiles=True):
Create a new template for the context of this Subset.

The name must be unique to the full subset of active and inactive templates in a series (and package). See isNameUnique.

def getPOTemplateByName(name):
Return the IPOTemplate with the given name or None.

The IPOTemplate is restricted to this concrete IPOTemplateSubset.

def getPOTemplatesByTranslationDomain(translation_domain):
Return the `IPOTemplate`s with the given translation_domain.

The search is restricted to this concrete `IPOTemplateSubset`.

:return: An ORM result set containing the templates in the given
    `IPOTemplateSubset` with the given translation_domain.
def getPOTemplateByPath(path):
Return the IPOTemplate from this subset that has the given path.

Return None if there is no such IPOTemplate.

def getAllOrderByDateLastUpdated():
Return an iterator over all POTemplate for this subset.

The iterator will give entries sorted by modification.

def getClosestPOTemplate(path):
Return a IPOTemplate with a path closer to given path, or None.

If there is no IPOTemplate with a common path with the given, argument or if there are more than one IPOTemplate with the same common path, and both are the closer ones, returns None.

def findUniquePathlessMatch(filename):
Find the one POTemplate with given filename, if there is one.

Directory paths are ignored in the search. Only the filename itself is matched.

ParametersfilenameA filename, without any directory component.
ReturnsThe one POTemplate in the subset whose filename matches filename, if there is exactly one. Otherwise, None.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.