l.t.m.p.POTemplate(SQLBase, RosettaStats) : class documentation

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

No class docstring
Method __storm_invalidated__ Flush cached properties.
Method clearPOFileCache See IPOTemplate.
Method setActive See IPOTemplate.
Method uses_english_msgids See IPOTemplate.
Method __iter__ See IPOTemplate.
Method __getitem__ See IPOTemplate.
Method sharingKey See IPOTemplate.
Method displayname See IPOTemplate.
Method title See IPOTemplate.
Method distribution See IPOTemplate.
Method product See IPOTemplate.
Method getTranslationPolicy See IPOTemplate.
Method translationgroups See IPOTemplate.
Method translationpermission See IPOTemplate.
Method relatives_by_source See IPOTemplate.
Method language_count Undocumented
Method sourcepackage See IPOTemplate.
Method translationtarget See IPOTemplate.
Method getHeader See IPOTemplate.
Method getPOTMsgSetByMsgIDText See IPOTemplate.
Method getPOTMsgSetBySequence See IPOTemplate.
Method getPOTMsgSets See IPOTemplate.
Method getTranslationCredits See IPOTemplate.
Method getPOTMsgSetsCount See IPOTemplate.
Method getPOTMsgSetByID See IPOTemplate.
Method languages See IPOTemplate.
Method getPOFileByPath See IPOTemplate.
Method getPOFileByLang See IPOTemplate.
Method getOtherSidePOTemplate See IPOTemplate.
Method messageCount See IRosettaStats.
Method updateMessageCount Update self.messagecount.
Method currentCount See IRosettaStats.
Method updatesCount See IRosettaStats.
Method rosettaCount See IRosettaStats.
Method unreviewedCount See IRosettaStats.
Method hasMessageID See IPOTemplate.
Method hasPluralMessage See IPOTemplate.
Method export See IPOTemplate.
Method exportWithTranslations See IPOTemplate.
Method expireAllMessages See IPOTemplate.
Method isPOFilePathAvailable Can we assign given path to a new POFile without clashes?
Method newPOFile See IPOTemplate.
Method getDummyPOFile See IPOTemplate.
Method createPOTMsgSetFromMsgIDs See IPOTemplate.
Static Method getOrCreatePOMsgID Creates or returns existing POMsgID for given text.
Method createMessageSetFromText See IPOTemplate.
Method getOrCreateSharedPOTMsgSet See IPOTemplate.
Method importFromQueue See IPOTemplate.
Method getTranslationRows See IPOTemplate.
Method translation_side See IPOTemplate.
Method awardKarma See IPOTemplate.
Method _sharing_ids Return the IDs of all sharing templates including this one.
Method _removeFromSuggestivePOTemplatesCache One level of indirection to make testing easier.
Method _getPOTMsgSetSelectionClauses Return SQL clauses for finding POTMsgSets which belong
Method _getPOTMsgSetBy Look for a POTMsgSet by msgid_singular, msgid_plural, context.
Method _generateTranslationFileDatas Yield ITranslationFileData objects for translations and self.
Method _lookupLanguage Look up named Language object, or raise LanguageNotFound.
Method _composePOFilePath Make up a good name for a new POFile for given language.
Method _createPOFilesInSharingPOTemplates Create copies of the given pofile in all sharing potemplates.

Inherited from SQLBase:

Method __init__ Extended version of the SQLObjectBase constructor.
Method __repr__ Undocumented
Method destroySelf Undocumented
Method __eq__ Equality operator.
Method __ne__ Inverse of __eq__.
Class Method _get_store Undocumented

Inherited from RosettaStats:

Method testStatistics See IRosettaStats.
Method updateStatistics See IRosettaStats.
Method translatedCount See IRosettaStats.
Method untranslatedCount See IRosettaStats.
Method newCount See IRosettaStats.
Method asPercentage See IRosettaStats.
Method translatedPercentage See IRosettaStats.
Method currentPercentage See IRosettaStats.
Method untranslatedPercentage See IRosettaStats.
Method newPercentage See IRosettaStats.
Method updatesPercentage See IRosettaStats.
Method rosettaPercentage See IRosettaStats.
@cachedproperty
def _sharing_ids(self):
Return the IDs of all sharing templates including this one.
def __storm_invalidated__(self):
Flush cached properties.
def clearPOFileCache(self):
See IPOTemplate.
def _removeFromSuggestivePOTemplatesCache(self):
One level of indirection to make testing easier.
def setActive(self, active):
See IPOTemplate.
@property
def uses_english_msgids(self):
See IPOTemplate.
def __iter__(self):
See IPOTemplate.
def __getitem__(self, key):
See IPOTemplate.
def sharingKey(self):
See IPOTemplate.
@property
def displayname(self):
See IPOTemplate.
@property
def title(self):
See IPOTemplate.
@property
def distribution(self):
See IPOTemplate.
@property
def product(self):
See IPOTemplate.
def getTranslationPolicy(self):
See IPOTemplate.
@property
def translationgroups(self):
See IPOTemplate.
@property
def translationpermission(self):
See IPOTemplate.
@property
def relatives_by_source(self):
See IPOTemplate.
@property
def language_count(self):
Undocumented
@cachedproperty
def sourcepackage(self):
See IPOTemplate.
@property
def translationtarget(self):
See IPOTemplate.
def getHeader(self):
See IPOTemplate.
def _getPOTMsgSetSelectionClauses(self):
Return SQL clauses for finding POTMsgSets which belong to this POTemplate.
def getPOTMsgSetByMsgIDText(self, singular_text, plural_text=None, only_current=False, context=None):
See IPOTemplate.
def getPOTMsgSetBySequence(self, sequence):
See IPOTemplate.
def getPOTMsgSets(self, current=True, prefetch=True):
See IPOTemplate.
def getTranslationCredits(self):
See IPOTemplate.
def getPOTMsgSetsCount(self, current=True):
See IPOTemplate.
def getPOTMsgSetByID(self, id):
See IPOTemplate.
def languages(self):
See IPOTemplate.
def getPOFileByPath(self, path):
See IPOTemplate.
def getPOFileByLang(self, language_code):
See IPOTemplate.
def getOtherSidePOTemplate(self):
See IPOTemplate.
def messageCount(self):
See IRosettaStats.
def updateMessageCount(self):
Update self.messagecount.
def currentCount(self, language=None):
See IRosettaStats.
def updatesCount(self, language=None):
See IRosettaStats.
def rosettaCount(self, language=None):
See IRosettaStats.
def unreviewedCount(self, language=None):
See IRosettaStats.
def _getPOTMsgSetBy(self, msgid_singular, msgid_plural=None, context=None, sharing_templates=False):
Look for a POTMsgSet by msgid_singular, msgid_plural, context.

If sharing_templates is True, and the current template has no such POTMsgSet, look through sharing templates as well.

def hasMessageID(self, msgid_singular, msgid_plural, context=None):
See IPOTemplate.
def hasPluralMessage(self):
See IPOTemplate.
def export(self):
See IPOTemplate.
def _generateTranslationFileDatas(self):
Yield ITranslationFileData objects for translations and self.

This lets us construct the in-memory representations of the template and its translations one by one before exporting them, rather than building them all beforehand and keeping them in memory at the same time.

def exportWithTranslations(self):
See IPOTemplate.
def expireAllMessages(self):
See IPOTemplate.
def _lookupLanguage(self, language_code):
Look up named Language object, or raise LanguageNotFound.
def isPOFilePathAvailable(self, path):
Can we assign given path to a new POFile without clashes?

Tests for uniqueness within the context of all templates for either self's product release series, or the combination of self's distro release series and source package (whichever applies).

def _composePOFilePath(self, language):
Make up a good name for a new POFile for given language.

The name should be unique in this ProductSeries or this combination of DistroSeries and source package. It is not guaranteed that the returned name will be unique, however, to avoid hiding obvious naming mistakes.

def _createPOFilesInSharingPOTemplates(self, pofile):
Create copies of the given pofile in all sharing potemplates.
def newPOFile(self, language_code, create_sharing=True, owner=None):
See IPOTemplate.
def getDummyPOFile(self, language, requester=None, check_for_existing=True):
See IPOTemplate.
def createPOTMsgSetFromMsgIDs(self, msgid_singular, msgid_plural=None, context=None, sequence=0):
See IPOTemplate.
@staticmethod
def getOrCreatePOMsgID(text):
Creates or returns existing POMsgID for given text.
def createMessageSetFromText(self, singular_text, plural_text, context=None, sequence=0):
See IPOTemplate.
def getOrCreateSharedPOTMsgSet(self, singular_text, plural_text, context=None, initial_file_references=None, initial_source_comment=None):
See IPOTemplate.
def importFromQueue(self, entry_to_import, logger=None, txn=None):
See IPOTemplate.
def getTranslationRows(self):
See IPOTemplate.
@property
def translation_side(self):
See IPOTemplate.
def awardKarma(self, person, action_name):
See IPOTemplate.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.