/** * Lists all translators that have contributed to the latest revisions of * each translation. Causes translations to be loaded from the database. * Is not affected by filters. * @return string[] List of usernames. */ public function getAuthors() { $this->loadTranslations(); $authors = array_flip($this->authors); foreach ($this->messages as $m) { // Check if there are authors /** * @var TMessage $m */ $author = $m->getProperty('last-translator-text'); if ($author === null) { continue; } if (!isset($authors[$author])) { $authors[$author] = 1; } else { $authors[$author]++; } } # arsort( $authors, SORT_NUMERIC ); ksort($authors); $fuzzyBot = FuzzyBot::getName(); foreach ($authors as $author => $edits) { if ($author !== $fuzzyBot) { $filteredAuthors[] = $author; } } return isset($filteredAuthors) ? $filteredAuthors : array(); }