diff options
Diffstat (limited to 'MLEB/Translate/translationaids/DocumentationAid.php')
-rw-r--r-- | MLEB/Translate/translationaids/DocumentationAid.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/MLEB/Translate/translationaids/DocumentationAid.php b/MLEB/Translate/translationaids/DocumentationAid.php index f19c03ba..02faf454 100644 --- a/MLEB/Translate/translationaids/DocumentationAid.php +++ b/MLEB/Translate/translationaids/DocumentationAid.php @@ -8,6 +8,8 @@ * @license GPL-2.0-or-later */ +use MediaWiki\MediaWikiServices; + /** * Translation aid which gives the message documentation. * @@ -16,7 +18,7 @@ */ class DocumentationAid extends TranslationAid { public function getData() { - global $wgTranslateDocumentationLanguageCode, $wgContLang; + global $wgTranslateDocumentationLanguageCode; if ( !$wgTranslateDocumentationLanguageCode ) { throw new TranslationHelperException( 'Message documentation is disabled' ); } @@ -27,11 +29,9 @@ class DocumentationAid extends TranslationAid { $info = TranslateUtils::getMessageContent( $page, $wgTranslateDocumentationLanguageCode, $ns ); return [ - 'language' => $wgContLang->getCode(), + 'language' => MediaWikiServices::getInstance()->getContentLanguage()->getCode(), 'value' => $info, - 'html' => TranslateUtils::parseAsInterface( - $this->context->getOutput(), $info - ), + 'html' => $this->context->getOutput()->parseAsInterface( $info ) ]; } } |