l.t.u.g.GettextPOExporterBase : class documentation

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

Known subclasses: lp.translations.utilities.gettext_po_exporter.GettextPOChangedExporter, lp.translations.utilities.gettext_po_exporter.GettextPOExporter

Base support class to export Gettext .po files.

To get a working implementation, derived classes must assign values to format and supported_source_formats and must implement _makeExportedHeader.

Method exportTranslationMessageData See ITranslationFormatExporter.
Method exportTranslationFile See ITranslationFormatExporter.
Method _makeExportedHeader Transform the header information into a format suitable for export.
Method _encode_file_content Try to encode the file using the charset given in the header.
def exportTranslationMessageData(self, translation_message):
See ITranslationFormatExporter.
def _makeExportedHeader(self, translation_file):
Transform the header information into a format suitable for export.
ReturnsUnicode string containing the header.
def _encode_file_content(self, translation_file, exported_content):
Try to encode the file using the charset given in the header.
def exportTranslationFile(self, translation_file, storage, ignore_obsolete=False, force_utf8=False):
See ITranslationFormatExporter.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.