l.t.u.m.MozillaZipImportParser(MozillaZipTraversal) : class documentation

Part of lp.translations.utilities.mozilla_xpi_importer View In Hierarchy

XPI and jar parser for import purposes.

Looks for DTD and properties files, and parses them for messages. All messages found are left in self.messages.

Method extend Complement self.messages with messages found in contained file.
Method _begin Overridable hook for MozillaZipTraversal.
Method _finish Overridable hook for MozillaZipTraversal.
Method _processTranslatableFile Overridable hook for MozillaZipTraversal.
Method _isTemplate Is this a template?
Method _processNestedJar Overridable hook for MozillaZipTraversal.
Method _isCommandKeyMessage Whether the message represents a command key shortcut.
Method _isAccessKeyMessage Whether the message represents an access key shortcut.

Inherited from MozillaZipTraversal:

Method __init__ Open zip (or XPI, or jar) file and scan its contents.
Method _processEntry Read one zip archive entry, figure out what to do with it.
def _begin(self):
Overridable hook for MozillaZipTraversal.
def _finish(self):
Overridable hook for MozillaZipTraversal.
def _processTranslatableFile(self, entry, locale_code, xpi_path, chrome_path, filename_suffix):
Overridable hook for MozillaZipTraversal.

This implementation is only interested in DTD and properties files.

def _isTemplate(self):
Is this a template?
def _processNestedJar(self, zip_instance):
Overridable hook for MozillaZipTraversal.

This implementation complements self.messages with those found in the jar file we just parsed.

def _isCommandKeyMessage(self, message):
Whether the message represents a command key shortcut.
def _isAccessKeyMessage(self, message):
Whether the message represents an access key shortcut.
def extend(self, newdata):
Complement self.messages with messages found in contained file.
Parametersnewdataa sequence representing the messages found in a contained file.
API Documentation for Launchpad, generated by pydoctor at 2019-05-26 00:00:05.