l.t.i.w.ITranslationImportQueueEntry(Interface) : interface documentation

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

An entry of the Translation Import Queue.
Choice sourcepackagename The source package from where this entry comes.
Bool by_maintainer If checked, the translations in this import will be marked as is_current_upstream.
Attribute content An ILibraryFileAlias reference with the file content. Must not be None.
Attribute guessed_potemplate The IPOTemplate that we can guess this entry could be imported into. None if we cannot guess it.
Attribute import_into The Object where this entry will be imported. Is None if we don't know where to import it.
Field pofile Undocumented
Field potemplate The IPOTemplate associated with this entry. If path notes a .pot file, it should be used as the place where this entry will be imported, if it's a .po file, it indicates the template associated with tha translation.
Method canAdmin Check if the user can administer this entry.
Method canEdit Check if the user can edit this entry.
Method canSetStatus Check if the user can set this new status.
Method setStatus Transition to a new status if possible.
Method setErrorOutput Set error_output string.
Method addWarningOutput Optionally add warning output to error_output.
Method getGuessedPOFile Return an IPOFile that we think this entry should be imported into.
Method getFileContent Return the imported file content as a stream.
Method getTemplatesOnSameDirectory Return import queue entries stored on the same directory as self.
Method getElapsedTimeText Return a string representing elapsed time since we got the file.
sourcepackagename =
The source package from where this entry comes.
by_maintainer =
If checked, the translations in this import will be marked as is_current_upstream.
content =
An ILibraryFileAlias reference with the file content. Must not be None.
guessed_potemplate =
The IPOTemplate that we can guess this entry could be imported into. None if we cannot guess it.
import_into =
The Object where this entry will be imported. Is None if we don't know where to import it.
pofile =
Undocumented
potemplate =
The IPOTemplate associated with this entry. If path notes a .pot file, it should be used as the place where this entry will be imported, if it's a .po file, it indicates the template associated with tha translation.
def canAdmin(roles):
Check if the user can administer this entry.
def canEdit(roles):
Check if the user can edit this entry.
def canSetStatus(new_status, user):
Check if the user can set this new status.
@call_with(REQUEST_USER)
@operation_parameters(copy_field(status))
@export_write_operation()
def setStatus(new_status, user):
Transition to a new status if possible.
Parametersnew_statusStatus to transition to.
userThe user that is doing the transition.
def setErrorOutput(output):
Set error_output string.
def addWarningOutput(output):
Optionally add warning output to error_output.

This may not do everything you expect of it. Read the code if you need certainty.

def getGuessedPOFile():
Return an IPOFile that we think this entry should be imported into.

Return None if we cannot guess it.

def getFileContent():
Return the imported file content as a stream.
def getTemplatesOnSameDirectory():
Return import queue entries stored on the same directory as self.

The returned entries will be only .pot entries.

def getElapsedTimeText():

Return a string representing elapsed time since we got the file.

The returned string is like:
'2 days 3 hours 10 minutes ago' or 'just requested'
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.