diff options
Diffstat (limited to 'MLEB/Translate/messagegroups/MessageGroupOld.php')
-rw-r--r-- | MLEB/Translate/messagegroups/MessageGroupOld.php | 88 |
1 files changed, 14 insertions, 74 deletions
diff --git a/MLEB/Translate/messagegroups/MessageGroupOld.php b/MLEB/Translate/messagegroups/MessageGroupOld.php index 0eec3d0a..f34d2594 100644 --- a/MLEB/Translate/messagegroups/MessageGroupOld.php +++ b/MLEB/Translate/messagegroups/MessageGroupOld.php @@ -31,9 +31,7 @@ abstract class MessageGroupOld implements MessageGroup { return $this->label; } - /** - * @param string $value - */ + /** @param string $value */ public function setLabel( $value ) { $this->label = $value; } @@ -43,16 +41,12 @@ abstract class MessageGroupOld implements MessageGroup { */ protected $id = 'none'; - /** - * @return string - */ + /** @return string */ public function getId() { return $this->id; } - /** - * @param string $value - */ + /** @param string $value */ public function setId( $value ) { $this->id = $value; } @@ -81,46 +75,7 @@ abstract class MessageGroupOld implements MessageGroup { } /** - * List of messages that are hidden by default, but can still be translated if - * needed. - */ - protected $optional = []; - - /** - * @return array - */ - public function getOptional() { - return $this->optional; - } - - /** - * @param array $value - */ - public function setOptional( $value ) { - $this->optional = $value; - } - - /** - * List of messages that are always hidden and cannot be translated. - */ - protected $ignored = []; - - /** - * @return array - */ - public function getIgnored() { - return $this->ignored; - } - - /** - * @param array $value - */ - public function setIgnored( $value ) { - $this->ignored = $value; - } - - /** - * Holds descripton of this group. Description is a wiki text snippet that + * Holds description of this group. Description is a wiki text snippet that * gives information about this group to translators. */ protected $description = null; @@ -161,9 +116,7 @@ abstract class MessageGroupOld implements MessageGroup { */ protected $mangler = null; - /** - * @return StringMatcher - */ + /** @return StringMatcher */ public function getMangler() { if ( !isset( $this->mangler ) ) { $this->mangler = new StringMatcher(); @@ -206,9 +159,7 @@ abstract class MessageGroupOld implements MessageGroup { return $this->meta ? [] : $this->getDefinitions(); } - /** - * @inheritDoc - */ + /** @inheritDoc */ public function getKeys() { return array_keys( $this->getDefinitions() ); } @@ -219,7 +170,7 @@ abstract class MessageGroupOld implements MessageGroup { * * @param string $key Message key * @param string $code Language code - * @return Mixed List of stored translation or \null. + * @return mixed List of stored translation or \null. */ public function getMessage( $key, $code ) { if ( !isset( $this->messages[$code] ) ) { @@ -320,16 +271,7 @@ abstract class MessageGroupOld implements MessageGroup { } public function getTags( $type = null ) { - $tags = [ - 'optional' => $this->optional, - 'ignored' => $this->ignored, - ]; - - if ( !$type ) { - return $tags; - } - - return $tags[$type] ?? []; + return []; } /** @@ -355,9 +297,7 @@ abstract class MessageGroupOld implements MessageGroup { return null; } - /** - * @deprecated Use getMessageGroupStates - */ + /** @deprecated Use getMessageGroupStates */ public function getWorkflowConfiguration() { global $wgTranslateWorkflowStates; if ( !$wgTranslateWorkflowStates ) { @@ -383,11 +323,7 @@ abstract class MessageGroupOld implements MessageGroup { return new MessageGroupStates( $conf ); } - /** - * Get all the translatable languages for a group, considering the whitelisting - * and blacklisting. - * @return array|null The language codes as array keys. - */ + /** @inheritDoc */ public function getTranslatableLanguages() { return null; } @@ -411,4 +347,8 @@ abstract class MessageGroupOld implements MessageGroup { public function getTranslationAids() { return TranslationAid::getTypes(); } + + public function getSupportConfig(): ?array { + return null; + } } |