Exemple #1
0
    def _getTargetsForTranslation(self, max_fetch=None):
        """Get translation targets for this person to translate.

        Results are ordered from most to fewest untranslated messages.
        """
        person = ITranslationsPerson(self.context)
        urgent_first = (max_fetch >= 0)
        pofiles = person.getTranslatableFiles(
            no_older_than=self.history_horizon, urgent_first=urgent_first)

        if max_fetch is not None:
            pofiles = pofiles[:abs(max_fetch)]

        return TranslateLinksAggregator().aggregate(pofiles)
Exemple #2
0
    def _getTargetsForTranslation(self, max_fetch=None):
        """Get translation targets for this person to translate.

        Results are ordered from most to fewest untranslated messages.
        """
        person = ITranslationsPerson(self.context)
        urgent_first = (max_fetch >= 0)
        pofiles = person.getTranslatableFiles(
            no_older_than=self.history_horizon, urgent_first=urgent_first)

        if max_fetch is not None:
            pofiles = pofiles[:abs(max_fetch)]

        return TranslateLinksAggregator().aggregate(pofiles)