15 public function getMessageParameters() {
16 $params = parent::getMessageParameters();
18 $type = $this->entry->getFullType();
20 if ( $type ===
'translationreview/message' ) {
21 $targetPage = $this->makePageLink(
22 $this->entry->getTarget(),
23 [
'oldid' => $params[3] ]
26 $params[2] = Message::rawParam( $targetPage );
27 } elseif ( $type ===
'translationreview/group' ) {
35 $uiLanguage = $this->context->getLanguage();
36 $language = $params[3];
40 $this->entry->getTarget(),
42 [
'language' => $language ]
45 $params[2] = Message::rawParam( $targetPage );
46 $params[3] = TranslateUtils::getLanguageName( $language, $uiLanguage->getCode() );
47 $params[5] = $this->formatStateMessage( $params[5] );
48 $params[6] = $this->formatStateMessage( $params[6] );
49 } elseif ( $type ===
'translatorsandbox/rejected' ) {
51 $params[2] = $this->entry->getTarget()->getText();
52 } elseif ( $type ===
'translatorsandbox/promoted' ) {
54 $params[3] = User::newFromId( $params[3] )->getName();
60 protected function formatStateMessage( $value ) {
61 $message = $this->msg(
"translate-workflow-state-$value" );
63 return $message->isBlank() ? $value : $message->text();
74 ?Title $title, $text, array $parameters = []
76 if ( !$this->plaintext ) {
77 $link = $this->getLinkRenderer()->makeLink( $title, $text, [], $parameters );
80 if ( $title instanceof Title ) {
81 $target = $title->getPrefixedText();
83 $link =
"[[$target|$text]]";