Part of lp.translations.browser.translationlinksaggregator View In Hierarchy
Known subclasses: lp.translations.browser.person.WorkListLinksAggregator, lp.translations.browser.tests.test_translationlinksaggregator.DumbAggregator
Aggregate `POFile`s and/or `POTemplate`s into meaningful targets. Here, `POFile`s and `POTemplate`s are referred to collectively as "sheets."
Method | describe | Overridable: return description of given translations link. |
Method | aggregate | Aggregate sheets into a list of translation target descriptions. |
Method | _bundle | Bundle sheets based on target: Product or SourcePackage . |
Method | _composeLink | Produce a link to a POFile or POTemplate . |
Method | _getTemplate | Return POTemplate for sheet . |
Method | _getLanguage | Return language sheet is in, if sheet is an IPOFile . |
Method | _countLanguages | Count languages among sheets . |
Method | _circumscribe | Find the best common UI link to cover all of sheets . |
Overridable: return description of given translations link. :param target: `Product` or `SourcePackage`. :param link: URL linking to `covered_sheets` in the UI. :param covered_sheets: `POFile`s and/or `POTemplate`s being linked and described together. :return: Some description that will get added to a list and returned by `aggregate`.
Bundle `sheets` based on target: `Product` or `SourcePackage`. :param sheets: Sequence of `POFile`s and/or `POTemplate`s. :return: Dict mapping each targets to a list representing its `POFile`s and `POTemplate`s as found in `sheets`.
sheets
.
A template's language is None, which also counts.
Find the best common UI link to cover all of `sheets`. :param sheets: List of `POFile`s and/or `POTemplate`s. :return: Dict containing a set of links and the respective lists of `sheets` they cover.
sheets
into a list of translation target descriptions.
Targets are aggregated into "sensible" chunks first.
Returns | A list of whatever the implementation for describe
returns for the sensible chunks. |