diff options
Diffstat (limited to 'MLEB/Translate/utils/TranslationHelpers.php')
-rw-r--r-- | MLEB/Translate/utils/TranslationHelpers.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/MLEB/Translate/utils/TranslationHelpers.php b/MLEB/Translate/utils/TranslationHelpers.php index 1551a1a8..9b585c72 100644 --- a/MLEB/Translate/utils/TranslationHelpers.php +++ b/MLEB/Translate/utils/TranslationHelpers.php @@ -27,7 +27,7 @@ class TranslationHelpers { /** * The group object of the message (or null if there isn't any) - * @var MessageGroup + * @var MessageGroup|null */ protected $group; @@ -87,7 +87,7 @@ class TranslationHelpers { /** * Sets the HTML id of the text area that contains the translation. - * @param String $id + * @param string $id */ public function setTextareaId( $id ) { $this->textareaId = $id; @@ -103,7 +103,7 @@ class TranslationHelpers { /** * Gets the message definition. - * @return String + * @return string */ public function getDefinition() { $this->mustBeKnownMessage(); @@ -253,7 +253,7 @@ class TranslationHelpers { $sl = Language::factory( $this->group->getSourceLanguage() ); $dialogID = $this->dialogID(); - $id = Sanitizer::escapeId( "def-$dialogID" ); + $id = Sanitizer::escapeIdForAttribute( "def-$dialogID" ); $msg = $this->adder( $id, $sl ) . "\n" . Html::rawElement( 'div', [ 'class' => 'mw-translate-edit-deftext', @@ -310,7 +310,7 @@ class TranslationHelpers { } $dialogID = $this->dialogID(); - $id = Sanitizer::escapeId( "other-$fbcode-$dialogID" ); + $id = Sanitizer::escapeIdForAttribute( "other-$fbcode-$dialogID" ); $params = [ 'class' => 'mw-translate-edit-item' ]; @@ -380,9 +380,7 @@ class TranslationHelpers { } $class .= ' mw-sp-translate-message-documentation'; - $contents = TranslateUtils::parseInlineAsInterface( - $context->getOutput(), $info - ); + $contents = $context->getOutput()->parseInlineAsInterface( $info ); return TranslateUtils::fieldset( $context->msg( 'translate-edit-information' )->rawParams( $edit )->escaped(), |