20 global $wgTranslateValidationExclusionFile;
21 return $wgTranslateValidationExclusionFile;
24 public function getTranslateAuthorExclusionList(): array {
25 global $wgTranslateAuthorExclusionList;
26 return $wgTranslateAuthorExclusionList;
29 public function getDisabledTargetLanguages(): array {
30 global $wgTranslateDisabledTargetLanguages;
31 return $wgTranslateDisabledTargetLanguages;
34 public function isAuthorExcluded(
string $groupId,
string $languageCode,
string $username ): bool {
35 $hash =
"$groupId;$languageCode;$username";
36 $authorExclusionList = $this->getTranslateAuthorExclusionList();
39 foreach ( $authorExclusionList as $rule ) {
40 [ $type, $regex ] = $rule;
42 if ( preg_match( $regex, $hash ) ) {
43 if ( $type ===
'include' ) {