l.t.s.language_pack : module documentation

Part of lp.translations.scripts

Functions for language pack creation script.
Function iter_sourcepackage_translationdomain_mapping Return an iterator of tuples with sourcepackagename - translationdomain
Function export Return a pair containing a filehandle from which the distribution's
Function export_language_pack Export a language pack for the given distribution series.
def iter_sourcepackage_translationdomain_mapping(series):
Return an iterator of tuples with sourcepackagename - translationdomain mapping.

With the output of this method we can know the translationdomains that a sourcepackage has.

def export(distroseries, component, update, force_utf8, logger):
Return a pair containing a filehandle from which the distribution's translations tarball can be read and the size of the tarball in bytes.
ParametersdistroseriesThe IDistroSeries we want to export from.
componentThe component name from the given distribution series.
updateWhether the export should be an update from the last export.
force_utf8Whether the export should have all files exported as UTF-8.
loggerA logger object.
def export_language_pack(distribution_name, series_name, logger, component=None, force_utf8=False, output_file=None):
Export a language pack for the given distribution series.
Parametersdistribution_nameName of the distribution we want to export the language pack from.
series_nameName of the distribution series we want to export the language pack from.
loggerLogger object.
componentThe component for the given distribution series. This will be used as a filtering option when selecting the files to export.
force_utf8A flag indicating whether all files exported must be force to use the UTF-8 encoding.
output_fileFile path where this export file should be stored, instead of using Librarian. If '-' is given, we use standard output.
ReturnsThe exported language pack or None.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.